diff --git a/addons/base_automation/static/src/js/base_automation_error_dialog.js b/addons/base_automation/static/src/js/base_automation_error_dialog.js index a0cc2c3b106..b3f19dd2528 100644 --- a/addons/base_automation/static/src/js/base_automation_error_dialog.js +++ b/addons/base_automation/static/src/js/base_automation_error_dialog.js @@ -31,7 +31,7 @@ export class BaseAutomationErrorDialog extends ErrorDialog { await this.orm.write("base.automation", [this.actionId], { active: false, }); - this.close(); + this.props.close(); } /** * This method is called when the user clicks on the 'Edit action' button @@ -50,10 +50,10 @@ export class BaseAutomationErrorDialog extends ErrorDialog { type: "ir.actions.act_window", view_mode: "form", }); - this.close(); + this.props.close(); } } -BaseAutomationErrorDialog.bodyTemplate = "base_automation.ErrorDialogBody"; +BaseAutomationErrorDialog.template = "base_automation.ErrorDialog"; registry.category("error_dialogs").add("base_automation", BaseAutomationErrorDialog); diff --git a/addons/base_automation/static/src/xml/base_automation_error_dialog.xml b/addons/base_automation/static/src/xml/base_automation_error_dialog.xml index e694dd3311c..5cb78ef1424 100644 --- a/addons/base_automation/static/src/xml/base_automation_error_dialog.xml +++ b/addons/base_automation/static/src/xml/base_automation_error_dialog.xml @@ -1,7 +1,7 @@ - +

The error occurred during the execution of the automated action diff --git a/addons/iap/static/src/js/insufficient_credit_error_handler.js b/addons/iap/static/src/js/insufficient_credit_error_handler.js index 3271daa7b54..eb3d0e41b71 100644 --- a/addons/iap/static/src/js/insufficient_credit_error_handler.js +++ b/addons/iap/static/src/js/insufficient_credit_error_handler.js @@ -3,11 +3,12 @@ import { Dialog } from "@web/core/dialog/dialog"; import { registry } from "@web/core/registry"; import { useService } from "@web/core/utils/hooks"; -class InsufficientCreditDialog extends Dialog { +const { Component, onWillStart } = owl; + +class InsufficientCreditDialog extends Component { setup() { - super.setup(...arguments); this.orm = useService("orm"); - owl.onWillStart(this.onWillStart); + onWillStart(this.onWillStart); } async onWillStart() { @@ -30,11 +31,11 @@ class InsufficientCreditDialog extends Dialog { buyCredits() { window.open(this.url, "_blank"); - this.close(); + this.props.close(); } } -InsufficientCreditDialog.bodyTemplate = "iap.redirect_to_odoo_credit"; -InsufficientCreditDialog.footerTemplate = "iap.InsufficientCreditFooter"; +InsufficientCreditDialog.components = { Dialog }; +InsufficientCreditDialog.template = "iap.InsufficientCreditDialog"; function insufficientCreditHandler(env, error, originalError) { if (!originalError) { diff --git a/addons/iap/static/src/xml/iap_templates.xml b/addons/iap/static/src/xml/iap_templates.xml index 6f9b6b1995f..2dbb2876cbd 100644 --- a/addons/iap/static/src/xml/iap_templates.xml +++ b/addons/iap/static/src/xml/iap_templates.xml @@ -2,24 +2,27 @@