[FIX] account: clean message if no payment to post

Was PR #19656
This commit is contained in:
Ankit Joshi
2017-09-22 16:14:54 +02:00
committed by qdp-odoo
parent e91fd246d2
commit a7ec2d94fe
+1 -1
View File
@@ -455,7 +455,7 @@ class account_payment(models.Model):
for rec in self:
if rec.state != 'draft':
raise UserError(_("Only a draft payment can be posted. Trying to post a payment in state %s.") % rec.state)
raise UserError(_("Only a draft payment can be posted."))
if any(inv.state != 'open' for inv in rec.invoice_ids):
raise ValidationError(_("The payment cannot be processed because the invoice is not open!"))