[FIX] base: by default a company is not a customer
When creating a company, a new partner is created with his field 'customer' = True. But by default a company doesn't have to be a customer. opw:667130
This commit is contained in:
parent
6f28b70171
commit
c0571d4066
|
@ -276,7 +276,7 @@ class res_company(osv.osv):
|
|||
self.cache_restart(cr)
|
||||
return super(res_company, self).create(cr, uid, vals, context=context)
|
||||
obj_partner = self.pool.get('res.partner')
|
||||
partner_id = obj_partner.create(cr, uid, {'name': vals['name'], 'is_company':True, 'image': vals.get('logo', False)}, context=context)
|
||||
partner_id = obj_partner.create(cr, uid, {'name': vals['name'], 'is_company':True, 'image': vals.get('logo', False), 'customer': False}, context=context)
|
||||
vals.update({'partner_id': partner_id})
|
||||
self.cache_restart(cr)
|
||||
company_id = super(res_company, self).create(cr, uid, vals, context=context)
|
||||
|
|
Loading…
Reference in New Issue