From 2c0284a50cfc361e07d3f323a73f02aca42c70d1 Mon Sep 17 00:00:00 2001 From: Joel Grand-Guillaume Date: Thu, 23 Jan 2014 10:55:48 +0100 Subject: [PATCH] [FIX] Error raise if no number on claim --- crm_claim_rma/crm_claim_rma.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crm_claim_rma/crm_claim_rma.py b/crm_claim_rma/crm_claim_rma.py index b818a4be..cf4cf4c6 100644 --- a/crm_claim_rma/crm_claim_rma.py +++ b/crm_claim_rma/crm_claim_rma.py @@ -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):