-
- Downloads
[FIX] web: parseMonetary with NBSP as a thousands separator
Steps to reproduce: - Switch odoo language to french - Create a client bill for Azure Interior of $1 000 000 - Confirm it - Go to the accounting dashboard - On the bank, click on reconcile - Select Azure interior - Click on the correct bill - Switch to Manual operations -> $1 000 000 is not a correct monetary field Cause of the issue: Recently in https://github.com/odoo/odoo/pull/94126 , `formatMonetary` switched from joining the currency and symbol from ` ` to a non breaking space, NBSP. To parse monetary values, the behavior was to split around NBSP to get the symbol on one side and the value on the other which is then passed to `parseFloat`. For the following examples, NBSP is replaced with an underscore. So `$_1000` becomes `$, 1000` But some languages such as french uses the same char as thousands separator. In that case, `$_1_000` becomes `$, 1, 000` and then the parse fails. opw-2937403 closes odoo/odoo#97425 Signed-off-by:Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Please register or sign in to comment