diff --git a/account_invoice_report_due_list/README.rst b/account_invoice_report_due_list/README.rst index 761de469d..6f13f8d59 100644 --- a/account_invoice_report_due_list/README.rst +++ b/account_invoice_report_due_list/README.rst @@ -78,6 +78,8 @@ Contributors * David Alonso +* Dhara Solanki + Maintainers ~~~~~~~~~~~ diff --git a/account_invoice_report_due_list/__manifest__.py b/account_invoice_report_due_list/__manifest__.py index 06fef344a..9470d377e 100644 --- a/account_invoice_report_due_list/__manifest__.py +++ b/account_invoice_report_due_list/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Account Invoice Report Due List", "summary": "Show multiple due data in invoice", - "version": "15.0.2.0.1", + "version": "16.0.1.0.0", "category": "Accounting", "website": "https://github.com/OCA/account-invoice-reporting", "author": "Tecnativa, Odoo Community Association (OCA)", diff --git a/account_invoice_report_due_list/models/account_move.py b/account_invoice_report_due_list/models/account_move.py index 094807d05..d063f1b66 100644 --- a/account_invoice_report_due_list/models/account_move.py +++ b/account_invoice_report_due_list/models/account_move.py @@ -28,13 +28,13 @@ def _compute_multi_date_due(self): def get_multi_due_list(self): self.ensure_one() if "in_" in self.move_type: - internal_type = "payable" + account_type = "liability_payable" elif "out_" in self.move_type: - internal_type = "receivable" + account_type = "asset_receivable" else: return [] due_move_line_ids = self.line_ids.filtered( - lambda ml: ml.account_id.internal_type == internal_type + lambda ml: ml.account_id.account_type == account_type ) if self.currency_id == self.company_id.currency_id: amount_field = "balance" diff --git a/account_invoice_report_due_list/readme/CONTRIBUTORS.rst b/account_invoice_report_due_list/readme/CONTRIBUTORS.rst index 61bbe683e..769d4c466 100644 --- a/account_invoice_report_due_list/readme/CONTRIBUTORS.rst +++ b/account_invoice_report_due_list/readme/CONTRIBUTORS.rst @@ -6,3 +6,5 @@ * `Solvos `_: * David Alonso + +* Dhara Solanki diff --git a/account_invoice_report_due_list/tests/test_invoice_report_due_list.py b/account_invoice_report_due_list/tests/test_invoice_report_due_list.py index ed45c1bf5..5530a0cfd 100644 --- a/account_invoice_report_due_list/tests/test_invoice_report_due_list.py +++ b/account_invoice_report_due_list/tests/test_invoice_report_due_list.py @@ -36,10 +36,9 @@ def setUpClass(cls): "value": "percent", "value_amount": 25.0, "days": 30, - "sequence": 10, }, ), - (0, 0, {"value": "balance", "days": 60, "sequence": 20}), + (0, 0, {"value": "balance", "days": 60}), ], } ) @@ -51,7 +50,7 @@ def setUpClass(cls): { "name": "Test Account", "code": "TEST", - "user_type_id": cls.env.ref("account.data_account_type_receivable").id, + "account_type": "asset_receivable", "reconcile": True, } ) @@ -59,9 +58,7 @@ def setUpClass(cls): { "name": "Test Account", "code": "ACC", - "user_type_id": cls.env.ref( - "account.data_account_type_other_income" - ).id, + "account_type": "liability_payable", "reconcile": True, } ) @@ -96,7 +93,7 @@ def test_due_list(self, move_type="out_invoice"): res = ( self.env["ir.actions.report"] ._get_report_from_name("account.report_invoice") - ._render_qweb_html(invoice.ids) + ._render_qweb_html("account.report_invoice", invoice.ids) ) self.assertRegex(str(res[0]), date_due_format) self.assertRegex(str(res[0]), "75.0") diff --git a/account_invoice_report_due_list/views/account_invoice_view.xml b/account_invoice_report_due_list/views/account_invoice_view.xml index a7a901103..4ea5a2af7 100644 --- a/account_invoice_report_due_list/views/account_invoice_view.xml +++ b/account_invoice_report_due_list/views/account_invoice_view.xml @@ -7,7 +7,6 @@ account.move - diff --git a/account_invoice_report_due_list/views/report_invoice.xml b/account_invoice_report_due_list/views/report_invoice.xml index 06ea3706a..d8bf5e53e 100644 --- a/account_invoice_report_due_list/views/report_invoice.xml +++ b/account_invoice_report_due_list/views/report_invoice.xml @@ -7,10 +7,7 @@ - +