-
Notifications
You must be signed in to change notification settings - Fork 25.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[8.0 ]BAD BUG!!! wrong decimal separator in automatic return entry (german numbers) #9395
Comments
?? @beledouxdenis did you have the chance to look at this problem? |
This is also affecting SPANISH (odoo_9.0.201511232). Looks like the on-screen keyboard is not using the locale settings? |
@msmarino have you been able to fix it in your installation? |
Truly, I haven't tried. I don't program in python... El mié., 16 dic. 2015 17:13, Thomas [email protected] escribió:
|
does this potentially business-destroying bug still exist or did you just abandon? |
I have done no further testing on this bug. El mar., 12 ene. 2016 15:24, COLABORATI [email protected] escribió:
|
Have a look here odoomrp/odoomrp-utils#57 |
doesn't work for this bug... |
No it's not... 😞 |
@liebana @msmarino @COLABORATI |
When we render the payment screen the current value of the current paymentline is rendered to a string using Paymentline.get_amount_str(). This conversion always rendered numbers with a decimal separator of '.' because it just used Number.toFixed(). This used to be fine but 5a10903 made the POS adhere to the set decimal and thousands separator. Because of this, the POS now has to parse the input with web.parse_value() which takes into account these separators. When parse_value() parses a float it first deletes the thousands separators and then replaces the decimal separator with '.' before it gets cast to a Number. In German (and other languages), the '.' is used as a thousands separator which means that it will get deleted by parse_value() so you'll end up with '12.34' being interpreted as '1234'. Because of this it is important that we ensure that the default value that appears in the input uses the correct separators. The aforementioned issue only occurs when the user changes the default value in the paymentline. Only then does a conversion take place from String to Number. So just clicking on a payment method of type 'Bank' and validating it would work fine, only when the payment amount was updated would the issue occur. Fixes odoo#9395 Closes odoo#10952 note: this should not be forward-ported to >8.0 because later versions use the rewritten payment screen which is completely different from the one in 8.0.
When we render the payment screen the current value of the current paymentline is rendered to a string using Paymentline.get_amount_str(). This conversion always rendered numbers with a decimal separator of '.' because it just used Number.toFixed(). This used to be fine but 5a10903 made the POS adhere to the set decimal and thousands separator. Because of this, the POS now has to parse the input with web.parse_value() which takes into account these separators. When parse_value() parses a float it first deletes the thousands separators and then replaces the decimal separator with '.' before it gets cast to a Number. In German (and other languages), the '.' is used as a thousands separator which means that it will get deleted by parse_value() so you'll end up with '12.34' being interpreted as '1234'. Because of this it is important that we ensure that the default value that appears in the input uses the correct separators. The aforementioned issue only occurs when the user changes the default value in the paymentline. Only then does a conversion take place from String to Number. So just clicking on a payment method of type 'Bank' and validating it would work fine, only when the payment amount was updated would the issue occur. Fixes #9395 Closes #10952 note: this should not be forward-ported to >8.0 because later versions use the rewritten payment screen which is completely different from the one in 8.0.
Thanks for your report, fixed in dda904c. |
in german numbers we have it like this:
9.9999,99
in english it would be like this
99999.99
In Odoo POS usually we use german decimal separators which is a "," (comma) and not a "." (dot).
In any recent update the dot is automatically added to our EC-Card Journal as decimal separator and not the comma as usual.
Means:
POS Cart has 58,99 - we hit EC-Card payment, automatically there is 58.99 in the payment form which means 5899,00 and Odoo takes the difference (5840,01) as cash return...
Manually changing the dot to a comma is working but not the solution...
If somebody is not really taking care this means a lot of trouble...
BAD BUG!
The text was updated successfully, but these errors were encountered: