summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/fields
diff options
context:
space:
mode:
authorAndrea Grazioso (agr-odoo) <agr@odoo.com>2020-05-04 10:40:05 +0000
committerAndrea Grazioso (agr-odoo) <agr@odoo.com>2020-05-08 09:31:12 +0000
commitf0afe7420afad3635887731e4c03aa1a2f93e089 (patch)
treef2aa2d9c50ce243713080bf18d1851b7bef57747 /addons/web/static/src/js/fields
parent68584351e4be49b0b0085e582271c655bdfb1585 (diff)
[FIX] pos_discount: correctly get discount amount
Activate a language which has comma as decimal separator Go into POS settings, activate 'Global Discount'. Open POS session, add some product and use global discount. Input some number with decimals and confirm. Discount will be not applied This occur because of javascript type coercion: Math.min(100, "11.0") -> 11 Math.min(100, "11,0") -> NaN So in locales with thousands separator the statement would produce different results. Forcing float parsing fix the issue opw-2243482 closes odoo/odoo#50900 X-original-commit: 84a6c2a59c59b88b0ad7b1f9112d331fa2a505c5 Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/fields')
0 files changed, 0 insertions, 0 deletions