Skip to content

Commit

Permalink
[IMP] account_reconcile_oca: pass default name for lines created thro…
Browse files Browse the repository at this point in the history
…ugh reconciliation models
  • Loading branch information
ByteMeAsap committed Oct 1, 2024
1 parent e11c081 commit f4a1351
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion account_reconcile_oca/models/account_bank_statement_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit f4a1351

Please sign in to comment.