[imp] changed bin_size behavior

bzr revid: nicolas.vanhoren@openerp.com-20110620105853-j08j410ngnn87n3w
This commit is contained in:
niv-openerp
2011-06-20 12:58:53 +02:00
2 changed files with 5 additions and 3 deletions
+2 -3
View File
@@ -761,12 +761,11 @@ class Action(openerpweb.Controller):
Actions = req.session.model('ir.actions.actions')
value = False
context = req.session.eval_context(req.context)
context["bin_size"] = False
action_type = Actions.read([action_id], ['type'], context)
if action_type:
action = req.session.model(action_type[0]['type']).read([action_id], False,
#TODO fme: check why does not work with context
#context)
{})
context)
if action:
value = clean_action(action[0], req.session)
return {'result': value}
+3
View File
@@ -138,6 +138,9 @@ class OpenERPSession(object):
"""
assert self._uid, "The user needs to be logged-in to initialize his context"
self.context = self.model('res.users').context_get(self.context)
# set bin_size to True all the time
self.context = self.context or {}
self.context["bin_size"] = True
self.client_timezone = self.context.get("tz", False)
# invalid code, anyway we decided the server will be in UTC