summaryrefslogtreecommitdiff
path: root/addons/point_of_sale/static/src/js/models.js
diff options
context:
space:
mode:
authorRobin Heinz <rhe@odoo.com>2020-04-02 11:20:10 +0000
committerPierre Masereel <pim@odoo.com>2020-05-12 12:52:23 +0000
commit0e2aeb10af8b48312e1335865298e636cd29c1e2 (patch)
tree6bac007b83b99f708669de64f98ce1589ef5bb71 /addons/point_of_sale/static/src/js/models.js
parent85c11d1d40b5b54527fae5856c5884f4ad48fe7a (diff)
[IMP] point_of_sale,l10n_fr_pos_cert,pos_restaurant: new set quantity
For most localizations, decreasing quantity of an orderline is prohibited. This commit generalizes this behavior and is now available in core point_of_sale.
Diffstat (limited to 'addons/point_of_sale/static/src/js/models.js')
-rw-r--r--addons/point_of_sale/static/src/js/models.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js
index e4b7ee752c0..1a8d5fad652 100644
--- a/addons/point_of_sale/static/src/js/models.js
+++ b/addons/point_of_sale/static/src/js/models.js
@@ -1298,6 +1298,10 @@ exports.PosModel = Backbone.Model.extend({
const currency = this.currency || { decimals: 2 };
return `${Number(value.toFixed(currency.decimals || 0))}`;
},
+
+ disallowLineQuantityChange() {
+ return false;
+ }
});
/**