Skip to content

Commit

Permalink
[FIX] l10n_it_bill_of_entry: Multi company management in tests
Browse files Browse the repository at this point in the history
The user must be logged in only one company for the tests to behave as expected.
For instance, searching for a journal should only find journals in the current company
  • Loading branch information
SirAionTech committed Jun 5, 2024
1 parent 5995d0f commit 4ac648c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions l10n_it_bill_of_entry/tests/test_bill_of_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ def setUp(self):
demo_data_company = self.env.ref("base.main_company")
self.env.user.company_ids |= demo_data_company
self.env.user.company_id = demo_data_company
# Now that current user can access the company,
# log the user *only* in this company so that
# searching, reading and other operations behave as expected
self.env.user.company_ids = demo_data_company

# Default accounts for invoice line account_id
self.account_revenue = self.account_model.search(
Expand Down

0 comments on commit 4ac648c

Please sign in to comment.