[IMP] base: performance improvement when installing a module

closes odoo/odoo#67959

X-original-commit: c0afa00d7cdbe98e4c67d2987a2b808bedd474ac
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
This commit is contained in:
Mathias Markl
2021-03-16 14:00:32 +00:00
parent e9739b6580
commit f6d8275533
+2 -2
View File
@@ -393,9 +393,9 @@ class Module(models.Model):
module_demo = module.demo or update_demo or any(mod.demo for mod in ready_mods)
demo = demo or module_demo
# check dependencies and update module itself
self.check_external_dependencies(module.name, newstate)
if module.state in states_to_update:
# check dependencies and update module itself
self.check_external_dependencies(module.name, newstate)
module.write({'state': newstate, 'demo': module_demo})
return demo