Browse Source

[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."))
pull/790/head
Stefan Rijnhart 4 years ago
parent
commit
852c0e467b
  1. 3
      account_tax_balance/tests/test_account_tax_balance.py

3
account_tax_balance/tests/test_account_tax_balance.py

@ -168,7 +168,8 @@ class TestAccountTaxBalance(HttpCase):
self.env['account.move'].create({ self.env['account.move'].create({
'date': Date.context_today(self.env.user), 'date': Date.context_today(self.env.user),
'journal_id': self.env['account.journal'].search( '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', 'name': 'Test move',
'line_ids': [(0, 0, { 'line_ids': [(0, 0, {
'account_id': liquidity_account_id, 'account_id': liquidity_account_id,

Loading…
Cancel
Save