summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Martinelli <nim@odoo.com>2016-10-13 13:03:13 +0200
committerNicolas Martinelli <nim@odoo.com>2016-10-14 08:27:57 +0200
commitc426133fb941c8a17bd3fa550247c4c005dd3cd1 (patch)
treea52e8467880a998d69c629f8cfccb24044df872b
parenta4143dae1d19cfb4aa1b59884863f077ca565e4a (diff)
[FIX] account: cash with multiple COA
- Set multi company - Create 2 new companies - Set a chart of account for company 1 (ex Belgium) - Set another chart of account for company 2 (ex UK) This is because the generation of accounts from templates doesn't restrict the accounts to the current one. opw-690796
-rw-r--r--addons/account/models/chart_template.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/account/models/chart_template.py b/addons/account/models/chart_template.py
index 0bf832c133d..599c507c77b 100644
--- a/addons/account/models/chart_template.py
+++ b/addons/account/models/chart_template.py
@@ -399,7 +399,9 @@ class AccountChartTemplate(models.Model):
:rtype: dict
"""
self.ensure_one()
- account_reconcile_models = self.env['account.reconcile.model.template'].search([])
+ account_reconcile_models = self.env['account.reconcile.model.template'].search([
+ ('account_id.chart_template_id', '=', self.id)
+ ])
for account_reconcile_model in account_reconcile_models:
vals = {
'name': account_reconcile_model.name,