diff options
| author | Andreas Perhab <bigbear.ap@gmx.at> | 2018-11-01 10:15:55 +0000 |
|---|---|---|
| committer | Andreas Perhab <bigbear.ap@gmx.at> | 2018-11-01 10:41:58 +0000 |
| commit | eb11b465dc0cfed5159b9f794a2762693d87fe14 (patch) | |
| tree | 80dfeafec2c2fc237b2915129c406c755986fdbc /odoo/modules/module.py | |
| parent | c5a3b607e6ee5ad4cafc6e427490ff361b79c707 (diff) | |
[FIX] odoo: fix addons paths on windows with use of normcase
This is necessary to get --dev=xml working on windows, because the xml
import uses normcase in file_open and the case normalized filename is
then used to find the addon path (which was not found before on windows)
With this fix arch_fs is now correctly filled in windows and --dev=xml
works.
closes odoo/odoo#28331
Diffstat (limited to 'odoo/modules/module.py')
| -rw-r--r-- | odoo/modules/module.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/odoo/modules/module.py b/odoo/modules/module.py index 15f4aae9a50..daf7fb7c440 100644 --- a/odoo/modules/module.py +++ b/odoo/modules/module.py @@ -128,17 +128,17 @@ def initialize_sys_path(): global ad_paths global hooked - dd = tools.config.addons_data_dir + dd = os.path.normcase(tools.config.addons_data_dir) if os.access(dd, os.R_OK) and 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())) + ad = os.path.normcase(os.path.abspath(tools.ustr(ad.strip()))) if ad not in ad_paths: ad_paths.append(ad) # add base module path - base_path = os.path.abspath(os.path.join(os.path.dirname(os.path.dirname(__file__)), 'addons')) + base_path = os.path.normcase(os.path.abspath(os.path.join(os.path.dirname(os.path.dirname(__file__)), 'addons'))) if base_path not in ad_paths and os.path.isdir(base_path): ad_paths.append(base_path) |
