From f1bf8dafbb253cb8f3c4e2d402524b61139f65b8 Mon Sep 17 00:00:00 2001 From: pilarvargas-tecnativa Date: Mon, 19 Feb 2024 10:20:35 +0100 Subject: [PATCH] [FIX] account_check_printing_report_base: fix test to use correct payment method line in account payment TT47880 --- .../tests/test_check_printing_report.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/account_check_printing_report_base/tests/test_check_printing_report.py b/account_check_printing_report_base/tests/test_check_printing_report.py index 043dcee28e77..c56d76972e83 100644 --- a/account_check_printing_report_base/tests/test_check_printing_report.py +++ b/account_check_printing_report_base/tests/test_check_printing_report.py @@ -21,6 +21,7 @@ def setUpClass(cls): cls.account_invoice_model = cls.env["account.move"] cls.journal_model = cls.env["account.journal"] cls.payment_method_model = cls.env["account.payment.method"] + cls.payment_method_line_model = cls.env["account.payment.method.line"] cls.account_account_model = cls.env["account.account"] cls.payment_model = cls.env["account.payment"] cls.report = cls.env[ @@ -63,9 +64,13 @@ def setUpClass(cls): "type": "bank", "code": "bank", "check_manual_sequencing": True, - # "outbound_payment_method_ids": [ - # (4, cls.payment_method_check.id, None) - # ], + } + ) + cls.payment_method_line_check = cls.payment_method_line_model.create( + { + "name": "Check", + "payment_method_id": cls.payment_method_check.id, + "journal_id": cls.bank_journal.id, } ) cls.acc_payable = cls._create_account( @@ -85,7 +90,7 @@ def setUpClass(cls): { "date": time.strftime("%Y") + "-07-15", "journal_id": cls.bank_journal.id, - "payment_method_line_id": cls.payment_method_check.id, + "payment_method_line_id": cls.payment_method_line_check.id, } ) register_payments.action_post()