diff --git a/odoo/addons/base/models/ir_asset.py b/odoo/addons/base/models/ir_asset.py index 54d0f078378..bf74645e2b5 100644 --- a/odoo/addons/base/models/ir_asset.py +++ b/odoo/addons/base/models/ir_asset.py @@ -182,7 +182,7 @@ class IrAsset(models.Model): # 2. Process all addons' manifests. for addon in addons: - for command in odoo.modules.module.get_manifest(addon)['assets'].get(bundle, ()): + for command in odoo.modules.module._get_manifest_cached(addon)['assets'].get(bundle, ()): directive, target, path_def = self._process_command(command) self._process_path(bundle, directive, target, path_def, asset_paths, seen, addons, installed, bundle_start_index, **assets_params) @@ -284,7 +284,7 @@ class IrAsset(models.Model): IrModule = self.env['ir.module.module'] def mapper(addon): - manif = odoo.modules.module.get_manifest(addon) + manif = odoo.modules.module._get_manifest_cached(addon) from_terp = IrModule.get_values_from_terp(manif) from_terp['name'] = addon from_terp['depends'] = manif.get('depends', ['base']) @@ -297,7 +297,7 @@ class IrAsset(models.Model): manifs = sorted(manifs, key=sort_key) - return misc.topological_sort({manif['name']: manif['depends'] for manif in manifs}) + return misc.topological_sort({manif['name']: tuple(manif['depends']) for manif in manifs}) @api.model @tools.ormcache() @@ -336,7 +336,7 @@ class IrAsset(models.Model): path_def = fs2web(path_def) # we expect to have all path definition unix style or url style, this is a safety path_parts = [part for part in path_def.split('/') if part] addon = path_parts[0] - addon_manifest = odoo.modules.module.get_manifest(addon) + addon_manifest = odoo.modules.module._get_manifest_cached(addon) safe_path = True if addon_manifest: diff --git a/odoo/addons/test_assetsbundle/tests/test_assetsbundle.py b/odoo/addons/test_assetsbundle/tests/test_assetsbundle.py index 4e49ba99abd..57132755449 100644 --- a/odoo/addons/test_assetsbundle/tests/test_assetsbundle.py +++ b/odoo/addons/test_assetsbundle/tests/test_assetsbundle.py @@ -111,7 +111,7 @@ class AddonManifestPatched(TransactionCase): } self.patch(self.env.registry, '_init_modules', self.installed_modules) - self.patch(odoo.modules.module, 'get_manifest', Mock(side_effect=lambda module: self.manifests.get(module, {}))) + self.patch(odoo.modules.module, '_get_manifest_cached', Mock(side_effect=lambda module: self.manifests.get(module, {}))) class FileTouchable(AddonManifestPatched):