diff --git a/github_connector_odoo/__manifest__.py b/github_connector_odoo/__manifest__.py index 02e62366..59b379bd 100644 --- a/github_connector_odoo/__manifest__.py +++ b/github_connector_odoo/__manifest__.py @@ -4,7 +4,7 @@ { 'name': 'Github Connector - Odoo', 'summary': 'Analyze Odoo modules information from Github repositories', - 'version': '11.0.1.1.0', + 'version': '11.0.1.1.1', 'category': 'Connector', 'license': 'AGPL-3', 'author': 'Odoo Community Association (OCA), Sylvain LE GAL, GRAP', diff --git a/github_connector_odoo/models/github_repository_branch.py b/github_connector_odoo/models/github_repository_branch.py index f6b5f237..44a47dde 100644 --- a/github_connector_odoo/models/github_repository_branch.py +++ b/github_connector_odoo/models/github_repository_branch.py @@ -109,16 +109,7 @@ def analyze_code_one(self, branch): # Analyze folders and create module versions _logger.info("Analyzing repository %s ..." % path) for module_name in self.listdir(path): - full_module_path = os.path.join(path, module_name) - module_info = load_information_from_description_file( - module_name, full_module_path) - - # Create module version, if the module is installable - # in the serie - if module_info.get('installable', False): - module_info['technical_name'] = module_name - module_version_obj.create_or_update_from_manifest( - module_info, branch, full_module_path) + self._analyze_module_name(path, module_name, branch) finally: # Reset Original level for module logger logger1.setLevel(currentLevel1) @@ -141,3 +132,19 @@ def is_really_module(name): return True return map(clean, filter(is_really_module, os.listdir(dir))) + + def _analyze_module_name(self, path, module_name, branch): + 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) + # Create module version, if the module is installable + # in the serie + if module_info.get('installable', False): + module_info['technical_name'] = module_name + module_version_obj.create_or_update_from_manifest( + module_info, branch, full_module_path) + except Exception as e: + _logger.error('Cannot process module with name %s, error ' + 'is: %s' % (module_name, e))