Skip to content

Commit 2e65c3f

Browse files
committed
Merge PR #134 into 16.0
Signed-off-by pedrobaeza
2 parents e7dbda5 + 758eec4 commit 2e65c3f

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
@@ -237,11 +237,22 @@ def _analyze_module_name(self, path, module_name):
237237
odoo.addons.__path__.remove(path)
238238
# Create module version, if the module is installable
239239
# in the serie
240-
if module_info.get("installable", False):
240+
if module_info.get("installable", True):
241241
module_info["technical_name"] = module_name
242242
module_version_obj.create_or_update_from_manifest(
243243
module_info, self, full_module_path
244244
)
245+
else:
246+
# Otherwise remove module version if exist
247+
module_version = self.search(
248+
[
249+
("technical_name", "=", module_name),
250+
("repository_branch_id", "=", self.id),
251+
]
252+
)
253+
if module_version:
254+
module_version._process_clean_module_version()
255+
245256
except Exception as e:
246257
_logger.error(
247258
"Cannot process module with name %s, error " "is: %s", module_name, e

0 commit comments

Comments
 (0)