From fef9edbfb1f8706aadd30b6177a41e41110bb2c1 Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Mon, 27 Jul 2026 23:57:04 -0400 Subject: [PATCH 1/6] [IMP] script install: quiet poetry/repo by default, EL_VERBOSE to opt in MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Installation was very noisy: poetry ran "install -vvv" and repo sync / git daemon ran with -v/--verbose. They are now quiet by default (poetry -q, repo sync -q, no git daemon --verbose) and the detailed logs come back only when EL_VERBOSE=1. Applied to install_locally.sh (poetry) and every manifest script (repo sync + git daemon). env_var.sh documents EL_VERBOSE and respects a value already set in the environment, so "EL_VERBOSE=1 make install_odoo_18" works. --- FR --- L'installation était très bavarde : poetry tournait en « install -vvv », et repo sync comme git daemon en -v/--verbose. Ils sont désormais silencieux par défaut — poetry -q, repo sync -q, plus de git daemon --verbose — et les journaux détaillés ne reviennent qu'avec EL_VERBOSE=1. Appliqué à install_locally.sh (poetry) et à tous les scripts de manifest (repo sync et git daemon). env_var.sh documente EL_VERBOSE et respecte une valeur déjà passée dans l'environnement, si bien que « EL_VERBOSE=1 make install_odoo_18 » fonctionne. Assisted-by: Claude Opus 4.8 --- env_var.sh | 4 ++++ script/install/install_locally.sh | 10 +++++++++- script/manifest/update_manifest_dev.sh | 10 +++++++++- script/manifest/update_manifest_local_dev.sh | 12 ++++++++++-- .../update_manifest_local_dev_code_generator.sh | 12 ++++++++++-- script/manifest/update_manifest_local_mobile.sh | 12 ++++++++++-- script/manifest/update_manifest_local_prod.sh | 12 ++++++++++-- script/manifest/update_manifest_prod.sh | 10 +++++++++- 8 files changed, 71 insertions(+), 11 deletions(-) diff --git a/env_var.sh b/env_var.sh index b13134c..c899ad9 100755 --- a/env_var.sh +++ b/env_var.sh @@ -33,3 +33,7 @@ EL_GITHUB_TOKEN="" EL_MANIFEST_PROD="./default.xml" EL_MANIFEST_DEV="./manifest/git_manifest_erplibre.xml" EL_LANG="fr" +# Verbosité de l'installation (poetry install, repo sync, git daemon). +# 0 = silencieux (défaut), 1 = logs détaillés. On respecte une valeur déjà +# passée en environnement : EL_VERBOSE=1 make install_odoo_18 +EL_VERBOSE="${EL_VERBOSE:-0}" diff --git a/script/install/install_locally.sh b/script/install/install_locally.sh index 8148e50..331701c 100755 --- a/script/install/install_locally.sh +++ b/script/install/install_locally.sh @@ -22,6 +22,14 @@ VENV_ODOO_PATH=".venv.${EL_ERPLIBRE_VERSION}" POETRY_ODOO_PATH=${VENV_ERPLIBRE_PATH}/bin/poetry export WITH_POETRY_INSTALLATION=1 +# Verbosité de l'installation Poetry : silencieuse (-q) par défaut, les logs +# détaillés (-vvv) reviennent avec la variable d'environnement EL_VERBOSE=1. +if [[ "${EL_VERBOSE:-0}" == "1" ]]; then + POETRY_VERBOSE="-vvv" +else + POETRY_VERBOSE="-q" +fi + # EL_PHASE controls which steps to execute. Used by install_locally_dev.sh # for parallel installation — do not set manually unless you know what you do. # all (default) – full install: setup + poetry phases @@ -83,7 +91,7 @@ if [[ "${EL_PHASE}" != "setup" ]]; then # To fix keyring problem when installation is blocked, use export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring if [[ ${WITH_POETRY_INSTALLATION} -ne 0 ]]; then - poetry install --no-root -vvv + poetry install --no-root ${POETRY_VERBOSE} fi retVal=$? if [[ $retVal -ne 0 ]]; then diff --git a/script/manifest/update_manifest_dev.sh b/script/manifest/update_manifest_dev.sh index f36cd22..4d7561d 100755 --- a/script/manifest/update_manifest_dev.sh +++ b/script/manifest/update_manifest_dev.sh @@ -2,6 +2,14 @@ . ./env_var.sh +# Verbosité de l'installation (git-repo). Silencieuse par défaut ; +# EL_VERBOSE=1 rétablit les logs détaillés (repo sync, git daemon). +if [ "${EL_VERBOSE:-0}" = "1" ]; then + REPO_VERBOSE="-v"; DAEMON_VERBOSE="--verbose" +else + REPO_VERBOSE="-q"; DAEMON_VERBOSE="" +fi + #EL_MANIFEST_PROD="./default.xml" #EL_MANIFEST_DEV="./manifest/default.dev.xml" @@ -10,4 +18,4 @@ # Update git-repo .venv.erplibre/bin/repo init -u https://github.com/ERPLibre/ERPLibre -b $(git rev-parse --verify HEAD) -m ${EL_MANIFEST_DEV} -.venv.erplibre/bin/repo sync -v +.venv.erplibre/bin/repo sync ${REPO_VERBOSE} diff --git a/script/manifest/update_manifest_local_dev.sh b/script/manifest/update_manifest_local_dev.sh index 8b8c5f2..abdc5c3 100755 --- a/script/manifest/update_manifest_local_dev.sh +++ b/script/manifest/update_manifest_local_dev.sh @@ -1,11 +1,19 @@ #!/usr/bin/env bash . ./env_var.sh + +# Verbosité de l'installation (git-repo). Silencieuse par défaut ; +# EL_VERBOSE=1 rétablit les logs détaillés (repo sync, git daemon). +if [ "${EL_VERBOSE:-0}" = "1" ]; then + REPO_VERBOSE="-v"; DAEMON_VERBOSE="--verbose" +else + REPO_VERBOSE="-q"; DAEMON_VERBOSE="" +fi #EL_MANIFEST_PROD="./default.xml" #EL_MANIFEST_DEV="./manifest/default.dev.xml" # Update git-repo -git daemon --base-path=. --export-all --reuseaddr --informative-errors --verbose & +git daemon --base-path=. --export-all --reuseaddr --informative-errors ${DAEMON_VERBOSE} & DAEMON_PID=$! if [ -L "$EL_MANIFEST_DEV" ]; then @@ -24,6 +32,6 @@ fi .venv.erplibre/bin/python ./script/git/git_merge_repo_manifest.py --output .repo/local_manifests/erplibre_manifest.xml --with_OCA .venv.erplibre/bin/repo init -u git://127.0.0.1:9418/ -b $(git rev-parse --verify HEAD) -m ${MANIFEST_TARGET} "$@" -.venv.erplibre/bin/repo sync -c -j "$JOBS" -v -m ${MANIFEST_TARGET} +.venv.erplibre/bin/repo sync -c -j "$JOBS" ${REPO_VERBOSE} -m ${MANIFEST_TARGET} kill ${DAEMON_PID} diff --git a/script/manifest/update_manifest_local_dev_code_generator.sh b/script/manifest/update_manifest_local_dev_code_generator.sh index e9635fd..c57d54c 100755 --- a/script/manifest/update_manifest_local_dev_code_generator.sh +++ b/script/manifest/update_manifest_local_dev_code_generator.sh @@ -2,11 +2,19 @@ . ./env_var.sh +# Verbosité de l'installation (git-repo). Silencieuse par défaut ; +# EL_VERBOSE=1 rétablit les logs détaillés (repo sync, git daemon). +if [ "${EL_VERBOSE:-0}" = "1" ]; then + REPO_VERBOSE="-v"; DAEMON_VERBOSE="--verbose" +else + REPO_VERBOSE="-q"; DAEMON_VERBOSE="" +fi + #EL_MANIFEST_PROD="./default.xml" #EL_MANIFEST_DEV="./manifest/default.dev.xml" # Update git-repo -git daemon --base-path=. --export-all --reuseaddr --informative-errors --verbose & +git daemon --base-path=. --export-all --reuseaddr --informative-errors ${DAEMON_VERBOSE} & DAEMON_PID=$! if [ -L "$EL_MANIFEST_DEV" ]; then @@ -25,6 +33,6 @@ fi .venv.erplibre/bin/python ./script/git/git_merge_repo_manifest.py --output .repo/local_manifests/erplibre_manifest.xml --with_OCA .venv.erplibre/bin/repo init -u git://127.0.0.1:9418/ -b $(git rev-parse --verify HEAD) -m ${MANIFEST_TARGET} -g base,code_generator -.venv.erplibre/bin/repo sync -c -j "$JOBS" -v -m ${MANIFEST_TARGET} +.venv.erplibre/bin/repo sync -c -j "$JOBS" ${REPO_VERBOSE} -m ${MANIFEST_TARGET} kill ${DAEMON_PID} diff --git a/script/manifest/update_manifest_local_mobile.sh b/script/manifest/update_manifest_local_mobile.sh index 32d588e..dfaa97a 100755 --- a/script/manifest/update_manifest_local_mobile.sh +++ b/script/manifest/update_manifest_local_mobile.sh @@ -1,11 +1,19 @@ #!/usr/bin/env bash . ./env_var.sh + +# Verbosité de l'installation (git-repo). Silencieuse par défaut ; +# EL_VERBOSE=1 rétablit les logs détaillés (repo sync, git daemon). +if [ "${EL_VERBOSE:-0}" = "1" ]; then + REPO_VERBOSE="-v"; DAEMON_VERBOSE="--verbose" +else + REPO_VERBOSE="-q"; DAEMON_VERBOSE="" +fi #EL_MANIFEST_PROD="./default.xml" #EL_MANIFEST_DEV="./manifest/default.dev.xml" # Update git-repo -git daemon --base-path=. --export-all --reuseaddr --informative-errors --verbose & +git daemon --base-path=. --export-all --reuseaddr --informative-errors ${DAEMON_VERBOSE} & DAEMON_PID=$! if [ -L "$EL_MANIFEST_DEV" ]; then @@ -24,6 +32,6 @@ fi .venv.erplibre/bin/python ./script/git/git_merge_repo_manifest.py --output .repo/local_manifests/erplibre_manifest.xml --with_mobile .venv.erplibre/bin/repo init -u git://127.0.0.1:9418/ -b $(git rev-parse --verify HEAD) -m ${MANIFEST_TARGET} "$@" -.venv.erplibre/bin/repo sync -c -j "$JOBS" -v -m ${MANIFEST_TARGET} +.venv.erplibre/bin/repo sync -c -j "$JOBS" ${REPO_VERBOSE} -m ${MANIFEST_TARGET} kill ${DAEMON_PID} diff --git a/script/manifest/update_manifest_local_prod.sh b/script/manifest/update_manifest_local_prod.sh index 09c7d57..bee78d7 100755 --- a/script/manifest/update_manifest_local_prod.sh +++ b/script/manifest/update_manifest_local_prod.sh @@ -2,11 +2,19 @@ . ./env_var.sh +# Verbosité de l'installation (git-repo). Silencieuse par défaut ; +# EL_VERBOSE=1 rétablit les logs détaillés (repo sync, git daemon). +if [ "${EL_VERBOSE:-0}" = "1" ]; then + REPO_VERBOSE="-v"; DAEMON_VERBOSE="--verbose" +else + REPO_VERBOSE="-q"; DAEMON_VERBOSE="" +fi + #EL_MANIFEST_PROD="./default.xml" #EL_MANIFEST_DEV="./manifest/default.dev.xml" # Update git-repo -git daemon --base-path=. --export-all --reuseaddr --informative-errors --verbose & +git daemon --base-path=. --export-all --reuseaddr --informative-errors ${DAEMON_VERBOSE} & DAEMON_PID=$! if [ -L "$EL_MANIFEST_DEV" ]; then @@ -25,6 +33,6 @@ fi .venv.erplibre/bin/python ./script/git/git_merge_repo_manifest.py --output .repo/local_manifests/erplibre_manifest.xml --with_OCA .venv.erplibre/bin/repo init -u git://127.0.0.1:9418/ -b $(git rev-parse --verify HEAD) -m ${MANIFEST_TARGET} -.venv.erplibre/bin/repo sync -c -j "$JOBS" -v -m ${MANIFEST_TARGET} +.venv.erplibre/bin/repo sync -c -j "$JOBS" ${REPO_VERBOSE} -m ${MANIFEST_TARGET} kill ${DAEMON_PID} diff --git a/script/manifest/update_manifest_prod.sh b/script/manifest/update_manifest_prod.sh index fa3beb0..d6b9b0a 100755 --- a/script/manifest/update_manifest_prod.sh +++ b/script/manifest/update_manifest_prod.sh @@ -2,6 +2,14 @@ . ./env_var.sh +# Verbosité de l'installation (git-repo). Silencieuse par défaut ; +# EL_VERBOSE=1 rétablit les logs détaillés (repo sync, git daemon). +if [ "${EL_VERBOSE:-0}" = "1" ]; then + REPO_VERBOSE="-v"; DAEMON_VERBOSE="--verbose" +else + REPO_VERBOSE="-q"; DAEMON_VERBOSE="" +fi + #EL_MANIFEST_PROD="./default.xml" #EL_MANIFEST_DEV="./manifest/default.dev.xml" @@ -16,4 +24,4 @@ fi # Update git-repo .venv.erplibre/bin/repo init -u https://github.com/ERPLibre/ERPLibre -b $(git rev-parse --verify HEAD) -.venv.erplibre/bin/repo sync -v -j "$JOBS" +.venv.erplibre/bin/repo sync ${REPO_VERBOSE} -j "$JOBS" From 70e807cea91d3049af5bcbee694ea92da41b66b6 Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Fri, 31 Jul 2026 01:01:11 -0400 Subject: [PATCH 2/6] [UPD] manifest odoo 12: update repo OCA_queue --- manifest/git_manifest_odoo12.0.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest/git_manifest_odoo12.0.xml b/manifest/git_manifest_odoo12.0.xml index 08c03df..340c2cc 100644 --- a/manifest/git_manifest_odoo12.0.xml +++ b/manifest/git_manifest_odoo12.0.xml @@ -753,7 +753,7 @@ name="queue.git" path="odoo12.0/addons/OCA_queue" remote="ERPLibre_origin_OCA" - revision="12.0" + revision="erplibre/12.0" groups="addons,odoo12.0" /> Date: Thu, 30 Jul 2026 15:15:32 -0400 Subject: [PATCH 3/6] =?UTF-8?q?[FIX]=20selenium:=20retirer=20-remote-allow?= =?UTF-8?q?-system-access=20(refus=C3=A9=20par=20geckodriver=20r=C3=A9cent?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit webdriver.Firefox échouait : « InvalidArgumentException: Argument --remote-allow-system-access can't be set via capabilities ». Cet argument (ajouté pour le Firefox snap d'Ubuntu) est désormais REFUSÉ via les capabilities par les geckodriver récents, qui gèrent seuls l'accès système du snap. Il cassait donc TOUS les setups sur geckodriver récent (ici Arch sans snap). On ne le passe plus. --- EN --- webdriver.Firefox was failing with « InvalidArgumentException: Argument --remote-allow-system-access can't be set via capabilities ». That argument, added for Ubuntu's snap Firefox, is now REFUSED through capabilities by recent geckodriver versions, which handle the snap's system access on their own. It therefore broke EVERY setup running a recent geckodriver — here Arch, with no snap at all. It is no longer passed. Assisted-by: Claude Opus 4.8 --- script/selenium/selenium_lib.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/script/selenium/selenium_lib.py b/script/selenium/selenium_lib.py index 09593dc..f0cba6d 100644 --- a/script/selenium/selenium_lib.py +++ b/script/selenium/selenium_lib.py @@ -312,7 +312,12 @@ class SeleniumLib(object): command_executor=driver_url, ) else: - firefox_options.add_argument("-remote-allow-system-access") + # NE PAS passer « -remote-allow-system-access » : les + # geckodriver récents le REFUSENT via les capabilities + # (« Argument --remote-allow-system-access can't be set via + # capabilities ») et gèrent seuls l'accès système du Firefox + # snap. Le passer cassait TOUS les setups sur geckodriver + # récent (pas seulement snap/Ubuntu). self.driver = webdriver.Firefox( options=firefox_options, service=firefox_services, From 751cdbbd293adedb4a7f664e26164005b3873026 Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Thu, 30 Jul 2026 15:11:12 -0400 Subject: [PATCH 4/6] [FIX] selenium: importer Optional (NameError sur l'annotation de type) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit extraire_svg_graphique_by_3d annote « -> Optional[str] » mais le module n'importait pas Optional -> « NameError: name 'Optional' is not defined » au chargement. Ajout de « from typing import Optional ». --- EN --- extraire_svg_graphique_by_3d is annotated « -> Optional[str] » but the module never imported Optional -> « NameError: name 'Optional' is not defined » at import time. Added « from typing import Optional ». Assisted-by: Claude Opus 4.8 --- script/selenium/selenium_lib.py | 1 + 1 file changed, 1 insertion(+) diff --git a/script/selenium/selenium_lib.py b/script/selenium/selenium_lib.py index f0cba6d..6847259 100644 --- a/script/selenium/selenium_lib.py +++ b/script/selenium/selenium_lib.py @@ -16,6 +16,7 @@ import time import tkinter as tk from pathlib import Path from tkinter import filedialog +from typing import Optional from pykeepass import PyKeePass from randomwordfr import RandomWordFr From b9c9ed8241f44b2a0a95941c8c0a2ca3409a3257 Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Wed, 29 Jul 2026 23:49:56 -0400 Subject: [PATCH 5/6] =?UTF-8?q?[FIX]=20install:=20propager=20l'=C3=A9chec?= =?UTF-8?q?=20au=20code=20de=20sortie=20(faux=20=E2=9C=85=20du=20suivi=20c?= =?UTF-8?q?orrig=C3=A9)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit update_env_version.py (cible « make install_odoo_XX ») calculait un statut mais ne faisait JAMAIS sys.exit() et IGNORAIT le retour de update_environment() (l'install réelle : venv/poetry). Résultat : même quand install_locally.sh échouait (ex. poetry status 127), le script sortait 0 -> make 0 -> remote « && » continuait (service créé) -> __ERPLIBRE_EXIT__ 0 -> le suivi d'installation affichait ✅ à tort. - main() suit un exit_code : install_system() ou update_environment() renvoyant une valeur non nulle (os.system : 0 = succès) -> exit_code=1. - sys.exit(main() or 0) propage réellement l'échec. - Étapes post-install (pycharm, git_repo_update, generate_config) exécutées seulement si l'install a réussi (sinon .venv.erplibre absent -> cascade d'erreurs). Chaîne désormais complète : install_locally.sh exit 1 -> install_locally_ dev.sh exit 1 -> os.system != 0 -> install_erplibre != 0 -> update_environment != 0 -> main exit_code=1 -> sys.exit(1) -> make échoue -> remote && stoppe -> __ERPLIBRE_EXIT__ != 0 -> dashboard ❌. --- EN --- update_env_version.py, the « make install_odoo_XX » target, computed a status but NEVER called sys.exit() and IGNORED the return of update_environment(), the real install with its venv and poetry. As a result, even when install_locally.sh failed — poetry status 127, say — the script exited 0 -> make exited 0 -> the remote « && » carried on and created the service -> __ERPLIBRE_EXIT__ was 0 -> and the install monitor wrongly showed ✅. - main() tracks an exit_code: install_system() or update_environment() returning non-zero — with os.system, 0 means success — sets exit_code=1. - sys.exit(main() or 0) actually propagates the failure. - The post-install steps (pycharm, git_repo_update, generate_config) only run when the install succeeded; otherwise .venv.erplibre is missing and errors cascade. The chain is now complete: install_locally.sh exit 1 -> install_locally_dev.sh exit 1 -> os.system != 0 -> install_erplibre != 0 -> update_environment != 0 -> main exit_code=1 -> sys.exit(1) -> make fails -> the remote && stops -> __ERPLIBRE_EXIT__ != 0 -> dashboard ❌. Assisted-by: Claude Opus 4.8 --- script/version/update_env_version.py | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/script/version/update_env_version.py b/script/version/update_env_version.py index 154913b..5f7d6e5 100755 --- a/script/version/update_env_version.py +++ b/script/version/update_env_version.py @@ -709,6 +709,11 @@ def main(): update.validate_version() _logger.info("Validate environment") + # exit_code : propagé à sys.exit() -> une install qui ÉCHOUE renvoie un + # code non nul (avant, main() ne sortait jamais en erreur : le suivi + # d'installation affichait ✅ même quand poetry/pyenv plantaient). + # Rappel os.system : 0 = succès ; toute autre valeur = échec. + exit_code = 0 status = 0 if ( update.config.install_dev @@ -718,16 +723,22 @@ def main(): status = update.validate_environment() if update.config.install: status = update.install_system() + if status not in (0, True, None): + exit_code = 1 if ( update.config.force_install or update.config.install_dev or update.config.partial_install or update.config.is_in_switch ) and not status: - update.update_environment() + rc = update.update_environment() + if rc not in (0, True, None): + exit_code = 1 update.print_log() - if update.config.install_dev: + # Étapes post-install : uniquement si l'installation a RÉUSSI (sinon + # .venv.erplibre est absent -> cascade d'erreurs inutiles). + if update.config.install_dev and exit_code == 0: # Update pycharm configuration update.pycharm_update() @@ -736,6 +747,8 @@ def main(): "./.venv.erplibre/bin/python ./script/git/git_repo_update_group.py" ) os.system("./script/generate_config.sh") + + return exit_code # TODO ignore this if installation fail # TODO this cause an error at first execution, need to source ./.venv.erplibre/bin/activate and rerun @@ -756,4 +769,4 @@ def die(cond, message, code=1): if __name__ == "__main__": - main() + sys.exit(main() or 0) From 6443855a92891f7d69f7f1392c159ba590058871 Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Fri, 31 Jul 2026 00:59:49 -0400 Subject: [PATCH 6/6] =?UTF-8?q?[FIX]=20install:=20--with=5Fextra=20sans=20?= =?UTF-8?q?effet=20sur=20un=20env=20d=C3=A9j=C3=A0=20install=C3=A9=20(Cybr?= =?UTF-8?q?oOdoo)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit « Installation avec modules extra » (--with_extra) ne clonait pas CybroOdoo sur un env déjà installé : validate_environment renvoyait « valide » -> update_environment (où l'état extra est posé via set_version_installed) était sauté -> get_version_extra restait False -> git_merge_repo_manifest n'ajoutait pas manifest/git_manifest_extra_odooXX.xml -> CybroOdoo jamais synchronisé ni ajouté à config.conf (« Nothing to do »). Nouvelle étape apply_extra_modules(), appelée dans main() quand --with_extra est demandé (même si l'env de base est déjà installé) : pose l'état extra, régénère le manifest local + repo sync (clone CybroOdoo). La post-étape qui suit régénère config.conf, qui prend alors le nouveau chemin d'addons. --- EN --- « Install with extra modules » (--with_extra) did not clone CybroOdoo on an already-installed environment: validate_environment answered « valid » -> update_environment, where the extra state is set through set_version_installed, was skipped -> get_version_extra stayed False -> git_merge_repo_manifest did not add manifest/git_manifest_extra_odooXX.xml -> CybroOdoo was never synced nor added to config.conf (« Nothing to do »). A new step, apply_extra_modules(), is called from main() whenever --with_extra is requested, even on an already-installed base environment: it sets the extra state and regenerates the local manifest plus a repo sync, which clones CybroOdoo. The post-step that follows regenerates config.conf, which then picks up the new addons path. Assisted-by: Claude Opus 4.8 --- script/version/update_env_version.py | 31 ++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/script/version/update_env_version.py b/script/version/update_env_version.py index 5f7d6e5..ca265b1 100755 --- a/script/version/update_env_version.py +++ b/script/version/update_env_version.py @@ -524,6 +524,28 @@ class Update: status = os.system("./script/install/install_locally_dev.sh") return status + def apply_extra_modules(self): + """Add the extra modules (CybroOdoo) to the repo manifest, EVEN when + the base environment is already installed. Records the extra state so + git_merge_repo_manifest includes manifest/git_manifest_extra_odooXX.xml, + then re-generates the local manifest and re-syncs the repos (the Odoo + config is regenerated by the post-install step that follows). + + Without this, « --with_extra » on an already-installed env was a no-op: + update_environment() (where the extra state is set) is skipped when the + env is valid, so get_version_extra() stayed False and CybroOdoo was + never cloned nor added to config.conf. Returns the os.system status.""" + _logger.info("Applying extra modules (CybroOdoo) to the manifest...") + if _STATE_AVAILABLE: + set_version_installed( + self.new_version_odoo, + extra=True, + python=self.new_version_python, + poetry=self.new_version_poetry, + ) + self.execute_log.append("Extra modules (CybroOdoo)") + return os.system("./script/manifest/update_manifest_local_dev.sh") + def install_system(self): self.execute_log.append(f"System installation") status = os.system("./script/install/install_dev.sh") @@ -736,6 +758,15 @@ def main(): exit_code = 1 update.print_log() + # --with_extra : appliquer les modules extra (CybroOdoo) MÊME si l'env de + # base est déjà installé (sinon update_environment est sauté -> « Nothing + # to do » et CybroOdoo n'est jamais ajouté au repo ni à config.conf). + # Placé AVANT la régénération de config (post-étape) pour qu'elle le prenne. + if update.config.with_extra and exit_code == 0: + rc = update.apply_extra_modules() + if rc not in (0, True, None): + exit_code = 1 + # Étapes post-install : uniquement si l'installation a RÉUSSI (sinon # .venv.erplibre est absent -> cascade d'erreurs inutiles). if update.config.install_dev and exit_code == 0: