[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
This commit is contained in:
Dave Lasley
2017-11-29 16:21:12 +01:00
committed by Yannick Tivisse
parent 941037194d
commit 8226aa1db8
+1 -7
View File
@@ -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