From df99a699eb8bb3598e81018064f0d04ed8f53d48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 3 Jun 2013 15:15:17 +0200 Subject: [PATCH] Improve refund_supplier error message --- invoice.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/invoice.py b/invoice.py index f52963d1cd..9564a2ad59 100644 --- a/invoice.py +++ b/invoice.py @@ -2706,7 +2706,8 @@ class CreditInvoice(Wizard): 'refund_with_payement': ('You can not credit with refund ' 'invoice "%s" because it has payments.'), 'refund_supplier': ('You can not credit with refund ' - 'a supplier invoice/credit note.'), + 'invoice "%s" because it is a supplier ' + 'invoice/credit note.'), }) def default_start(self, fields): @@ -2738,7 +2739,7 @@ class CreditInvoice(Wizard): self.raise_user_error('refund_with_payement', (invoice.rec_name,)) if invoice.type in ('in_invoice', 'in_credit_note'): - self.raise_user_error('refund_supplier') + self.raise_user_error('refund_supplier', invoice.rec_name) credit_invoices = Invoice.credit(invoices, refund=refund)