From adc30aa10f1ec4d36c3e1e4bcb6cdb13b7bf1f22 Mon Sep 17 00:00:00 2001
From: Antony Lesuisse <al@openerp.com>
Date: Sun, 25 Sep 2011 03:50:54 +0200
Subject: [PATCH] [IMP] web.common.dispatch only load module with controllers

bzr revid: al@openerp.com-20110925015054-1223jdthddb1wrah
---
 addons/web/common/dispatch.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/addons/web/common/dispatch.py b/addons/web/common/dispatch.py
index 2a5546ac85ab..c6834a3b7152 100644
--- a/addons/web/common/dispatch.py
+++ b/addons/web/common/dispatch.py
@@ -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)
-- 
GitLab