From 473e018e8e96d87ece58315bdfbc8e985310eb45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 21 May 2008 10:01:28 +0200 Subject: [PATCH] Avoid using '\' in name and use id if there is no number --- invoice.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/invoice.py b/invoice.py index 9df34da870..6a6e9d6c81 100644 --- a/invoice.py +++ b/invoice.py @@ -731,7 +731,8 @@ class Invoice(OSV): ids = [ids] res = [] for invoice in self.browse(cursor, user, ids, context=context): - res.append((invoice.id, invoice.number or '/' + ' ' + invoice.partner.name)) + res.append((invoice.id, + invoice.number or str(invoice.id) + ' ' + invoice.partner.name)) return res def name_search(self, cursor, user, name='', args=None, operator='ilike',