From b1f099b98b678be21a5bda08e1101f919bae9fcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 19 Apr 2009 13:54:03 +0200 Subject: [PATCH] Fix key collision for error message in invoice with purchase module --- sale.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sale.py b/sale.py index 28b91161a0..cc107af099 100644 --- a/sale.py +++ b/sale.py @@ -1623,8 +1623,8 @@ class Invoice(ModelSQL, ModelView): self._error_messages.update({ 'delete_sale_invoice': 'You can not delete invoices ' \ 'that come from a sale!', - 'reset_invoice': 'You cannot reset to draft an invoice '\ - 'generated by a sale.', + 'reset_invoice_sale': 'You cannot reset to draft ' \ + 'an invoice generated by a sale.', }) def button_draft(self, cursor, user, ids, context=None): @@ -1633,7 +1633,7 @@ class Invoice(ModelSQL, ModelView): cursor, user, [('invoices', 'in', ids)], context=context) if sale_ids: - self.raise_user_error(cursor, 'reset_invoice') + self.raise_user_error(cursor, 'reset_invoice_sale') return super(Invoice, self).button_draft( cursor, user, ids, context=context)