erplibre/script/addons
Mathieu Benoit aa2f78c404 [ADD] addons: uninstall a theme the way Odoo removes one
There was no counterpart to install_addons_theme.sh, so themes were
removed with a plain --uninstall. That takes out the module, not the
theme: it skips _theme_remove(), whose first act is
_reset_default_config() — the call that writes font-number and its
three neighbours into user_values.scss.

Measured on a real 12 -> 13 migration: web.assets_frontend stopped on
« Undefined variable: $o-theme-font-number ». Odoo 12 defined it in
option_font_body_*, dropped in 13.0; only the theme still redefined
it, so removing the theme exposed a frozen 2020 customization.

theme_leftover.py then reports what unloading does not take — 15
attachments on the measured database. It deletes nothing: their
content may be the only trace of a customization.

--- FR ---

[ADD] addons : désinstaller un thème comme Odoo le retire

install_addons_theme.sh n'avait pas de symétrique : on retirait donc
les thèmes par un --uninstall nu. Cela enlève le module, pas le thème
— cela saute _theme_remove(), dont le premier geste est
_reset_default_config(), l'appel qui écrit font-number et ses trois
voisines dans user_values.scss.

Mesuré sur une vraie migration 12 → 13 : web.assets_frontend s'arrête
sur « Undefined variable: $o-theme-font-number ». Odoo 12 la
définissait dans option_font_body_*, supprimés en 13.0 ; seul le thème
la redéfinissait, et le retirer a mis à nu un SCSS figé en 2020.

theme_leftover.py signale ensuite ce que le déchargement ne prend pas
— 15 pièces jointes sur la base mesurée. Il ne supprime rien : leur
contenu peut être la seule trace d'une personnalisation.

Assisted-by: Claude Opus 5
(cherry picked from commit 16a7b1e1333752e2ef603d66f47374a22590d665)
2026-08-22 07:23:59 -04:00
..
check_addons_exist.py [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00
coverage_install_addons.sh [FIX] script python: missing color log error 2024-05-03 23:13:59 -04:00
coverage_install_addons_dev.sh [FIX] script python: missing color log error 2024-05-03 23:13:59 -04:00
coverage_install_addons_restore_dev.sh [FIX] script python: missing color log error 2024-05-03 23:13:59 -04:00
install_addons.sh [FIX] script python: missing color log error 2024-05-03 23:13:59 -04:00
install_addons_cg_template_restore_dev.sh [FIX] script python: missing color log error 2024-05-03 23:13:59 -04:00
install_addons_debug.sh [ADD] script addons install with debug 2026-01-23 02:57:20 -05:00
install_addons_dev.sh [FIX] script python: missing color log error 2024-05-03 23:13:59 -04:00
install_addons_from_file.sh [IMP] support change odoo and python version 2024-11-02 02:26:02 -04:00
install_addons_restore_dev.sh [FIX] script python: missing color log error 2024-05-03 23:13:59 -04:00
install_addons_theme.sh [FIX] script python: missing color log error 2024-05-03 23:13:59 -04:00
reinstall_addons.sh [FIX] script python: missing color log error 2024-05-03 23:13:59 -04:00
theme_leftover.py [ADD] addons: uninstall a theme the way Odoo removes one 2026-08-22 07:23:59 -04:00
uninstall_addons.sh [FIX] script python: missing color log error 2024-05-03 23:13:59 -04:00
uninstall_addons_theme.sh [ADD] addons: uninstall a theme the way Odoo removes one 2026-08-22 07:23:59 -04:00
update_addons_all.sh [FIX] script python: missing color log error 2024-05-03 23:13:59 -04:00
update_prod_to_dev.sh [IMP] todo support odoo upgrade 2025-10-31 01:43:26 -04:00