summaryrefslogtreecommitdiff
path: root/odoo/modules/loading.py
diff options
context:
space:
mode:
authorRaphael Collet <rco@odoo.com>2020-02-10 13:22:56 +0000
committerRaphael Collet <rco@odoo.com>2020-02-12 11:17:54 +0000
commitc8e79869a37b87101d64e4703401f409358a2099 (patch)
tree3c4bce683fb85b9a57f3460bfb0ba993a4447f09 /odoo/modules/loading.py
parent5e01d97b1d15510209f215352b96f5b406a7a0ed (diff)
[FIX] core: delay of constraints in upgrade
Sometimes, constraints are not delayed during a module upgrade: the module is 'to upgrade' but in 'init' mode :-/ Fix this by relying on the module's state only. closes odoo/odoo#45179 X-original-commit: 878b6538961a9b6a5fe1c6ac68d4ff39391abcdf Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Diffstat (limited to 'odoo/modules/loading.py')
-rw-r--r--odoo/modules/loading.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/odoo/modules/loading.py b/odoo/modules/loading.py
index 5c388026a20..8b6b5a7ea9c 100644
--- a/odoo/modules/loading.py
+++ b/odoo/modules/loading.py
@@ -199,7 +199,7 @@ def load_module_graph(cr, graph, status=None, perform_checks=True,
models_updated |= set(model_names)
models_to_check -= set(model_names)
registry.setup_models(cr)
- registry.init_models(cr, model_names, {'module': package.name}, mode)
+ registry.init_models(cr, model_names, {'module': package.name}, new_install)
elif package.state != 'to remove':
# The current module has simply been loaded. The models extended by this module
# and for which we updated the schema, must have their schema checked again.