From c8c028ffcddc825d0232ea2ab7b1874e4be24742 Mon Sep 17 00:00:00 2001 From: Florian da Costa Date: Tue, 4 Apr 2023 13:11:50 +0200 Subject: [PATCH] [IMP] account_reconcile_oca: Take statement line payment ref instead of account move number (name) fot the counterpart account move line --- account_reconcile_oca/models/account_bank_statement_line.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/account_reconcile_oca/models/account_bank_statement_line.py b/account_reconcile_oca/models/account_bank_statement_line.py index 4fc7b683..17eda9dc 100644 --- a/account_reconcile_oca/models/account_bank_statement_line.py +++ b/account_reconcile_oca/models/account_bank_statement_line.py @@ -183,7 +183,7 @@ class AccountBankStatementLine(models.Model): and self.partner_id.name_get()[0] or False, "date": fields.Date.to_string(self.date), - "name": self.name, + "name": self.payment_ref or self.name, "amount": -total_amount, "credit": total_amount if total_amount > 0 else 0.0, "debit": -total_amount if total_amount < 0 else 0.0, @@ -396,7 +396,7 @@ class AccountBankStatementLine(models.Model): "account_id": account.name_get()[0], "partner_id": False, "date": fields.Date.to_string(self.date), - "name": self.name, + "name": self.payment_ref or self.name, "amount": -amount, "credit": amount if amount > 0 else 0.0, "debit": -amount if amount < 0 else 0.0,