Skip to content

Commit

Permalink
[IMP] github_connector_odoo: Remove uninstallable
Browse files Browse the repository at this point in the history
If the module is uninstallable and module version
exist, we drop it

The default for installable is True
  • Loading branch information
hhgabelgaard committed Nov 24, 2024
1 parent a89e853 commit 92a1368
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion github_connector_odoo/models/github_repository_branch.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,22 @@ def _analyze_module_name(self, path, module_name):
)
# Create module version, if the module is installable
# in the serie
if module_info.get("installable", False):
if module_info.get("installable", True):
module_info["technical_name"] = module_name
module_version_obj.create_or_update_from_manifest(
module_info, self, full_module_path
)
else:
# Otherwise remove module version if exist
module_version = self.search(

Check warning on line 244 in github_connector_odoo/models/github_repository_branch.py

View check run for this annotation

Codecov / codecov/patch

github_connector_odoo/models/github_repository_branch.py#L244

Added line #L244 was not covered by tests
[
("technical_name", "=", module_name),
("repository_branch_id", "=", self.id),
]
)
if module_version:
module_version._process_clean_module_version()

Check warning on line 251 in github_connector_odoo/models/github_repository_branch.py

View check run for this annotation

Codecov / codecov/patch

github_connector_odoo/models/github_repository_branch.py#L251

Added line #L251 was not covered by tests

except Exception as e:
_logger.error(
"Cannot process module with name %s, error " "is: %s", module_name, e
Expand Down

0 comments on commit 92a1368

Please sign in to comment.