diff --git a/addons/sale_product_configurator/static/src/js/product_configurator_widget.js b/addons/sale_product_configurator/static/src/js/product_configurator_widget.js index 7769a72fc90..b48d0f9274b 100644 --- a/addons/sale_product_configurator/static/src/js/product_configurator_widget.js +++ b/addons/sale_product_configurator/static/src/js/product_configurator_widget.js @@ -93,6 +93,7 @@ ProductConfiguratorWidget.include({ var self = this; this._super.apply(this, arguments); var parentList = self.getParent(); + var unselectRow = (parentList.unselectRow || function() {}).bind(parentList); // form view on mobile if (self.optionalProducts && self.optionalProducts.length !== 0) { self.trigger_up('add_record', { context: self._productsToRecords(self.optionalProducts), @@ -100,13 +101,13 @@ ProductConfiguratorWidget.include({ allowWarning: true, onSuccess: function () { // Leave edit mode of one2many list. - parentList.unselectRow(); + unselectRow(); } }); } else if (!self._isConfigurableLine() && self._isConfigurableProduct()) { // Leave edit mode of current line if line was configured // only through the product configurator. - parentList.unselectRow(); + unselectRow(); } },