Skip to content

Commit 31bd989

Browse files
committed
Merge PR #136 into 18.0
Signed-off-by pedrobaeza
2 parents 4a57125 + 45e88dd commit 31bd989

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
@@ -233,11 +233,22 @@ def _analyze_module_name(self, path, module_name):
233233
odoo.addons.__path__.remove(path)
234234
# Create module version, if the module is installable
235235
# in the serie
236-
if module_info.get("installable", False):
236+
if module_info.get("installable", True):
237237
module_info["technical_name"] = module_name
238238
module_version_obj.create_or_update_from_manifest(
239239
module_info, self, full_module_path
240240
)
241+
else:
242+
# Otherwise remove module version if exist
243+
module_version = self.search(
244+
[
245+
("technical_name", "=", module_name),
246+
("repository_branch_id", "=", self.id),
247+
]
248+
)
249+
if module_version:
250+
module_version._process_clean_module_version()
251+
241252
except Exception as e:
242253
_logger.error(
243254
"Cannot process module with name %s, error " "is: %s", module_name, e

0 commit comments

Comments
 (0)