From 4996c70cbd3fa38b820eb1853b0a33bc218c61da Mon Sep 17 00:00:00 2001 From: "Claire Bretton (clbr)" Date: Mon, 11 Dec 2023 10:18:09 +0100 Subject: [PATCH] [FIX] account: remove dead code from Send & Print wizard In Send & Print refactoring : part 1 (https://github.com/odoo/odoo/commit/33625269062d50e52fe2e0d8cf4a6df788e93062) we changed the wizard back to a transient model, making the special handling of the cancel useless therefore the custom form is now irrelevant. closes odoo/odoo#145717 Signed-off-by: Laurent Smet (las) --- .../account_move_send/account_move_send.js | 22 ------------------- .../wizard/account_move_send_views.xml | 2 +- 2 files changed, 1 insertion(+), 23 deletions(-) delete mode 100644 addons/account/static/src/components/account_move_send/account_move_send.js 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 -
+