diff --git a/odoo/http.py b/odoo/http.py index 89da2f15003..663f648141b 100644 --- a/odoo/http.py +++ b/odoo/http.py @@ -870,7 +870,6 @@ more details. #---------------------------------------------------------- # Controller and route registration #---------------------------------------------------------- -addons_module = {} addons_manifest = {} controllers_per_module = collections.defaultdict(list) @@ -1305,7 +1304,7 @@ class Root(object): statics = {} for addons_path in odoo.modules.module.ad_paths: for module in sorted(os.listdir(str(addons_path))): - if module not in addons_module: + if module not in addons_manifest: mod_path = opj(addons_path, module) manifest_path = module_manifest(mod_path) path_static = opj(addons_path, module, 'static') @@ -1316,11 +1315,6 @@ class Root(object): continue manifest['addons_path'] = addons_path _logger.debug("Loading %s", module) - if 'odoo.addons' in sys.modules: - m = __import__('odoo.addons.' + module) - else: - m = None - addons_module[module] = m addons_manifest[module] = manifest statics['/%s/static' % module] = path_static