[IMP] account_invoice_update_wizard: Migration to 14.0

This commit is contained in:
Khoi Vo
2022-03-15 16:00:51 +07:00
parent fdef51ea57
commit 686c6f3900
12 changed files with 254 additions and 336 deletions

View File

@@ -0,0 +1,19 @@
# Copyright 2019-2022 Camptocamp
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
class AccountMove(models.Model):
_inherit = 'account.move'
def prepare_update_wizard(self):
self.ensure_one()
wizard = self.env['account.move.update']
res = wizard._prepare_default_get(self)
action = self.env.ref(
'account_invoice_update_wizard.account_invoice_update_action'
).read()[0]
action['name'] = "Update Wizard"
action['res_id'] = wizard.create(res).id
return action