From 53ff2c5fd915fc703128a6a150c4df8ccba6d589 Mon Sep 17 00:00:00 2001 From: Robin Heinz Date: Fri, 23 Jul 2021 11:52:38 +0000 Subject: [PATCH] [FIX] l10n_fr_pos_cert: bind disallowLineQuantityChange MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When using several certification together, there was an issue when we tried to modify the quantity of an orderline. The "this" context was lost and we were unable to call the function anymore. In order to fix that, we bind the context when calling the function. closes odoo/odoo#74725 X-original-commit: 183c3cfded14e716781ae701ec92e2ba68808eb7 Related: odoo/enterprise#20070 Signed-off-by: William André (wan) --- addons/l10n_fr_pos_cert/static/src/js/pos.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/l10n_fr_pos_cert/static/src/js/pos.js b/addons/l10n_fr_pos_cert/static/src/js/pos.js index 502e5f98cf4..86dc047ed14 100644 --- a/addons/l10n_fr_pos_cert/static/src/js/pos.js +++ b/addons/l10n_fr_pos_cert/static/src/js/pos.js @@ -36,7 +36,7 @@ models.PosModel = models.PosModel.extend({ }, disallowLineQuantityChange() { - let result = _super_posmodel.disallowLineQuantityChange(); + let result = _super_posmodel.disallowLineQuantityChange.bind(this)(); return this.is_french_country() || result; } });