[FIX] web: decimal separator of percentage

When a percentage if formatted, the decimal separator used is always
`.`, while it should be the decimal separator of the language.

opw-1908220

closes odoo/odoo#30030
This commit is contained in:
Nicolas Martinelli
2019-01-09 08:07:56 +00:00
parent e95b4e9594
commit 69f6b9510d
2 changed files with 29 additions and 3 deletions
@@ -363,7 +363,7 @@ function formatPercentage(value, field, options) {
if (options.humanReadable && options.humanReadable(value * 100)) {
return result + "%";
}
return parseFloat(result) + "%";
return (parseFloat(result) + "%").replace('.', _t.database.parameters.decimal_point);
}
/**
* Returns a string representing the value of the selection.