From 5c95f71a34936c77560f065fce12ed3b4e3320ea Mon Sep 17 00:00:00 2001 From: David Arnold Date: Thu, 16 Aug 2018 03:15:58 -0500 Subject: [PATCH] [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 --- addons/account/models/account_bank_statement.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/models/account_bank_statement.py b/addons/account/models/account_bank_statement.py index 7c0a9926aae..57dc68415c9 100644 --- a/addons/account/models/account_bank_statement.py +++ b/addons/account/models/account_bank_statement.py @@ -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: