[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#46945 X-original-commit: 3d87d79ecec92cafd7f964712ad0014add5cbb6a Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user