summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwan <wan@odoo.com>2021-05-20 11:51:11 +0000
committerwan <wan@odoo.com>2021-05-20 11:51:11 +0000
commitf5651baa86d0537665d5b1bc2b8b51e1a803d141 (patch)
treed17520bdc580594d4eac59945710c4b434179f23
parent6e084cefb62fdc94b94d0ef573dce28bfe8961e1 (diff)
[FIX] account: test taxes taking companies into account
When multiple companies are created, and some taxes are used with the same tages, the query is not precise enough.
-rw-r--r--addons/account/tests/test_account_move_reconcile.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/addons/account/tests/test_account_move_reconcile.py b/addons/account/tests/test_account_move_reconcile.py
index 1ef615b88f7..99a5a5eebd0 100644
--- a/addons/account/tests/test_account_move_reconcile.py
+++ b/addons/account/tests/test_account_move_reconcile.py
@@ -212,8 +212,11 @@ class TestAccountMoveReconcile(AccountTestInvoicingCommon):
FROM account_account_tag_account_move_line_rel rel
JOIN account_move_line line ON line.id = rel.account_move_line_id
WHERE line.tax_exigible IS TRUE
+ AND line.company_id IN %(company_ids)s
GROUP BY rel.account_account_tag_id
- ''')
+ ''', {
+ 'company_ids': tuple(self.env.companies.ids),
+ })
for tag_id, total_balance in self.cr.fetchall():
tag, expected_balance = expected_values[tag_id]