[FIX] l10n_fr_pos_cert: bind disallowLineQuantityChange

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) <wan@odoo.com>
This commit is contained in:
Robin Heinz
2021-08-04 17:43:12 +00:00
parent dbefe34af5
commit 53ff2c5fd9
+1 -1
View File
@@ -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;
}
});