From 965e55d7e6ef19481f3444e2975cf1f543ffd901 Mon Sep 17 00:00:00 2001 From: Vo Minh Thu Date: Fri, 10 Feb 2012 10:59:46 +0100 Subject: [PATCH] [REV] REVERT TEH PREVIOUS SUTPID BROKD COMMIT. bzr revid: vmt@openerp.com-20120210095946-dxs0e0cd4ffkccy9 --- openerp/modules/module.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/openerp/modules/module.py b/openerp/modules/module.py index bb3f45705c7..6238aadaed0 100644 --- a/openerp/modules/module.py +++ b/openerp/modules/module.py @@ -101,9 +101,10 @@ class AddonsImportHook(object): # Check if the bare module name clashes with another module. f, path, descr = imp.find_module(module_parts[0]) _logger.warning(""" -Ambiguous import: the OpenERP module `%s` is shadowing another -module (available at %s).""" % (module_name, path)) - return self # We act as a loader too. +Ambiguous import: the OpenERP module `%s` is shadowed by another +module (available at %s). +To import it, use `import openerp.addons..`.""" % (module_name, path)) + return except ImportError, e: # Using `import ` instead of # `import openerp.addons.` is ugly but not harmful @@ -136,7 +137,7 @@ module (available at %s).""" % (module_name, path)) # Note: we don't support circular import. f, path, descr = imp.find_module(module_part, ad_paths) mod = imp.load_module('openerp.addons.' + module_part, f, path, descr) - if is_shadowing or not is_shadowing: # == if True, but keep the defined variable. + if not is_shadowing: sys.modules[module_part] = mod for k in sys.modules.keys(): if k.startswith('openerp.addons.' + module_part):