From 44aa17cc46972e9cf23d259cdd234bb69df8c79e Mon Sep 17 00:00:00 2001 From: xmo-odoo Date: Thu, 20 Feb 2020 09:08:38 +0000 Subject: [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) --- odoo/modules/module.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'odoo/modules') 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 -- cgit v1.2.3