From 14ad517b1aafc2851ec34526844960b0220b7e81 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 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/account_payment_partner/tests/test_account_payment_partner.py b/account_payment_partner/tests/test_account_payment_partner.py index ec8dcf20d3d..171bd8938bf 100644 --- a/account_payment_partner/tests/test_account_payment_partner.py +++ b/account_payment_partner/tests/test_account_payment_partner.py @@ -31,11 +31,9 @@ def setUpClass(cls): cls.chart = charts[0] else: 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.chart.try_loading() - cls.env.user.company_id = old_company.id + cls.chart.try_loading(cls.company_2) # refs cls.manual_out = cls.env.ref("account.account_payment_method_manual_out")