[IMP] addons: use openerp.addons.<module> instead of <module> with __import__.

bzr revid: vmt@openerp.com-20120109130930-xt13kjrxww2whdf0
This commit is contained in:
Vo Minh Thu
2012-01-09 14:09:30 +01:00
parent c392fc6276
commit 6ab102ec11
+1 -3
View File
@@ -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