mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
@@ -477,16 +477,19 @@ class AccountBankStatementLine(models.Model):
|
||||
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(
|
||||
|
||||
Reference in New Issue
Block a user