diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2019-01-08 13:15:16 +0000 |
|---|---|---|
| committer | Nicolas Martinelli <nim@odoo.com> | 2019-01-09 08:07:56 +0000 |
| commit | 69f6b9510db36570698e472f797ef5e4e3685d2e (patch) | |
| tree | 7dd711032fd274d97e5e4edcd72db14529059ca3 /addons/web/static/src/js/fields/field_utils.js | |
| parent | e95b4e959433db45bc5c227f67763cd509fee333 (diff) | |
[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
Diffstat (limited to 'addons/web/static/src/js/fields/field_utils.js')
| -rw-r--r-- | addons/web/static/src/js/fields/field_utils.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/fields/field_utils.js b/addons/web/static/src/js/fields/field_utils.js index bbdee83c4f9..ec99f4fa0f6 100644 --- a/addons/web/static/src/js/fields/field_utils.js +++ b/addons/web/static/src/js/fields/field_utils.js @@ -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. |
