summaryrefslogtreecommitdiff
path: root/openerp/modules/module.py
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2014-07-07 15:32:25 +0200
committerChristophe Simonis <chs@odoo.com>2014-07-07 15:49:24 +0200
commite5b093374361bfe0d45cd3e282c69d3133e046ac (patch)
tree2a1d7dd366300478a6ff6115c50a5e802bbfd496 /openerp/modules/module.py
parent139d868c9403b529e4a3d512e480208853e66246 (diff)
[FIX] data-dir management
- sessions are now shared between series. - use site data dir instead of user data dir if user has no home dir. - in http and module handling, `data-dir` was used before being initialized, using the default value instead of user input (fixes #308, #904)
Diffstat (limited to 'openerp/modules/module.py')
-rw-r--r--openerp/modules/module.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/openerp/modules/module.py b/openerp/modules/module.py
index 505e51b0394..72b87e0bbfa 100644
--- a/openerp/modules/module.py
+++ b/openerp/modules/module.py
@@ -43,7 +43,7 @@ MANIFEST = '__openerp__.py'
_logger = logging.getLogger(__name__)
# addons path as a list
-ad_paths = [tools.config.addons_data_dir]
+ad_paths = []
hooked = False
# Modules already loaded
@@ -89,6 +89,10 @@ def initialize_sys_path():
global ad_paths
global hooked
+ dd = tools.config.addons_data_dir
+ if dd not in ad_paths:
+ ad_paths.append(dd)
+
for ad in tools.config['addons_path'].split(','):
ad = os.path.abspath(tools.ustr(ad.strip()))
if ad not in ad_paths: