From 67c444bb3871a9369f5b7cd2336765e248a61357 Mon Sep 17 00:00:00 2001 From: qdp-odoo Date: Mon, 11 Apr 2016 14:14:11 +0200 Subject: [PATCH] [FIX] account: Don't create journals several times with hierarchical account charts. Courtesy of pedrobaeza. PR #11491 --- addons/account/models/chart_template.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/account/models/chart_template.py b/addons/account/models/chart_template.py index 8f250456522..2d16697bc3a 100644 --- a/addons/account/models/chart_template.py +++ b/addons/account/models/chart_template.py @@ -319,8 +319,9 @@ class AccountChartTemplate(models.Model): 'account_id': account_ref.get(value['account_id'], False), }) - # Create Journals - self.generate_journals(account_ref, company) + # Create Journals - Only done for root chart template + if not self.parent_id: + self.generate_journals(account_ref, company) # generate properties function self.generate_properties(account_ref, company)