[IMP]: ir.actions.todo: Improvement in code in order to eval user.company_id.id in the context

bzr revid: rpa@tinyerp.com-20110628115855-kf0318w22mtnggil
This commit is contained in:
Rucha (Open ERP)
2011-06-28 17:28:55 +05:30
parent e2193e8a31
commit 168e50d7f2
+2 -1
View File
@@ -847,7 +847,8 @@ class ir_actions_todo(osv.osv):
# Open Specific resouce when res_id is provided in context
if res.get('context', {}):
ctx = eval(res['context'])
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
ctx = eval(res['context'], {'user': user})
if ctx.get('res_id'):
res.update({'res_id': ctx.get('res_id')})
return res