mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user