Compare commits
3 commits
52492302d3
...
71aba63b03
| Author | SHA1 | Date | |
|---|---|---|---|
| 71aba63b03 | |||
| 5951b0374f | |||
| d84d729c77 |
3 changed files with 36 additions and 2 deletions
|
|
@ -753,7 +753,7 @@
|
||||||
name="queue.git"
|
name="queue.git"
|
||||||
path="odoo12.0/addons/OCA_queue"
|
path="odoo12.0/addons/OCA_queue"
|
||||||
remote="ERPLibre_origin_OCA"
|
remote="ERPLibre_origin_OCA"
|
||||||
revision="12.0"
|
revision="erplibre/12.0"
|
||||||
groups="addons,odoo12.0"
|
groups="addons,odoo12.0"
|
||||||
/>
|
/>
|
||||||
<project
|
<project
|
||||||
|
|
|
||||||
|
|
@ -768,6 +768,7 @@ class TodoUpgrade:
|
||||||
self.write_config()
|
self.write_config()
|
||||||
|
|
||||||
print("✅ -> Restore database")
|
print("✅ -> Restore database")
|
||||||
|
already_update_state_1 = False
|
||||||
|
|
||||||
if not self.dct_progression.get("state_1_update_all"):
|
if not self.dct_progression.get("state_1_update_all"):
|
||||||
print(
|
print(
|
||||||
|
|
@ -785,7 +786,9 @@ class TodoUpgrade:
|
||||||
f"./script/addons/update_addons_all.sh {database_name}",
|
f"./script/addons/update_addons_all.sh {database_name}",
|
||||||
single_source_odoo=True,
|
single_source_odoo=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
if not status:
|
if not status:
|
||||||
|
already_update_state_1 = True
|
||||||
self.dct_progression["state_1_update_all"] = True
|
self.dct_progression["state_1_update_all"] = True
|
||||||
self.write_config()
|
self.write_config()
|
||||||
|
|
||||||
|
|
@ -879,7 +882,7 @@ class TodoUpgrade:
|
||||||
print(f"🔷 {msg}")
|
print(f"🔷 {msg}")
|
||||||
self.add_comment_progression(msg)
|
self.add_comment_progression(msg)
|
||||||
|
|
||||||
if not self.dct_progression.get("state_2_update_all"):
|
if not self.dct_progression.get("state_2_update_all") and not already_update_state_1:
|
||||||
status, cmd_executed = self.todo_upgrade_execute(
|
status, cmd_executed = self.todo_upgrade_execute(
|
||||||
f"./script/addons/update_addons_all.sh {database_name}",
|
f"./script/addons/update_addons_all.sh {database_name}",
|
||||||
single_source_odoo=True,
|
single_source_odoo=True,
|
||||||
|
|
|
||||||
|
|
@ -524,6 +524,28 @@ class Update:
|
||||||
status = os.system("./script/install/install_locally_dev.sh")
|
status = os.system("./script/install/install_locally_dev.sh")
|
||||||
return status
|
return status
|
||||||
|
|
||||||
|
def apply_extra_modules(self):
|
||||||
|
"""Add the extra modules (CybroOdoo) to the repo manifest, EVEN when
|
||||||
|
the base environment is already installed. Records the extra state so
|
||||||
|
git_merge_repo_manifest includes manifest/git_manifest_extra_odooXX.xml,
|
||||||
|
then re-generates the local manifest and re-syncs the repos (the Odoo
|
||||||
|
config is regenerated by the post-install step that follows).
|
||||||
|
|
||||||
|
Without this, « --with_extra » on an already-installed env was a no-op:
|
||||||
|
update_environment() (where the extra state is set) is skipped when the
|
||||||
|
env is valid, so get_version_extra() stayed False and CybroOdoo was
|
||||||
|
never cloned nor added to config.conf. Returns the os.system status."""
|
||||||
|
_logger.info("Applying extra modules (CybroOdoo) to the manifest...")
|
||||||
|
if _STATE_AVAILABLE:
|
||||||
|
set_version_installed(
|
||||||
|
self.new_version_odoo,
|
||||||
|
extra=True,
|
||||||
|
python=self.new_version_python,
|
||||||
|
poetry=self.new_version_poetry,
|
||||||
|
)
|
||||||
|
self.execute_log.append("Extra modules (CybroOdoo)")
|
||||||
|
return os.system("./script/manifest/update_manifest_local_dev.sh")
|
||||||
|
|
||||||
def install_system(self):
|
def install_system(self):
|
||||||
self.execute_log.append(f"System installation")
|
self.execute_log.append(f"System installation")
|
||||||
status = os.system("./script/install/install_dev.sh")
|
status = os.system("./script/install/install_dev.sh")
|
||||||
|
|
@ -736,6 +758,15 @@ def main():
|
||||||
exit_code = 1
|
exit_code = 1
|
||||||
update.print_log()
|
update.print_log()
|
||||||
|
|
||||||
|
# --with_extra : appliquer les modules extra (CybroOdoo) MÊME si l'env de
|
||||||
|
# base est déjà installé (sinon update_environment est sauté -> « Nothing
|
||||||
|
# to do » et CybroOdoo n'est jamais ajouté au repo ni à config.conf).
|
||||||
|
# Placé AVANT la régénération de config (post-étape) pour qu'elle le prenne.
|
||||||
|
if update.config.with_extra and exit_code == 0:
|
||||||
|
rc = update.apply_extra_modules()
|
||||||
|
if rc not in (0, True, None):
|
||||||
|
exit_code = 1
|
||||||
|
|
||||||
# Étapes post-install : uniquement si l'installation a RÉUSSI (sinon
|
# Étapes post-install : uniquement si l'installation a RÉUSSI (sinon
|
||||||
# .venv.erplibre est absent -> cascade d'erreurs inutiles).
|
# .venv.erplibre est absent -> cascade d'erreurs inutiles).
|
||||||
if update.config.install_dev and exit_code == 0:
|
if update.config.install_dev and exit_code == 0:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue