[FIX] Fix the problem of image, at the time of creation of new company.
bzr revid: mdi@tinyerp.com-20121031094412-lzspjtpa9fy4z0bc
This commit is contained in:
@@ -235,7 +235,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}, context=context)
|
||||
partner_id = obj_partner.create(cr, uid, {'name': vals['name'], 'is_company':True, 'image': vals['logo']}, context=context)
|
||||
vals.update({'partner_id': partner_id})
|
||||
self.cache_restart(cr)
|
||||
company_id = super(res_company, self).create(cr, uid, vals, context=context)
|
||||
|
||||
Reference in New Issue
Block a user