From 5e93455bbf0b7f926e6579d9cbae617df45ec0e3 Mon Sep 17 00:00:00 2001 From: Eduardo De Miguel Date: Wed, 27 Nov 2024 13:34:48 +0100 Subject: [PATCH] [FIX] account_chart_update: Write Chart Template on Company only when changes --- account_chart_update/wizard/wizard_chart_update.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/account_chart_update/wizard/wizard_chart_update.py b/account_chart_update/wizard/wizard_chart_update.py index 6d3949247f0..637f1ac4273 100644 --- a/account_chart_update/wizard/wizard_chart_update.py +++ b/account_chart_update/wizard/wizard_chart_update.py @@ -433,8 +433,9 @@ def action_update_records(self): self._update_taxes_pending_for_accounts(todo_dict) if self.update_fiscal_position and perform_rest: self._update_fiscal_positions() - # Store new chart in the company - self.company_id.chart_template_id = self.chart_template_id + # Store new chart in the company if has been changed + if self.company_id.chart_template_id != self.chart_template_id: + self.company_id.chart_template_id = self.chart_template_id _logger.removeHandler(handler) self.log = log_output.getvalue() # Check if errors where detected and wether we should stop.