summaryrefslogtreecommitdiff
path: root/openerp-server
diff options
context:
space:
mode:
authorVo Minh Thu <vmt@openerp.com>2012-01-09 13:41:20 +0100
committerVo Minh Thu <vmt@openerp.com>2012-01-09 13:41:20 +0100
commit455e47e5e83bbf70203f7513b876c420bd6abb06 (patch)
treee650f8ee3816e22880d3552fea1fb0230140cfa7 /openerp-server
parent1560538f8a336e9e44c35bc8fd9b48b7bc2a2d82 (diff)
[IMP] openerp.addons: openerp.addons is used instead of
openerp.modules as the namespace of the OpenERP addons. bzr revid: vmt@openerp.com-20120109124120-06gguu3lzxv49i3j
Diffstat (limited to 'openerp-server')
-rwxr-xr-xopenerp-server12
1 files changed, 6 insertions, 6 deletions
diff --git a/openerp-server b/openerp-server
index 44ba179830d..c44e6909687 100755
--- a/openerp-server
+++ b/openerp-server
@@ -244,7 +244,7 @@ if __name__ == "__main__":
def find_module(self, module_name, package_path):
module_parts = module_name.split('.')
- if len(module_parts) == 3 and module_name.startswith('openerp.modules.'):
+ if len(module_parts) == 3 and module_name.startswith('openerp.addons.'):
return self # We act as a loader too.
# TODO list of loadable modules can be cached instead of always
@@ -259,18 +259,18 @@ if __name__ == "__main__":
logger.warning("""
Ambiguous import: the OpenERP module `%s` is shadowed by another
module (available at %s).
- To import it, use `import openerp.modules.<module>.`.""" % (module_name, path))
+ To import it, use `import openerp.addons.<module>.`.""" % (module_name, path))
return
except ImportError, e:
# Using `import <module_name>` instead of
- # `import openerp.modules.<module_name>` is ugly but not harmful
+ # `import openerp.addons.<module_name>` is ugly but not harmful
# and kept for backward compatibility.
return self # We act as a loader too.
def load_module(self, module_name):
module_parts = module_name.split('.')
- if len(module_parts) == 3 and module_name.startswith('openerp.modules.'):
+ if len(module_parts) == 3 and module_name.startswith('openerp.addons.'):
module_part = module_parts[2]
if module_name in sys.modules:
return sys.modules[module_name]
@@ -286,7 +286,7 @@ if __name__ == "__main__":
is_shadowing = True
except ImportError, e:
# Using `import <module_name>` instead of
- # `import openerp.modules.<module_name>` is ugly but not harmful
+ # `import openerp.addons.<module_name>` is ugly but not harmful
# and kept for backward compatibility.
is_shadowing = False
@@ -295,7 +295,7 @@ if __name__ == "__main__":
mod = imp.load_module(module_name, f, path, descr)
if not is_shadowing:
sys.modules[module_part] = mod
- sys.modules['openerp.modules.' + module_part] = mod
+ sys.modules['openerp.addons.' + module_part] = mod
return mod
openerp.modules.module.initialize_sys_path()