From c426133fb941c8a17bd3fa550247c4c005dd3cd1 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Thu, 13 Oct 2016 13:03:13 +0200 Subject: [PATCH] [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 --- addons/account/models/chart_template.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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,