diff --git a/account_move_reconcile_helper/__manifest__.py b/account_move_reconcile_helper/__manifest__.py index 227dfc12..701e5844 100644 --- a/account_move_reconcile_helper/__manifest__.py +++ b/account_move_reconcile_helper/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Account Move Reconcile Helper", "summary": "Provides tools to facilitate reconciliation", - "version": "13.0.1.0.0", + "version": "14.0.1.0.0", "license": "AGPL-3", "author": "ACSONE SA/NV, Odoo Community Association (OCA)", "website": "https://github.com/OCA/account-reconcile", diff --git a/account_move_reconcile_helper/models/account_move_line.py b/account_move_reconcile_helper/models/account_move_line.py index 0e36461b..d4b3c548 100644 --- a/account_move_reconcile_helper/models/account_move_line.py +++ b/account_move_reconcile_helper/models/account_move_line.py @@ -1,29 +1,19 @@ # Copyright 2017 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from odoo import api, fields, models +from odoo import fields, models class AccountMoveLine(models.Model): _inherit = "account.move.line" - partial_reconciliation_in_progress = fields.Boolean( - compute="_compute_partial_reconciliation_in_progress" - ) reconcile_line_ids = fields.One2many( compute="_compute_reconciled_lines", comodel_name="account.move.line", string="Reconciled lines", ) - @api.depends("matched_debit_ids", "matched_credit_ids") - def _compute_partial_reconciliation_in_progress(self): - for rec in self: - rec.partial_reconciliation_in_progress = bool( - rec.matched_debit_ids - ) or bool(rec.matched_credit_ids) - def _compute_reconciled_lines(self): for rec in self: rec.reconcile_line_ids = rec._get_reconciled_lines() diff --git a/account_move_reconcile_helper/tests/test_account_move_reconcile_helper.py b/account_move_reconcile_helper/tests/test_account_move_reconcile_helper.py index 27ef0be3..9c43657b 100644 --- a/account_move_reconcile_helper/tests/test_account_move_reconcile_helper.py +++ b/account_move_reconcile_helper/tests/test_account_move_reconcile_helper.py @@ -37,8 +37,7 @@ class TestAccountMoveReconcileHelper(TransactionCase): "name": "Sales journal", "code": "MRH-SAJT", "type": "sale", - "default_credit_account_id": self.account_sale.id, - "default_debit_account_id": self.account_sale.id, + "default_account_id": self.account_sale.id, } ) @@ -82,13 +81,13 @@ class TestAccountMoveReconcileHelper(TransactionCase): ("account_id", "=", self.account_recv.id), ] ) - + lines.mapped("move_id").action_post() lines.reconcile() # For v13, need to force compute lines._compute_reconciled_lines() for line in lines: - self.assertEquals(line.reconcile_line_ids, lines) + self.assertEqual(line.reconcile_line_ids, lines) def test_02_full_reconcile(self): base_move = self.create_account_move(5000, self.account_recv, self.account_sale) @@ -102,13 +101,13 @@ class TestAccountMoveReconcileHelper(TransactionCase): ("account_id", "=", self.account_recv.id), ] ) - + lines.mapped("move_id").action_post() lines.reconcile() # For v13, need to force compute lines._compute_reconciled_lines() for line in lines: - self.assertEquals(line.reconcile_line_ids, lines) - self.assertEquals( + self.assertEqual(line.reconcile_line_ids, lines) + self.assertEqual( line.full_reconcile_id.reconciled_line_ids, line.reconcile_line_ids ) diff --git a/account_move_reconcile_helper/views/account_move_line.xml b/account_move_reconcile_helper/views/account_move_line.xml index 7c6c6e82..ff0f0960 100644 --- a/account_move_reconcile_helper/views/account_move_line.xml +++ b/account_move_reconcile_helper/views/account_move_line.xml @@ -9,16 +9,26 @@ account.move.line - - +