Skip to content

Commit

Permalink
FIX eurofactor: OD creation
Browse files Browse the repository at this point in the history
  • Loading branch information
bealdav committed Nov 20, 2024
1 parent 88df9c2 commit ff92598
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def _prepare_journal_entry_vals_list(self):
self.ensure_one()
fact_journal = self.factor_journal_id
vals_list = super()._prepare_journal_entry_vals_list()
fr_lines, export_lines = []
fr_lines, export_lines = [], []
if (
not fact_journal.factoring_holdback_acc_exp_id
or not fact_journal.factoring_holdback_acc_exp_id
Expand All @@ -42,15 +42,15 @@ def get_current_account_lines(move_lines, account_field):
"credit": x.debit,
}
)
for x in self.line_ids
for x in move_lines
]

fr_lines.append(
fr_lines.extend(
get_current_account_lines(
self.line_ids._eurof_market(), "factoring_current_account_id"
)
)
export_lines.append(
export_lines.extend(
get_current_account_lines(
self.line_ids._eurof_market(export=True), "factoring_current_acc_exp_id"
)
Expand Down Expand Up @@ -87,15 +87,15 @@ def get_current_account_lines(move_lines, account_field):
"subrogation_id": self.id,
"company_id": self.company_id.id,
"date": fields.date.today(),
"ref": f"Contrepartie {name} domestique",
"ref": f"{name} domestique",
"line_ids": fr_lines,
}
export_vals = {
"journal_id": fact_journal.id,
"subrogation_id": self.id,
"company_id": self.company_id.id,
"date": fields.date.today(),
"ref": f"Contrepartie {name} export",
"ref": f"{name} export",
"line_ids": export_lines,
}
vals_list.append(fr_vals)
Expand Down

0 comments on commit ff92598

Please sign in to comment.