add feature to limit the bank lines that already reconciled, can not be reconcile again
This commit is contained in:
parent
d8c97d877c
commit
b7aa68ec8e
Binary file not shown.
@ -40,6 +40,11 @@ class BankReconcileWizard(models.TransientModel):
|
||||
if not self.journal_entry_line_id:
|
||||
raise UserError("Please select a journal entry line to reconcile.")
|
||||
|
||||
# Check if any of the selected bank lines are already reconciled
|
||||
for bank_line in self.bank_line_ids:
|
||||
if bank_line.move_id and 'Reconciliation:' in bank_line.move_id.ref:
|
||||
raise UserError(f"Bank statement line '{bank_line.ref}' has already been reconciled and cannot be reconciled again.")
|
||||
|
||||
# Process each selected bank line individually
|
||||
for bank_line in self.bank_line_ids:
|
||||
self._reconcile_single_line(bank_line, self.journal_entry_line_id)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user