From b6dfc455cc52d895a7c57af9f5c5603094d1bfef Mon Sep 17 00:00:00 2001 From: "Gauthier Wala (gawa)" Date: Thu, 20 Jul 2023 09:27:19 +0000 Subject: [PATCH] [FIX] account: Fix tour in multi enterprise MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The tour failed as soon as there were several companies installed. The tax created could be assigned to the wrong company, and as such, not used in the tour. Linked to runbot error 22953 closes odoo/odoo#130281 X-original-commit: a4ad0a8f36f4091da5de99c5a54326dce3784817 Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) Signed-off-by: Xavier Dollé (xdo) --- addons/account/tests/test_tour.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/account/tests/test_tour.py b/addons/account/tests/test_tour.py index db22018d7a6..3f831a9a0bf 100644 --- a/addons/account/tests/test_tour.py +++ b/addons/account/tests/test_tour.py @@ -41,11 +41,15 @@ class TestUi(odoo.tests.HttpCase): def test_01_account_tax_groups_tour(self): product = self.env.ref('product.product_product_5') + company_used = self.env.companies.sorted(lambda c: c.id)[0] new_tax = self.env['account.tax'].create({ 'name': '10% Tour Tax', 'type_tax_use': 'purchase', 'amount_type': 'percent', 'amount': 10, + 'company_id': company_used.id, + 'country_id': company_used.account_fiscal_country_id.id }) product.supplier_taxes_id = new_tax + self.start_tour("/web", 'account_tax_group', login="admin")