Skip to content

Commit

Permalink
[MIG] account_invoice_blocking: Migration to 15.0
Browse files Browse the repository at this point in the history
  • Loading branch information
JordiBForgeFlow committed Oct 26, 2022
1 parent f2a4354 commit 7d79e94
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion account_invoice_blocking/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)",
Expand Down
16 changes: 8 additions & 8 deletions account_invoice_blocking/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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",
)
2 changes: 1 addition & 1 deletion account_invoice_blocking/views/account_move.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- Copyright 2016 Acsone SA/NV
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo>
<record id="account_invoice_form_view" model="ir.ui.view">
<record id="view_move_form" model="ir.ui.view">
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_move_form" />
<field name="arch" type="xml">
Expand Down

0 comments on commit 7d79e94

Please sign in to comment.