-
- Downloads
[FIX] point_of_sale: fix decimal button in lang with not dot decimal
- Activate debug mode
- Go to Settings > Translations > Languages
- Activate and switch to a language that does not use dot (.) as decimal separator (i.e. French)
- Go to a POS session
- Select a Product, edit the price with a decimal via the Numpad widget
The decimal is not taken into account.
This is due to the fact that the entered input ('.') is not considered as the decimal point
in this language (i.e. ',') and is skipped.
The same issue happens for quantity and discount.
The dot in the Numpad widget has been replaced by the decimal separator of the language.
Also "field_utils.parse.float" has to be used instead of "parseFloat" because "parseFloat" only
recognizes a dot as separator. (i.e. "parseFloat" returns 12.00 for "12,99")
Howerver "parseFloat" is still useful for checking values as "field_utils.parse.float" returns
an error if its parameter is not a string or if the parsed result is not a number.
opw-2357848
closes odoo/odoo#59665
Signed-off-by:
Nicolas Martinelli (nim) <nim@odoo.com>
Showing
- addons/point_of_sale/static/src/js/Misc/NumberBuffer.js 2 additions, 2 deletionsaddons/point_of_sale/static/src/js/Misc/NumberBuffer.js
- addons/point_of_sale/static/src/js/Screens/ProductScreen/NumpadWidget.js 3 additions, 0 deletions..._sale/static/src/js/Screens/ProductScreen/NumpadWidget.js
- addons/point_of_sale/static/src/js/models.js 5 additions, 3 deletionsaddons/point_of_sale/static/src/js/models.js
- addons/point_of_sale/static/src/xml/Screens/ProductScreen/NumpadWidget.xml 3 additions, 1 deletion...ale/static/src/xml/Screens/ProductScreen/NumpadWidget.xml
Loading
Please register or sign in to comment