Compare commits
4 commits
db1e9fa24f
...
4dd57e4c50
| Author | SHA1 | Date | |
|---|---|---|---|
| 4dd57e4c50 | |||
| 375bb40f41 | |||
| 913d33e90f | |||
| 1ad3a0f5af |
1 changed files with 17 additions and 24 deletions
|
|
@ -10,12 +10,11 @@ import shutil
|
||||||
import sys
|
import sys
|
||||||
import zipfile
|
import zipfile
|
||||||
from uuid import uuid4
|
from uuid import uuid4
|
||||||
|
from script.todo.version_manager import get_odoo_version
|
||||||
|
|
||||||
import click
|
import click
|
||||||
import todo_file_browser
|
import todo_file_browser
|
||||||
|
|
||||||
from script.todo.version_manager import get_odoo_version
|
|
||||||
|
|
||||||
new_path = os.path.normpath(
|
new_path = os.path.normpath(
|
||||||
os.path.join(os.path.dirname(__file__), "..", "..")
|
os.path.join(os.path.dirname(__file__), "..", "..")
|
||||||
)
|
)
|
||||||
|
|
@ -769,28 +768,6 @@ class TodoUpgrade:
|
||||||
|
|
||||||
print("✅ -> Restore database")
|
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")
|
print("✅ -> Neutralize database")
|
||||||
if do_neutralize:
|
if do_neutralize:
|
||||||
status, cmd_executed = self.todo_upgrade_execute(
|
status, cmd_executed = self.todo_upgrade_execute(
|
||||||
|
|
@ -816,6 +793,22 @@ class TodoUpgrade:
|
||||||
self.dct_progression["state_1_neutralize_database"] = True
|
self.dct_progression["state_1_neutralize_database"] = True
|
||||||
self.write_config()
|
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 = self.dct_progression.get(
|
||||||
"config_state_1_uninstall_module"
|
"config_state_1_uninstall_module"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue