[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] : a73390a42a

closes odoo/odoo#114639

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit is contained in:
Jorge Pinna Puissant
2023-03-08 10:31:15 +01:00
parent 0d2a80a071
commit bd2bf1a30f
@@ -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);