Skip to content

Commit

Permalink
[MIG] account_move_reconcile_forbid_cancel: Migration to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ACheung-FactorLibre committed Jul 19, 2023
1 parent 7cd341b commit 8a01615
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion account_move_reconcile_forbid_cancel/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{
"name": "Account Move Reconcile Forbid Cancel",
"version": "15.0.1.0.0",
"version": "16.0.1.0.0",
"category": "Finance",
"website": "https://github.com/OCA/account-reconcile",
"author": "Tecnativa, Odoo Community Association (OCA)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class AccountMove(models.Model):

def _get_receivable_payable_lines(self):
return self.line_ids.filtered(
lambda l: l.account_internal_type in ["receivable", "payable"],
lambda l: l.account_type in ["asset_receivable", "liability_payable"],
)

def button_draft(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,33 +17,31 @@ def setUpClass(cls):
{
"name": "Receivable Account",
"code": "REC",
"user_type_id": cls.env.ref("account.data_account_type_receivable").id,
"account_type": "asset_receivable",
"reconcile": True,
}
)
payable_account = cls.env["account.account"].create(
{
"name": "Payable Account",
"code": "PAY",
"user_type_id": cls.env.ref("account.data_account_type_payable").id,
"account_type": "liability_payable",
"reconcile": True,
}
)
income_account = cls.env["account.account"].create(
{
"name": "Income Account",
"code": "INC",
"user_type_id": cls.env.ref(
"account.data_account_type_other_income"
).id,
"account_type": "income",
"reconcile": False,
}
)
expense_account = cls.env["account.account"].create(
{
"name": "Expense Account",
"code": "EXP",
"user_type_id": cls.env.ref("account.data_account_type_expenses").id,
"account_type": "expense",
"reconcile": False,
}
)
Expand Down

0 comments on commit 8a01615

Please sign in to comment.