From f7d19014f0ff654c8999d7513023074f56d2cd8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Andreatta?= Date: Wed, 24 Dec 2025 14:46:06 +0100 Subject: [PATCH] [IMP] Give the full list of available module if not depends provided --- common/odoo_context.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/common/odoo_context.py b/common/odoo_context.py index ad578d4..b764475 100644 --- a/common/odoo_context.py +++ b/common/odoo_context.py @@ -92,9 +92,22 @@ def get_dependency_modules( ) -> tuple[list[str], dict[str, Path]]: """Returns a list of module names and their paths based on dependencies.""" if not depends: - return [], {} + return self._get_all_available_modules() return self._build_dependency_info(depends, dependency_level) + def _get_all_available_modules(self) -> tuple[list[str], dict[str, Path]]: + """Retrieve all available modules from the addons paths.""" + module_paths: dict[str, Path] = {} + for addons_path in self.process.addons_paths: + if not addons_path.exists(): + continue + for child in addons_path.iterdir(): + if child.is_dir() and OdoobinProcess.check_addon_path(child): + if child.name not in module_paths: + module_paths[child.name] = child + + return list(module_paths.keys()), module_paths + def get_module_files(self, module_names: list[str], module_paths: dict[str, Path]) -> LLMPrompt: """Loads all text files from the specified modules.""" context = LLMPrompt()