[FIX] account_reconcile_oca: Fixed analytic distribution update

This fixes a bug that occurred when both account_reconcile_oca and account_reconcile_model_oca modules were installed. The issue arose when assigning an analytic account and making no further changes, causing the analytic account to not be set correctly. As a result, the reconciliation process failed to create the analytic entries properly. This line: ensures that if the analytic distribution has changed, it will be correctly updated.
pull/808/head
bobrador 2024-12-16 11:46:45 +01:00 committed by Jordi Ballester Alomar
parent 09b42b2f1c
commit 3b72107e01
1 changed files with 1 additions and 0 deletions

View File

@ -284,6 +284,7 @@ class AccountBankStatementLine(models.Model):
or self.manual_name != line["name"]
or (self.manual_partner_id and self.manual_partner_id.display_name or False)
!= line.get("partner_id")
or self.analytic_distribution != line.get("analytic_distribution", False)
)
def _get_manual_delete_vals(self):