Compare commits
4 commits
4dd57e4c50
...
db1e9fa24f
| Author | SHA1 | Date | |
|---|---|---|---|
| db1e9fa24f | |||
| 839ef08ea4 | |||
| a2b507c471 | |||
| b856548d64 |
1 changed files with 24 additions and 17 deletions
|
|
@ -10,11 +10,12 @@ import shutil
|
|||
import sys
|
||||
import zipfile
|
||||
from uuid import uuid4
|
||||
from script.todo.version_manager import get_odoo_version
|
||||
|
||||
import click
|
||||
import todo_file_browser
|
||||
|
||||
from script.todo.version_manager import get_odoo_version
|
||||
|
||||
new_path = os.path.normpath(
|
||||
os.path.join(os.path.dirname(__file__), "..", "..")
|
||||
)
|
||||
|
|
@ -768,6 +769,28 @@ class TodoUpgrade:
|
|||
|
||||
print("✅ -> Restore database")
|
||||
|
||||
if not self.dct_progression.get("state_1_update_all"):
|
||||
print(
|
||||
"[1] Update all addons before neutralize (already neutralize by odoo if supported)"
|
||||
)
|
||||
wait_continue = (
|
||||
input(
|
||||
"💬 Do you need to upgrade before a database neutralization, press to ignore : "
|
||||
)
|
||||
.strip()
|
||||
.lower()
|
||||
)
|
||||
if wait_continue == "1":
|
||||
status, cmd_executed = self.todo_upgrade_execute(
|
||||
f"./script/addons/update_addons_all.sh {database_name}",
|
||||
single_source_odoo=True,
|
||||
)
|
||||
if not status:
|
||||
self.dct_progression["state_1_update_all"] = True
|
||||
self.write_config()
|
||||
|
||||
print("✅ -> Update database before neutralize by module")
|
||||
|
||||
print("✅ -> Neutralize database")
|
||||
if do_neutralize:
|
||||
status, cmd_executed = self.todo_upgrade_execute(
|
||||
|
|
@ -793,22 +816,6 @@ class TodoUpgrade:
|
|||
self.dct_progression["state_1_neutralize_database"] = True
|
||||
self.write_config()
|
||||
|
||||
# Point de pause APRÈS la neutralisation : on propose de poursuivre la
|
||||
# mise à jour maintenant, ou d'attendre. L'état est déjà sauvegardé
|
||||
# (restore + neutralize) -> si on attend, relancer « Migration de base
|
||||
# de données » reprendra ici sans refaire ces étapes.
|
||||
ans = input(
|
||||
"\n💬 Neutralisation terminée. Poursuivre la mise à jour "
|
||||
"maintenant ? (o = poursuivre, n = attendre / reprendre "
|
||||
"plus tard) [o] : "
|
||||
).strip().lower()
|
||||
if ans in ("n", "non", "no"):
|
||||
print(
|
||||
"⏸ Mise à jour en PAUSE après neutralisation. Relancez "
|
||||
"« Migration de base de données » pour reprendre."
|
||||
)
|
||||
return
|
||||
|
||||
config_state_1_uninstall_module = self.dct_progression.get(
|
||||
"config_state_1_uninstall_module"
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue