From bd2bf1a30ffe7fabf965cac856c63ae2d3f86ecd Mon Sep 17 00:00:00 2001 From: Jorge Pinna Puissant Date: Wed, 8 Mar 2023 07:53:16 +0000 Subject: [PATCH] [FIX] account: remove isVirtual Since [1] we removed the isVirtual function from the record, to use the equivalent isNew, this was made to avoid having two functions with equivalent behavior. This one was forgotten. [1] : a73390a42ad73db00dc1fa49c00603f1d8d4ca56 closes odoo/odoo#114639 Signed-off-by: Aaron Bohy (aab) --- .../src/components/account_move_send/account_move_send.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 index fb878b6486b..61cb4a24f2d 100644 --- 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 @@ -7,7 +7,7 @@ import { FormController } from "@web/views/form/form_controller"; export class AccountMoveSendController extends FormController { async beforeExecuteActionButton(clickParams) { - if (clickParams.name === "action_cancel" && this.model.root.isVirtual) { + if (clickParams.name === "action_cancel" && this.model.root.isNew) { clickParams.special = "cancel"; } return super.beforeExecuteActionButton(...arguments);