Skip to content

Commit

Permalink
[FIX] account_reconciliation_widget: Don't suggest own journal items
Browse files Browse the repository at this point in the history
When getting propositions from the reconcile models, we should
explicitly exclude the amls of the bank statement lines.

If not, we can get a situation where the journal item of the bank
statement line is proposed to itself.

TT45568
  • Loading branch information
pedrobaeza committed Feb 24, 2024
1 parent 48fd1cd commit 540a667
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,10 @@ def get_bank_statement_data(self, bank_statement_line_ids, srch_domain=None):
domain += srch_domain
bank_statement_lines = self.env["account.bank.statement.line"].search(domain)

results = self.get_bank_statement_line_data(bank_statement_lines.ids)
results = self.get_bank_statement_line_data(

Check warning on line 331 in account_reconciliation_widget/models/reconciliation_widget.py

View check run for this annotation

Codecov / codecov/patch

account_reconciliation_widget/models/reconciliation_widget.py#L331

Added line #L331 was not covered by tests
bank_statement_lines.ids,
excluded_ids=bank_statement_lines.move_id.line_ids.ids,
)
bank_statement_lines_left = self.env["account.bank.statement.line"].browse(
[line["st_line"]["id"] for line in results["lines"]]
)
Expand Down

0 comments on commit 540a667

Please sign in to comment.