[FIX] core: don't fail on bad version for uninstallable addons

When an addon has an invalid version but is not installable,
there is no need to error out. This situation typically happens
when unmigrated modules are present in the addons path.

closes odoo/odoo#157657

Signed-off-by: Christophe Simonis (chs) <chs@odoo.com>
This commit is contained in:
Stéphane Bidoul
2024-03-19 09:24:19 +00:00
parent 34346323b5
commit 9d2b18f047
+2 -1
View File
@@ -348,7 +348,8 @@ def load_manifest(module, mod_path=None):
try:
manifest['version'] = adapt_version(manifest['version'])
except ValueError as e:
raise ValueError(f"Module {module}: invalid manifest") from e
if manifest.get("installable", True):
raise ValueError(f"Module {module}: invalid manifest") from e
manifest['addons_path'] = normpath(opj(mod_path, os.pardir))
return manifest