[FIX] base: don't ignore new uninstallable modules

When updating the module list (`ir.module.module.update_list()`), new
modules that are not installable were ignored.
This behavior was not consistent with the database initialization [1]
which creates all modules.

[1] https://github.com/odoo/odoo/blob/5d932e5db164fe80fd7c011ddd53f3494ef89ef5/odoo/modules/db.py#L51-L54
This commit is contained in:
Christophe Simonis
2018-10-24 15:36:55 +02:00
parent 5d932e5db1
commit da08a9e986
+3 -4
View File
@@ -624,11 +624,10 @@ class Module(models.Model):
mod.write(updated_values)
else:
mod_path = modules.get_module_path(mod_name)
if not mod_path:
if not mod_path or not terp:
continue
if not terp or not terp.get('installable', True):
continue
mod = self.create(dict(name=mod_name, state='uninstalled', **values))
state = "uninstalled" if terp.get('installable', True) else "uninstallable"
mod = self.create(dict(name=mod_name, state=state, **values))
res[1] += 1
mod._update_dependencies(terp.get('depends', []))