Go to file
2022-04-09 14:51:59 +02:00
odoo_openupgrade_wizard [FIX] call pip install with -r and not -e; [IMP] adapt apt-get update call to old buggy images with '|| true' ; [IMP] install correctly openupgradelib on old images (https://github.com/OCA/openupgradelib/issues/248) 2022-04-09 02:29:20 +02:00
tests [FIX] disabled test 2022-04-09 14:51:59 +02:00
.gitignore [REF] rename test files 2022-04-09 02:32:14 +02:00
.gitlab-ci.yml [REF] add ensure_folder_exists system 2022-04-08 19:09:24 +00:00
.pre-commit-config.yaml [REF] add ensure_folder_exists system 2022-04-08 19:09:24 +00:00
DEVELOP.md [IMP] documentation 2022-04-08 22:10:11 +02:00
poetry.lock [ADD] New command odoo-openupgrade-wizard docker-build (WIP) 2022-04-08 22:46:02 +02:00
pyproject.toml [ADD] New command odoo-openupgrade-wizard docker-build (WIP) 2022-04-08 22:46:02 +02:00
pytest.ini [REF] add ensure_folder_exists system 2022-04-08 19:09:24 +00:00
README.md [REF] add ensure_folder_exists system 2022-04-08 19:09:24 +00:00
tox.ini [REF] add ensure_folder_exists system 2022-04-08 19:09:24 +00:00

odoo-openupgrade-wizard

Odoo Openupgrade Wizard is a tool that helps developpers to make major upgrade of Odoo Community Edition. (formely OpenERP). It works with Openupgrade OCA tools. (https://github.com/oca/openupgrade)

this tool is useful for complex migrations:

  • skip several versions
  • complex custom code

It will create a migration environment (with all the code available) and provides helpers to run (and replay) migrations until it works.

Commands

odoo-openupgrade-wizard init

odoo-openupgrade-wizard init\
  --initial-version=10.0\
  --final-version=12.0\
  --extra-repository=OCA/web,OCA/server-tools

Initialize a folder to make a migration from a 10.0 and a 12.0 database. This will generate the following structure :

config.yml
log/
    2022_03_25__23_12_41__init.log
    ...
repos/
    10.0.yml
    11.0.yml
    12.0.yml
requirements/
    10.0_requirements.txt
    11.0_requirements.txt
    12.0_requirements.txt
scripts/
    step_1__update__10.0/
        pre-migration.sql
        post-migration.py
    step_2__upgrade__11.0/
        pre-migration.sql
        post-migration.py
    step_2__upgrade__12.0/
        pre-migration.sql
        post-migration.py
    step_4__update__12.0/
        pre-migration.sql
        post-migration.py
src/
  • log/ will contains all the log of the odoo-openupgrade-wizard and the logs of the odoo instance that will be executed.

  • repos/ contains a file per version of odoo, that enumerates the list of the repositories to use to run each odoo instance. The syntax should respect the gitaggregate command. (See : https://pypi.org/project/git-aggregator/) Repo files are pre-generated. You can update them with your custom settings. (custom branches, extra PRs, git shallow options, etc...)

  • requirements/ contains a file per version of odoo, that enumerates the list of extra python librairies required to run each odoo instance. The syntax should respect the pip install -r command. (See : https://pip.pypa.io/en/stable/reference/requirements-file-format/)

  • scripts contains a folder per migration step. In each step folder:

    • pre-migration.sql can contains extra SQL queries you want to execute before beginning the step.
    • post-migration.py can contains extra python command to execute after the execution of the step. (the orm will be available)

TODO

  • with coop it easy :
  • short_help of group decorator ? seems useless...