Skip to content

Commit

Permalink
[FIX] account_payment_partner: Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
etobella committed Jan 15, 2025
1 parent b194b2c commit c895718
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions account_payment_partner/tests/test_account_payment_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -572,15 +572,17 @@ def test_account_move_payment_mode_id_default(self):
move_form = Form(
self.move_model.with_context(
default_name="Invoice test", default_move_type="out_invoice"
)
).with_company(self.env.ref("base.main_company").id)
)
self.assertFalse(move_form.payment_mode_id)
self.env["ir.default"].create(
{"field_id": field.id, "json_value": payment_mode.id}
)
self.env["ir.default"].with_company(
self.env.ref("base.main_company").id
).create({"field_id": field.id, "json_value": payment_mode.id})
move_form = Form(
self.move_model.with_context(
default_name="Invoice test", default_move_type="out_invoice"
)
default_name="Invoice test",
default_move_type="out_invoice",
default_company_id=self.env.ref("base.main_company").id,
).with_company(self.env.ref("base.main_company").id)
)
self.assertEqual(move_form.payment_mode_id, payment_mode)

0 comments on commit c895718

Please sign in to comment.