erplibre/script/odoo/migration
Mathieu Benoit 5c4d71e7a2 [FIX] migration: reset the stale SCSS after the bump, not before
The fix was offered while the checkout was still on the previous
version. Answering « a » ran reset_asset in an Odoo 12 shell, which has
no web_editor.assets: KeyError, nothing changed, and the migration went
on to break at the next bump — measured on a real run.

Predicting early is right; fixing early is not. The early call is now
--report-only, and a second call comes after the bump, on the upgraded
database, where the checkout can do it. The tool also refuses on its
own: it reads the checkout sources for reset_asset rather than trusting
a version number, and says when to come back.

--- FR ---

[FIX] migration : réinitialiser le SCSS périmé après le palier, pas avant

La correction était proposée alors que le checkout était encore sur la
version précédente. Répondre « a » lançait reset_asset dans un shell
Odoo 12, sans web_editor.assets : KeyError, rien de modifié, et la
migration continuait jusqu'à casser au palier suivant. Mesuré.

Prédire tôt est juste ; corriger tôt ne l'est pas. L'appel précoce est
désormais --report-only, et un second vient après le palier, sur la
base montée de version, là où le checkout sait le faire. L'outil refuse
aussi de lui-même : il cherche reset_asset dans les sources du checkout
plutôt que de se fier à un numéro, et dit quand revenir.

Assisted-by: Claude Opus 5
(cherry picked from commit 13d4d0a33c63efcbafb5fb29313a5377ba5f508e)
2026-08-22 07:23:59 -04:00
..
check_cow_views.py [FIX] migration: the COW tools speak the system language 2026-08-22 07:23:59 -04:00
check_stale_scss.py [FIX] migration: reset the stale SCSS after the bump, not before 2026-08-22 07:23:59 -04:00
check_stale_scss_tui.py [ADD] migration: read the stale SCSS, then fix it, without leaving the tool 2026-08-22 07:23:59 -04:00
cow_drift.py [FIX] script: make the analysis and migration tools executable 2026-08-22 07:23:59 -04:00
cow_drift_tui.py [FIX] script: make the analysis and migration tools executable 2026-08-22 07:23:59 -04:00
fix_migration_odoo130_to_odoo140.sql [ADD] migration: see and repair the website COW views 2026-08-10 03:10:50 -04:00
fix_migration_odoo140_to_odoo150.py [FIX] script: make the analysis and migration tools executable 2026-08-22 07:23:59 -04:00
neutralize_cow_views.py [FIX] migration: the COW tools speak the system language 2026-08-22 07:23:59 -04:00
README.base.md [ADD] migration: see and repair the website COW views 2026-08-10 03:10:50 -04:00
README.fr.md [ADD] migration: see and repair the website COW views 2026-08-10 03:10:50 -04:00
README.md [ADD] migration: see and repair the website COW views 2026-08-10 03:10:50 -04:00
reset_stale_cow_views.py [FIX] migration: the COW tools speak the system language 2026-08-22 07:23:59 -04:00
snapshot_cow_views.py [FIX] migration: the COW tools speak the system language 2026-08-22 07:23:59 -04:00
uninstall_module_list_odoo140_to_odoo150.txt [IMP] todo support odoo upgrade 2025-10-31 01:43:26 -04:00

Migration

Run this script when doing database migration. Example :

source ./.venv.odoo15.0_python3.8.20/bin/activate && cat ./script/odoo/migration/fix_migration_odoo140_to_odoo150.py | ./odoo15.0/odoo/odoo-bin shell -d DATABASE

Check uninstall_module_list_odoo140_to_odoo150.txt

Module lists to uninstall

Before a version bump, the migration uninstalls the modules listed in uninstall_module_list_odoo<from>_to_odoo<to>.txt. Two locations are read, the private one first, and the results are merged (duplicates dropped):

  1. private/odoo/migration/<database>/uninstall_module_list_odooXX0_to_odooYY0.txt — specific to ONE database, not versioned. Which modules must be dropped depends on the data, so this is where nearly every entry belongs.
  2. script/odoo/migration/uninstall_module_list_odooXX0_to_odooYY0.txt — shared defaults, versioned, valid for every database.

Syntax: one module per line, with a justification after #. Commas and several names per line are accepted; blank lines and full-line comments are ignored. A module without a stated reason is flagged at runtime: removing a module is a decision someone must be able to review later.

queue_job                        # blocks 12->13, trigger queue_job_notify
mgmtsystem_hazard                # not ported to 13.0
web_syncer                       # dropped upstream