Avoid using '\' in name and use id if there is no number

This commit is contained in:
Cédric Krier committed 2008-05-21 10:01:28 +02:00
1 parent 10e552200a
commit 473e018e8e
1 file changed
+2 -1
+2 -1
View File
@@ -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',