[FIX] Removed global bin_size causing problems in context. Will activate it only when needed.
Don't forget to logout/login in order to purge context after you pull this revision bzr revid: fme@openerp.com-20110628133044-dp9jm6aj7ixzc69p
This commit is contained in:
@@ -238,7 +238,6 @@ def eval_context_and_domain(session, context, domain=None):
|
||||
return (e_context, e_domain)
|
||||
|
||||
def load_actions_from_ir_values(req, key, key2, models, meta, context):
|
||||
context['bin_size'] = False # Possible upstream bug. Antony says not to loose time on this.
|
||||
Values = req.session.model('ir.values')
|
||||
actions = Values.get(key, key2, models, meta, context)
|
||||
|
||||
@@ -756,7 +755,6 @@ 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,
|
||||
|
||||
@@ -138,15 +138,13 @@ 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
|
||||
#if self.client_timezone:
|
||||
# self.remote_timezone = self.execute('common', 'timezone_get')
|
||||
|
||||
|
||||
self._locale = self.context.get('lang','en_US')
|
||||
lang_ids = self.execute('res.lang','search', [('code', '=', self._locale)])
|
||||
if lang_ids:
|
||||
|
||||
Reference in New Issue
Block a user