diff --git a/addons/account/static/src/components/account_move_send/account_move_send.js b/addons/account/static/src/components/account_move_send/account_move_send.js deleted file mode 100644 index 61cb4a24f2d..00000000000 --- a/addons/account/static/src/components/account_move_send/account_move_send.js +++ /dev/null @@ -1,22 +0,0 @@ -/** @odoo-module **/ - -import { registry } from "@web/core/registry"; -import { formView } from "@web/views/form/form_view"; -import { FormController } from "@web/views/form/form_controller"; - -export class AccountMoveSendController extends FormController { - - async beforeExecuteActionButton(clickParams) { - if (clickParams.name === "action_cancel" && this.model.root.isNew) { - clickParams.special = "cancel"; - } - return super.beforeExecuteActionButton(...arguments); - } -} - -export const AccountMoveSend = { - ...formView, - Controller: AccountMoveSendController, -}; - -registry.category("views").add("account_move_send_form", AccountMoveSend); diff --git a/addons/account/wizard/account_move_send_views.xml b/addons/account/wizard/account_move_send_views.xml index c0dee240ed1..77f536d1be0 100644 --- a/addons/account/wizard/account_move_send_views.xml +++ b/addons/account/wizard/account_move_send_views.xml @@ -6,7 +6,7 @@ account.move.send -
+