From 0b19dc332bcaf4fbcc2fc4ead7227a1e7e627f1a Mon Sep 17 00:00:00 2001 From: Anjeel Haria Date: Tue, 1 Oct 2024 12:07:12 +0530 Subject: [PATCH] [IMP] account_reconcile_oca: pass default label(same as the label on the bank statement line) for lines created through reconciliation models if there is no 'Journal Item Label' passed in the reconciliation model --- account_reconcile_oca/models/account_bank_statement_line.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/account_reconcile_oca/models/account_bank_statement_line.py b/account_reconcile_oca/models/account_bank_statement_line.py index 545bae82d8..267c2b5751 100644 --- a/account_reconcile_oca/models/account_bank_statement_line.py +++ b/account_reconcile_oca/models/account_bank_statement_line.py @@ -481,16 +481,19 @@ def _inverse_reconcile_data_info(self): def _reconcile_data_by_model(self, data, reconcile_model, reconcile_auxiliary_id): new_data = [] liquidity_amount = 0.0 + default_name = "" for line_data in data: if line_data["kind"] == "suspense": continue new_data.append(line_data) liquidity_amount += line_data["amount"] - + if line_data["kind"] == "liquidity": + default_name = line_data["name"] for line in reconcile_model._get_write_off_move_lines_dict( -liquidity_amount, self._retrieve_partner().id ): new_line = line.copy() + new_line["name"] = new_line.get("name") or default_name amount = line.get("balance") if self.foreign_currency_id: amount = self.foreign_currency_id.compute(