[IMP] account: clarify error on bank statement
Before this commit, the error message was not very helpful as did not specify which statement was problematic. By giving the reconciled name/number, the users get's a chance to identify the offending entry and correct it. Closes #26356
This commit is contained in:
committed by
Martin Trigaux
parent
d790dfacb2
commit
5c95f71a34
@@ -730,7 +730,7 @@ class AccountBankStatementLine(models.Model):
|
||||
self.write({'move_name': move.name})
|
||||
payment and payment.write({'payment_reference': move.name})
|
||||
elif self.move_name:
|
||||
raise UserError(_('Operation not allowed. Since your statement line already received a number, you cannot reconcile it entirely with existing journal entries otherwise it would make a gap in the numbering. You should book an entry and make a regular revert of it in case you want to cancel it.'))
|
||||
raise UserError(_('Operation not allowed. Since your statement line already received a number (%s), you cannot reconcile it entirely with existing journal entries otherwise it would make a gap in the numbering. You should book an entry and make a regular revert of it in case you want to cancel it.') % (self.move_name))
|
||||
|
||||
#create the res.partner.bank if needed
|
||||
if self.account_number and self.partner_id and not self.bank_account_id:
|
||||
|
||||
Reference in New Issue
Block a user