From 6c1ad196bf39563d62159ef1b988af39360849aa Mon Sep 17 00:00:00 2001 From: Vo Minh Thu Date: Tue, 10 Jan 2012 10:27:30 +0100 Subject: [PATCH] [IMP] openerp.modules: updated initialize_sys_path() docstring (although its name is now inaccurate). bzr revid: vmt@openerp.com-20120110092730-rqewzuo1wa5wy2q5 --- openerp/modules/module.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/openerp/modules/module.py b/openerp/modules/module.py index 1e46d3c8478..b82597d656d 100644 --- a/openerp/modules/module.py +++ b/openerp/modules/module.py @@ -142,10 +142,13 @@ To import it, use `import openerp.addons..`.""" % (module_name, path)) return mod def initialize_sys_path(): - """ Add all addons paths in sys.path. + """ + Setup an import-hook to be able to import OpenERP addons from the different + addons paths. - This ensures something like ``import crm`` works even if the addons are - not in the PYTHONPATH. + This ensures something like ``import crm`` (or even + ``import openerp.addons.crm``) works even if the addons are not in the + PYTHONPATH. """ global ad_paths if ad_paths: