summaryrefslogtreecommitdiff
path: root/odoo/modules
diff options
context:
space:
mode:
authorRaphael Collet <rco@odoo.com>2018-09-21 14:01:27 +0200
committerRaphael Collet <rco@odoo.com>2018-09-25 10:41:55 +0200
commit13fc1380baa8ea3450fc1d9b6ddb25f94048b8ab (patch)
treec87206ebc6ac52899c373424ddee90bc63a7ff33 /odoo/modules
parent587b21fb4676fedca5776348a6594a64517241dd (diff)
[FIX] ir_ui_view: do not check arch twice upon install/upgrade
After a module upgrade, validate the architecture of the module's views that are impacted by updates, but have not been checked yet. Before this patch, views were checked twice on average. This patch speeds up the installation of modules by about 15% without demo data. With demo data, the speedup is around 10%.
Diffstat (limited to 'odoo/modules')
-rw-r--r--odoo/modules/loading.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/odoo/modules/loading.py b/odoo/modules/loading.py
index 6f2ee27c8e6..962559190c8 100644
--- a/odoo/modules/loading.py
+++ b/odoo/modules/loading.py
@@ -240,8 +240,9 @@ def load_module_graph(cr, graph, status=None, perform_checks=True,
if post_init:
getattr(py_module, post_init)(cr, registry)
- # validate all the views at a whole
- env['ir.ui.view']._validate_module_views(module_name)
+ if mode == 'update':
+ # validate the views that have not been checked yet
+ env['ir.ui.view']._validate_module_views(module_name)
# need to commit any modification the module's installation or
# update made to the schema or data so the tests can run