erplibre/script/odoo/migration
Mathieu Benoit 4ce612b008 [IMP] migration: say when the COW question is actually asked
An early check warns, hours before the bump, that a copy will break it. It
then says « arbitrate BEFORE launching the migration » and hands over a raw
UPDATE — and no question follows. Read on a resumed run it looks like the
question already went by and was skipped, which is exactly how it was read.

It now says the migration asks at the bump itself, and shows what each copy
holds before the answer. The manual UPDATE stays, but after the two commands
that do it reversibly: telling someone to hand-write SQL when --restore exists
is offering the sharper tool first.

--- FR ---

Un contrôle précoce prévient, des heures avant le palier, qu'une copie va le
casser. Il dit ensuite « arbitrez AVANT de lancer la migration » et livre un
UPDATE brut — et aucune question ne suit. Lu au cours d'une reprise, on croit
que la question est passée et a été sautée, ce qui est exactement la lecture
qui en a été faite.

Il dit maintenant que la migration pose la question au palier lui-même, en
montrant ce que chaque copie contient avant qu'on réponde. L'UPDATE manuel
reste, mais après les deux commandes qui le font de façon réversible : dire à
quelqu'un d'écrire du SQL à la main quand --restore existe, c'est tendre
l'outil le plus coupant en premier.

Assisted-by: Claude Opus 5
2026-08-22 07:23:59 -04:00
..
check_cow_views.py [IMP] migration: say when the COW question is actually asked 2026-08-22 07:23:59 -04:00
cow_drift.py [IMP] migration: say why Odoo changing its own template is our problem 2026-08-22 07:23:59 -04:00
cow_drift_tui.py [ADD] migration: look at a COW copy before agreeing to give it up 2026-08-17 01:25:23 -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 [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00
neutralize_cow_views.py [ADD] migration: look at a COW copy before agreeing to give it up 2026-08-17 01:25:23 -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 [ADD] migration: see and repair the website COW views 2026-08-10 03:10:50 -04:00
snapshot_cow_views.py [ADD] migration: see and repair the website COW views 2026-08-10 03:10:50 -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