From 8226aa1db828d2a559c7ffaa31a27ef3e5ba4d0b Mon Sep 17 00:00:00 2001 From: Dave Lasley Date: Fri, 23 Jun 2017 11:11:25 +0200 Subject: [PATCH] [IMP] http.py: Allow to use odoo if unmet dependencies on uninstalled module Purpose ======= If an external dependency is unmet on a module that is not installed, it's actually impossible to launch an odoo server and load the web client without getting a traceback. This commit removes this constraint and allow to use odoo in that case. Obviously the install will crash if the external dependency is still unmet. Close https://github.com/odoo/odoo/pull/17790 Coming from https://github.com/odoo/odoo/pull/14850 --- odoo/http.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) 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