From d552b7c71364b2e928d1eef95cda277979041dc2 Mon Sep 17 00:00:00 2001 From: Lois Rilo Date: Thu, 24 Mar 2022 17:59:37 +0100 Subject: [PATCH] [FIX] account_chart_update: do not match twice the same repartition line When updating a tax with several repartition lines, the same existing candidates were considered in all iteration which could lead the wizard to match the same repartition line with different lines of the template and not detecting any change to do. --- account_chart_update/wizard/wizard_chart_update.py | 1 + 1 file changed, 1 insertion(+) diff --git a/account_chart_update/wizard/wizard_chart_update.py b/account_chart_update/wizard/wizard_chart_update.py index 2259c3f16..f9f6678ed 100644 --- a/account_chart_update/wizard/wizard_chart_update.py +++ b/account_chart_update/wizard/wizard_chart_update.py @@ -464,6 +464,7 @@ class WizardUpdateChartsAccounts(models.TransientModel): existing_candidates = current_repartition.filtered( lambda r: r.factor_percent == factor_percent and r.repartition_type == repartition_type + and r.id not in existing_ids ) if len(existing_candidates) == 1: existing = existing_candidates