[FIX] Fix the problem of image, at the time of creation of new company.
authorDivyesh Makwana (Open ERP) <mdi@tinyerp.com>
Wed, 31 Oct 2012 09:44:12 +0000 (15:14 +0530)
committerDivyesh Makwana (Open ERP) <mdi@tinyerp.com>
Wed, 31 Oct 2012 09:44:12 +0000 (15:14 +0530)
bzr revid: mdi@tinyerp.com-20121031094412-lzspjtpa9fy4z0bc

openerp/addons/base/res/res_company.py

index e371bd1..7efeaf9 100644 (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)