[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
This commit is contained in:
Nicolas Martinelli
2016-10-14 08:27:57 +02:00
parent a4143dae1d
commit c426133fb9
+3 -1
View File
@@ -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,