Skip to content
Snippets Groups Projects
Commit 3d87d79e authored by Nicolas Martinelli's avatar Nicolas Martinelli
Browse files

[FIX] l10n_fr_pos_cert: decrease quantity

In a French configuration, the decimal separator is a comma.
Unfortunately, `parseFloat` doesn't handle this case and incorrectly
parses the string.

Similar issue and correction than
https://github.com/odoo/enterprise/commit/af8177612e569907bcb8fe4b9ce2d845de5ab2a0



opw-2207795

closes odoo/odoo#46884

Signed-off-by: default avatarpimodoo <pimodoo@users.noreply.github.com>
parent b68139bf
No related branches found
No related tags found
No related merge requests found
......@@ -68,6 +68,7 @@ models.Orderline = models.Orderline.extend({
if (qty_decrease) {
var order = this.pos.get_order();
var selected_orderline = order.get_selected_orderline();
qty_decrease = qty_decrease.replace(_t.database.parameters.decimal_point, '.');
qty_decrease = parseFloat(qty_decrease);
var decimals = this.pos.dp['Product Unit of Measure'];
qty_decrease = round_di(qty_decrease, decimals);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment