[IMP] web.common.dispatch only load module with controllers

bzr revid: al@openerp.com-20110925015054-1223jdthddb1wrah
This commit is contained in:
Antony Lesuisse 2011-09-25 03:50:54 +02:00
parent da705a6b55
commit adc30aa10f
1 changed files with 2 additions and 1 deletions

View File

@ -387,7 +387,8 @@ class Root(object):
for module in os.listdir(addons_path):
if module not in addons_module:
manifest_path = os.path.join(addons_path, module, '__openerp__.py')
if os.path.isfile(manifest_path):
path_controllers = os.path.join(addons_path, module, 'controllers')
if os.path.isfile(manifest_path) and os.path.isdir(path_controllers):
manifest = ast.literal_eval(open(manifest_path).read())
_logger.info("Loading %s", module)
m = __import__(module)