From 943b60c98b59b00d3724a9bb6f06d229cd1c4e82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Mart=C3=ADnez?= Date: Tue, 19 Nov 2024 13:44:34 +0100 Subject: [PATCH] [FIX] account_payment_partner: Fix tests compatibility (hr_expense + partner_multi_company) --- .../tests/test_account_payment_partner.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/account_payment_partner/tests/test_account_payment_partner.py b/account_payment_partner/tests/test_account_payment_partner.py index 0600972080c..0f30282d425 100644 --- a/account_payment_partner/tests/test_account_payment_partner.py +++ b/account_payment_partner/tests/test_account_payment_partner.py @@ -31,14 +31,11 @@ def setUpClass(cls): ) if not chart: raise ValidationError(_("No Chart of Account Template has been defined !")) - old_company = cls.env.user.company_id - cls.env.user.company_id = cls.company_2.id + cls.env.user.company_ids = [(4, cls.company_2.id)] cls.env.ref("base.user_admin").company_ids = [(4, cls.company_2.id)] cls.env["account.chart.template"].try_loading( - "generic_coa", company=cls.company, install_demo=False + "generic_coa", company=cls.company_2, install_demo=False ) - cls.env.user.company_id = old_company.id - # refs cls.manual_out = cls.env.ref("account.account_payment_method_manual_out") cls.manual_out.bank_account_required = True