From 3389198f81c88d77cb28fb377841dde682af415f Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Mon, 4 Nov 2013 13:57:35 +0100 Subject: [PATCH] [IMP] remove unnecessary keys() calls bzr revid: xmo@openerp.com-20131104125735-wtnngolx07755o1u --- openerp/addons/base/ir/ir_ui_view.py | 1 + openerp/http.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/openerp/addons/base/ir/ir_ui_view.py b/openerp/addons/base/ir/ir_ui_view.py index 5876d211380..ea031710ced 100644 --- a/openerp/addons/base/ir/ir_ui_view.py +++ b/openerp/addons/base/ir/ir_ui_view.py @@ -680,6 +680,7 @@ class view(osv.osv): arch = self.read_combined(cr, uid, id_, fields=['arch'], context=context)['arch'] arch_tree = etree.fromstring(arch) + if 'lang' in context: arch_tree = self.translate_qweb(cr, uid, id_, arch_tree, context['lang'], context) self.distribute_branding(arch_tree) diff --git a/openerp/http.py b/openerp/http.py index 9c7fa276c0b..80c6095d498 100644 --- a/openerp/http.py +++ b/openerp/http.py @@ -219,7 +219,7 @@ def route(route, type="http", auth="user"): configuration indicating the current database nor the current user. """ assert type in ["http", "json"] - assert auth in auth_methods.keys() + assert auth in auth_methods def decorator(f): if isinstance(route, list): f.routes = route @@ -1025,7 +1025,7 @@ class Root(object): url = url[: -1] routing_map.add(routing.Rule(url, endpoint=mv)) - modules_set = set(controllers_per_module.keys()) - set(['', 'web']) + modules_set = set(controllers_per_module) - set(['', 'web']) # building all none methods gen(['', "web"] + sorted(modules_set), True) if not db: