[FIX] allow to run multiple post-*py by step
Like: scripts/step_01__regular__12.0/01-post-migration-uninstall-modules.py scripts/step_01__regular__12.0/02-post-migration-fix-project-issues.py scripts/step_01__regular__12.0/03-post-migration-fix-mail-aliases.py scripts/step_01__regular__12.0/04-fix-misc-inconsistant-records.py
This commit is contained in:
parent
5eed63ca56
commit
39f70d1012
|
|
@ -325,9 +325,9 @@ def execute_click_odoo_python_files(
|
|||
if os.path.isfile(os.path.join(script_folder, f))
|
||||
and f[-3:] == ".py"
|
||||
]
|
||||
python_files = sorted(python_files)
|
||||
python_files = sorted([str(x) for x in python_files])
|
||||
|
||||
command = generate_odoo_command(
|
||||
base_command = generate_odoo_command(
|
||||
ctx,
|
||||
migration_step,
|
||||
execution_context,
|
||||
|
|
@ -336,16 +336,13 @@ def execute_click_odoo_python_files(
|
|||
)
|
||||
|
||||
for python_file in python_files:
|
||||
command = ("/bin/bash -c 'cat /env/{python_file} | {command}'").format(
|
||||
command=command,
|
||||
python_file=str(python_file),
|
||||
)
|
||||
command = f"/bin/bash -c 'cat /env/{python_file} | {base_command}'"
|
||||
try:
|
||||
logger.info(
|
||||
f"Step {migration_step['complete_name']}."
|
||||
f" Executing script {python_file} ..."
|
||||
)
|
||||
return run_container_odoo(
|
||||
run_container_odoo(
|
||||
ctx,
|
||||
migration_step,
|
||||
command,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user