ad_paths.append(_ad) # for get_module_path
-def get_module_path(module, downloaded=False):
+def get_module_path(module, downloaded=False, display_warning=True):
"""Return the path of the given module.
Search the addons paths and return the first path where the given
if downloaded:
return opj(_ad, module)
- logger.notifyChannel('init', netsvc.LOG_WARNING, 'module %s: module not found' % (module,))
+ if display_warning:
+ logger.notifyChannel('init', netsvc.LOG_WARNING, 'module %s: module not found' % (module,))
return False
try:
zip_mod_path = mod_path + '.zip'
if not os.path.isfile(zip_mod_path):
- __import__(m)
+ __import__('openerp.modules.' + m)
else:
zimp = zipimport.zipimporter(zip_mod_path)
zimp.load_module(m)