[FIX] account_banking_mandate: Fix tests

Tests were trying to write/access a field that does not exist in account.move.line, but in account.move

TT28423

account_banking_mandate 14.0.1.0.1
This commit is contained in:
João Marques
2021-02-25 13:36:56 +00:00
committed by Reyes4711
parent 6875657467
commit cbd24a7634
2 changed files with 3 additions and 3 deletions

View File

@@ -7,7 +7,7 @@
{
"name": "Account Banking Mandate",
"summary": "Banking mandates",
"version": "14.0.1.0.0",
"version": "14.0.1.0.1",
"license": "AGPL-3",
"author": "Compassion CH, "
"Tecnativa, "

View File

@@ -18,7 +18,7 @@ class TestInvoiceMandate(TransactionCase):
lambda s: s.account_id == self.invoice_account
)
if payable_move_lines:
self.assertEqual(payable_move_lines[0].mandate_id, self.mandate)
self.assertEqual(payable_move_lines[0].move_id.mandate_id, self.mandate)
self.env["account.invoice.payment.line.multi"].with_context(
active_model="account.move", active_ids=self.invoice.ids
@@ -62,7 +62,7 @@ class TestInvoiceMandate(TransactionCase):
)
if payable_move_lines:
with self.assertRaises(UserError):
payable_move_lines[0].mandate_id = mandate_2
payable_move_lines[0].move_id.mandate_id = mandate_2
def test_post_invoice_and_refund_02(self):
self.invoice._onchange_partner_id()