From 6ab102ec11ceaaa9618f4eabc9ba9bef329cf128 Mon Sep 17 00:00:00 2001 From: Vo Minh Thu Date: Mon, 9 Jan 2012 14:09:30 +0100 Subject: [PATCH] [IMP] addons: use `openerp.addons.` instead of `` with __import__. bzr revid: vmt@openerp.com-20120109130930-xt13kjrxww2whdf0 --- addons/web/common/http.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/addons/web/common/http.py b/addons/web/common/http.py index 0c239decb64..1e84689caad 100644 --- a/addons/web/common/http.py +++ b/addons/web/common/http.py @@ -478,8 +478,6 @@ class Root(object): """ statics = {} for addons_path in self.config.addons_path: - if addons_path not in sys.path: - sys.path.insert(0, addons_path) for module in os.listdir(addons_path): if module not in addons_module: manifest_path = os.path.join(addons_path, module, '__openerp__.py') @@ -488,7 +486,7 @@ class Root(object): manifest = ast.literal_eval(open(manifest_path).read()) manifest['addons_path'] = addons_path _logger.info("Loading %s", module) - m = __import__(module) + m = __import__('openerp.addons.' + module) addons_module[module] = m addons_manifest[module] = manifest statics['/%s/static' % module] = path_static