diff options
| author | xmo-odoo <xmo@odoo.com> | 2020-02-20 09:08:38 +0000 |
|---|---|---|
| committer | Xavier Morel <xmo@odoo.com> | 2020-02-20 15:45:42 +0000 |
| commit | 44aa17cc46972e9cf23d259cdd234bb69df8c79e (patch) | |
| tree | 0e60bd3251ca07ba4e73a584ee6e7d8e790024e3 /odoo/modules/module.py | |
| parent | 9b95bb79044f3c01f42651c0995e17aec696176f (diff) | |
[REV] re-enable the multiple calls of initialize_sys_path
Some of the implicit side-effects got missed, namely that under some conditions
(e.g. using an odoo subcommand) `initialize_sys_path` can be called before the
config has been loaded at all, resulting in the first call not properly setting
up things, and one of the subsequent calls fixing things up.
Since this breaks workflows right now, quickly fix it, we'll re-investigate
how to fixup the entire thing in order to restrict & enforce a single call.
closes odoo/odoo#45844
X-original-commit: 6cb4c829e1559bcf836e4b573051760565b7d0c1
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Diffstat (limited to 'odoo/modules/module.py')
| -rw-r--r-- | odoo/modules/module.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/odoo/modules/module.py b/odoo/modules/module.py index f9f11525850..191a45e9e8e 100644 --- a/odoo/modules/module.py +++ b/odoo/modules/module.py @@ -32,8 +32,8 @@ def initialize_sys_path(): Setup the addons path ``odoo.addons.__path__`` with various defaults and explicit directories. """ - if getattr(initialize_sys_path, 'called', False): # only initialize once - return + # if getattr(initialize_sys_path, 'called', False): # only initialize once + # return initialize_sys_path.called = True # hook odoo.addons on data dir |
