2
0

[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.
This commit is contained in:
Lois Rilo 2022-03-24 17:59:37 +01:00 committed by Luis J. Salvatierra
parent 3707eede1f
commit 236a764c99

View File

@ -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