[FIX] sale_product_*: do not reset product on edition cancel
After opening the configurator wizard in "edit" mode (through the pencil icon shown next to the product in edit mode), if you clicked either on the "Cancel" button or on the "X" to leave/close the wizard, the product was reset on the SOline. Cancelling a modification should keep the state before the modification and not reset the line. This is a regression from the behavior in saas-12.3. closes odoo/odoo#93666 X-original-commit: 0f0d3a20910d20221f9b80fc290f743091ecd8b7 Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
This commit is contained in:
@@ -198,6 +198,7 @@ ProductConfiguratorWidget.include({
|
||||
this._super.apply(this, arguments);
|
||||
return;
|
||||
}
|
||||
this.restoreProductTemplateId = this.recordData.product_template_id;
|
||||
// If line has been set up through the product_configurator:
|
||||
this._openProductConfigurator({
|
||||
configuratorMode: 'edit',
|
||||
|
||||
@@ -54,6 +54,7 @@ ProductConfiguratorWidget.include({
|
||||
if (result && result[0].product_add_mode === 'matrix') {
|
||||
self._openGridConfigurator(productTemplateId, self.dataPointID, true);
|
||||
} else {
|
||||
self.restoreProductTemplateId = self.recordData.product_template_id;
|
||||
// Call super only if product_add_mode different than matrix
|
||||
// to avoid product configurator opening (which is the default case).
|
||||
self._openProductConfigurator({
|
||||
|
||||
Reference in New Issue
Block a user