[FIX] Error raise if no number on claim

This commit is contained in:
Joel Grand-Guillaume
2014-01-23 10:55:48 +01:00
parent 467ff9cb32
commit 2c0284a50c

View File

@@ -344,7 +344,8 @@ class crm_claim(orm.Model):
def name_get(self, cr, uid, ids, context=None):
res = []
for claim in self.browse(cr, uid, ids, context=context):
res.append((claim.id, '[' + claim.number + '] ' + claim.name))
number = claim.number and str(claim.number) or ''
res.append((claim.id, '[' + number + '] ' + claim.name))
return res
def create(self, cr, uid, vals, context=None):