[FIX] Passed context in write(...)(Courtesy: Humberto Arocha(hbto)). (Maintenance...
authorRavi Gohil (OpenERP) <rgo@tinyerp.com>
Fri, 22 Feb 2013 06:27:54 +0000 (11:57 +0530)
committerRavi Gohil (OpenERP) <rgo@tinyerp.com>
Fri, 22 Feb 2013 06:27:54 +0000 (11:57 +0530)
lp bug: https://launchpad.net/bugs/1088086 fixed

bzr revid: rgo@tinyerp.com-20130222062754-nbsp6a491xzm63kw

openerp/addons/base/res/res_company.py

index 022c9c0..c8ea8d7 100644 (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