diff --git a/bin/addons/__init__.py b/bin/addons/__init__.py index fba500900ed..c33bee95c02 100644 --- a/bin/addons/__init__.py +++ b/bin/addons/__init__.py @@ -157,8 +157,6 @@ def create_graph(module_list, force=[]): for package in later: logger.notifyChannel('init', netsvc.LOG_ERROR, 'addon:%s:Unmet dependency' % package) - for kind in ('init', 'demo', 'update'): - tools.config[kind]={} return graph def init_module_objects(cr, module_name, obj_list): @@ -247,6 +245,9 @@ def load_modules(db, force_demo=False, status={}, update_module=False): graph = create_graph(module_list, force) load_module_graph(cr, graph, status) + for kind in ('init', 'demo', 'update'): + tools.config[kind]={} + cr.commit() if update_module: cr.execute("select id,name from ir_module_module where state in ('to remove')")