[FIX] Passed context in write(...)(Courtesy: Humberto Arocha(hbto)). (Maintenance Case: 586824)

lp bug: https://launchpad.net/bugs/1088086 fixed

bzr revid: rgo@tinyerp.com-20130222062754-nbsp6a491xzm63kw
This commit is contained in:
Ravi Gohil (OpenERP) 2013-02-22 11:57:54 +05:30
parent 860e69a225
commit e0284cfe90
1 changed files with 1 additions and 1 deletions

View File

@ -97,7 +97,7 @@ class res_company(osv.osv):
address_data = part_obj.address_get(cr, uid, [company.partner_id.id], adr_pref=['default'])
address = address_data['default']
if address:
part_obj.write(cr, uid, [address], {name: value or False})
part_obj.write(cr, uid, [address], {name: value or False}, context=context)
else:
part_obj.create(cr, uid, {name: value or False, 'parent_id': company.partner_id.id}, context=context)
return True