[IMP] ir_property: can force the company using 'force_company' in context. Used for multicompanies purposes

bzr revid: qdp@cyan-20100610133840-cgcexbdy5un5ubk8
This commit is contained in:
Quentin De Paoli 2010-06-10 15:38:40 +02:00
parent 528e3ea6ca
commit fbfa26ca07
1 changed files with 5 additions and 2 deletions

View File

@ -177,8 +177,11 @@ class ir_property(osv.osv):
if not res:
return None
company = self.pool.get('res.company')
cid = company._company_default_get(cr, uid, model, res[0],
if 'force_company' in context and context['force_company']:
cid = context['force_company']
else:
company = self.pool.get('res.company')
cid = company._company_default_get(cr, uid, model, res[0],
context=context)
domain = ['&', ('fields_id', '=', res[0]),