diff --git a/crm_claim_rma/crm_claim_rma.py b/crm_claim_rma/crm_claim_rma.py index dd30a00b..e62d7276 100644 --- a/crm_claim_rma/crm_claim_rma.py +++ b/crm_claim_rma/crm_claim_rma.py @@ -338,6 +338,12 @@ class claim_line(orm.Model): class crm_claim(orm.Model): _inherit = 'crm.claim' + def init(self, cr): + cr.execute(""" + UPDATE "crm_claim" SET "number"=id::varchar WHERE ("number" is NULL) + OR ("number" = '/'); + """) + def _get_sequence_number(self, cr, uid, context=None): seq_obj = self.pool.get('ir.sequence') res = seq_obj.get(cr, uid, 'crm.claim.rma', context=context) or '/'