diff --git a/script/odoo/migration/check_cow_views.py b/script/odoo/migration/check_cow_views.py index 07321a0..d01d2fa 100755 --- a/script/odoo/migration/check_cow_views.py +++ b/script/odoo/migration/check_cow_views.py @@ -313,7 +313,15 @@ def main(): f" : {mode} -> {target_mode} ({reason})" ) print( - " Arbitrate BEFORE launching the migration. To neutralize a copy," + " The migration will offer to neutralize them at the bump, and" + " shows what each copy holds before you answer. To do it now:" + "\n ./script/odoo/migration/cow_drift.py -d DB -t odooXX.0" + " (read what they hold)" + "\n ./script/odoo/migration/neutralize_cow_views.py -d DB" + " -t odooXX.0 --apply (reversible with --restore)" + ) + print( + " Or by hand. To neutralize a copy," " rename its key (UPDATE ir_ui_view SET key='zz_cow_archive.'||key," " active=false): an unmatched key is never paired with the module" " view, so the copy never receives the new inherit_id. Setting" diff --git a/script/todo/todo_i18n.py b/script/todo/todo_i18n.py index ef08606..8e83355 100644 --- a/script/todo/todo_i18n.py +++ b/script/todo/todo_i18n.py @@ -3872,6 +3872,33 @@ TRANSLATIONS = { "fr": "faite plus tôt, avant la neutralisation", "en": "done early, before the neutralization", }, + "compare each website copy with the module view it shadows": { + "fr": "comparer chaque copie de site web à la vue de module qu'elle" + " masque", + "en": "compare each website copy with the module view it shadows", + }, + "Compare the website copies with the view they shadow": { + "fr": "🪞 Comparer les copies de site web à la vue qu'elles masquent", + "en": "🪞 Compare the website copies with the view they shadow", + }, + "website copies compared with their module view,": { + "fr": "copies de site web comparées à leur vue de module,", + "en": "website copies compared with their module view,", + }, + "differ.": {"fr": "diffèrent.", "en": "differ."}, + "Nothing to decide yet": { + "fr": "Rien à décider pour l'instant", + "en": "Nothing to decide yet", + }, + "the migration will offer to neutralize these copies": { + "fr": "la migration proposera de neutraliser ces copies", + "en": "the migration will offer to neutralize these copies", + }, + "at the version bump itself, showing what each one holds.": { + "fr": "au moment du palier lui-même, en montrant ce que chacune" + " contient.", + "en": "at the version bump itself, showing what each one holds.", + }, # --- script/analyse : vues personnalisées --- "Customised views": { "fr": "Vues personnalisées", diff --git a/script/todo/todo_upgrade.py b/script/todo/todo_upgrade.py index c75a592..0daace6 100755 --- a/script/todo/todo_upgrade.py +++ b/script/todo/todo_upgrade.py @@ -1457,11 +1457,22 @@ class TodoUpgrade: # -- before hours of migration -- leaves time to arbitrate. # Only the next bump can be predicted: the modes in database describe # the current version. - self.todo_upgrade_execute( + status, cmd_executed, output = self.todo_upgrade_execute( f"{PYTHON_BIN} ./script/odoo/migration/check_cow_views.py" f" -d {database_name} -t odoo{start_version + 1}.0", + get_output=True, wait_at_error=False, ) + # Cet avertissement n'est qu'un avertissement, et rien ne le disait : + # il annonce un problème, propose d'arbitrer, et aucune question ne + # suit. On en conclut que la question est passée — alors qu'elle vient + # au moment du palier, des dizaines de minutes plus tard. + if output and "will break when moving to" in "\n".join(output): + print( + f"ℹ -> {t('Nothing to decide yet')} :" + f" {t('the migration will offer to neutralize these copies')}" + f" {t('at the version bump itself, showing what each one holds.')}" + ) msg = "3 - Clean up database before data migration" print(f"🔷 {msg}")