diff --git a/account_invoice_blocking/__manifest__.py b/account_invoice_blocking/__manifest__.py index bb43fe58a18..e14f6f4963d 100644 --- a/account_invoice_blocking/__manifest__.py +++ b/account_invoice_blocking/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Account Invoice Blocking", "summary": "Set a blocking (No Follow-up) flag on invoices", - "version": "15.0.1.0.0", + "version": "15.0.1.0.1", "license": "AGPL-3", "category": "Accounting", "author": "Acsone SA/NV,Odoo Community Association (OCA)", diff --git a/account_invoice_blocking/models/account_move.py b/account_invoice_blocking/models/account_move.py index 735901db6f2..954aa68b9e6 100644 --- a/account_invoice_blocking/models/account_move.py +++ b/account_invoice_blocking/models/account_move.py @@ -4,9 +4,16 @@ from odoo import api, fields, models -class AccountInvoice(models.Model): +class AccountMove(models.Model): _inherit = "account.move" + blocked = fields.Boolean( + "No Follow-up", + states={"draft": [("readonly", True)]}, + compute="_compute_move_blocked", + inverse="_inverse_move_blocked", + ) + def _get_move_line(self): """ This method searches for payable or receivable move line @@ -49,10 +56,3 @@ def _compute_move_blocked(self): move.blocked = ( all(line.blocked for line in move_lines) if move_lines else False ) - - blocked = fields.Boolean( - "No Follow-up", - states={"draft": [("readonly", True)]}, - compute="_compute_move_blocked", - inverse="_inverse_move_blocked", - ) diff --git a/account_invoice_blocking/views/account_move.xml b/account_invoice_blocking/views/account_move.xml index 4b65534e387..e9a559accab 100644 --- a/account_invoice_blocking/views/account_move.xml +++ b/account_invoice_blocking/views/account_move.xml @@ -2,7 +2,7 @@ - + account.move