mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
[FIX] account_reconciliation_widget: Don't suggest own journal items
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
This commit is contained in:
@@ -332,7 +332,10 @@ class AccountReconciliation(models.AbstractModel):
|
||||
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(
|
||||
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"]]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user