From 6e4ebc4397e411d4f05645aec25ac1138d223a46 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Tue, 12 Mar 2024 00:10:00 +0100 Subject: [PATCH] [IMP] github_connector_odoo: Avoid DeprecationWarning WARNING devel py.warnings: /github_connector_odoo/models/github_repository_branch.py:232: DeprecationWarning: load_information_from_description_file() is a deprecated alias to get_manifest() --- .../models/github_repository_branch.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/github_connector_odoo/models/github_repository_branch.py b/github_connector_odoo/models/github_repository_branch.py index 73c25d05..6c22c3c8 100644 --- a/github_connector_odoo/models/github_repository_branch.py +++ b/github_connector_odoo/models/github_repository_branch.py @@ -7,7 +7,7 @@ import os from odoo import api, fields, models -from odoo.modules.module import load_information_from_description_file +from odoo.modules.module import get_manifest # Hard define this value to make this module working with or without # the patch (that backports V10 manifests analysis code. @@ -209,9 +209,7 @@ def _operation_analysis_rule_by_module_version( manifest_keys_find = module_version.manifest_key_ids.filtered( lambda x: x.id in rule.manifest_key_ids.ids ) - module_info = load_information_from_description_file( - module_version.technical_name, full_path - ) + module_info = get_manifest(module_version.technical_name, full_path) spec = rule._set_spec(rule.paths.splitlines()) for manifest_key_find in manifest_keys_find: if manifest_key_find.name in module_info: @@ -229,9 +227,7 @@ def _analyze_module_name(self, path, module_name): module_version_obj = self.env["odoo.module.version"] try: full_module_path = os.path.join(path, module_name) - module_info = load_information_from_description_file( - module_name, full_module_path - ) + module_info = get_manifest(module_name, full_module_path) # Create module version, if the module is installable # in the serie if module_info.get("installable", False):