From 85e0fbc6fe78d21613080d746d17edfc317bf463 Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Tue, 28 Jun 2011 15:30:44 +0200 Subject: [PATCH] [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 --- addons/base/controllers/main.py | 2 -- openerpweb/openerpweb.py | 6 ++---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/addons/base/controllers/main.py b/addons/base/controllers/main.py index bc6bc141863..dfa061588c0 100644 --- a/addons/base/controllers/main.py +++ b/addons/base/controllers/main.py @@ -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, diff --git a/openerpweb/openerpweb.py b/openerpweb/openerpweb.py index 9da14d5ace0..dcdf981533a 100644 --- a/openerpweb/openerpweb.py +++ b/openerpweb/openerpweb.py @@ -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: