[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:
Divyesh Makwana (Open ERP)
2012-10-31 15:14:12 +05:30
parent 7b13fdcfa5
commit ba8d8f9bc9
+1 -1
View File
@@ -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)