Skip to content

Commit

Permalink
[FIX] product_configurator: Wizard reset
Browse files Browse the repository at this point in the history
  • Loading branch information
SirAionTech committed Oct 23, 2024
1 parent 955a074 commit 44659d5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
1 change: 1 addition & 0 deletions product_configurator/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"assets": {
"web.assets_backend": [
"/product_configurator/static/src/scss/form_widget.scss",
"/product_configurator/static/src/js/form_controller.esm.js",
"/product_configurator/static/src/js/form_widgets.js",
"/product_configurator/static/src/js/boolean_button_widget.esm.js",
"/product_configurator/static/src/js/boolean_button_widget.xml",
Expand Down
14 changes: 14 additions & 0 deletions product_configurator/static/src/js/form_controller.esm.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/** @odoo-module **/

import {FormController} from "@web/views/form/form_controller";
import {patch} from "@web/core/utils/patch";

patch(FormController.prototype, "Manage special=no_save", {
async beforeExecuteActionButton(clickParams) {
if (clickParams.special === "no_save") {
delete clickParams.special;
return true;
}
return this._super(...arguments);
},
});
8 changes: 0 additions & 8 deletions product_configurator/static/src/js/form_widgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,6 @@ odoo.define("product_configurator.FieldBooleanButton", function (require) {
record_ctx
);
}
if (attrs.special === "no_save") {
this.canBeSaved = function () {
return true;
};
var event_no_save = $.extend(true, {}, event);
event_no_save.data.attrs.special = false;
return this._super(event_no_save);
}
this._super(event);
},
});
Expand Down

0 comments on commit 44659d5

Please sign in to comment.