Skip to content

Commit ca99b3a

Browse files
committed
Merge PR #130 into 15.0
Signed-off-by pedrobaeza
2 parents b002e9b + 92a1368 commit ca99b3a

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

github_connector_odoo/models/github_repository_branch.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,11 +234,22 @@ def _analyze_module_name(self, path, module_name):
234234
)
235235
# Create module version, if the module is installable
236236
# in the serie
237-
if module_info.get("installable", False):
237+
if module_info.get("installable", True):
238238
module_info["technical_name"] = module_name
239239
module_version_obj.create_or_update_from_manifest(
240240
module_info, self, full_module_path
241241
)
242+
else:
243+
# Otherwise remove module version if exist
244+
module_version = self.search(
245+
[
246+
("technical_name", "=", module_name),
247+
("repository_branch_id", "=", self.id),
248+
]
249+
)
250+
if module_version:
251+
module_version._process_clean_module_version()
252+
242253
except Exception as e:
243254
_logger.error(
244255
"Cannot process module with name %s, error " "is: %s", module_name, e

0 commit comments

Comments
 (0)