Skip to content
Snippets Groups Projects
Commit a1543d2a authored by Anh Thao Pham (pta)'s avatar Anh Thao Pham (pta)
Browse files

[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: default avatarNicolas Martinelli (nim) <nim@odoo.com>
parent 7f7f9c6c
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment