From 852c0e467b7a8308484bb9ee6f2468fd73d2aa78 Mon Sep 17 00:00:00 2001 From: Stefan Rijnhart Date: Fri, 28 May 2021 14:35:55 +0200 Subject: [PATCH] [FIX] account_tax_balance: prevent multicompany glitch in tests Prevent selecting a journal from another company, resulting in UserError(_("Cannot create moves for different companies.")) --- account_tax_balance/tests/test_account_tax_balance.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/account_tax_balance/tests/test_account_tax_balance.py b/account_tax_balance/tests/test_account_tax_balance.py index 2b9b6647..a1d93c04 100644 --- a/account_tax_balance/tests/test_account_tax_balance.py +++ b/account_tax_balance/tests/test_account_tax_balance.py @@ -168,7 +168,8 @@ class TestAccountTaxBalance(HttpCase): self.env['account.move'].create({ 'date': Date.context_today(self.env.user), 'journal_id': self.env['account.journal'].search( - [('type', '=', 'bank')], limit=1).id, + [('type', '=', 'bank'), + ('company_id', '=', self.env.user.company_id.id)], limit=1).id, 'name': 'Test move', 'line_ids': [(0, 0, { 'account_id': liquidity_account_id,