diff --git a/ROADMAP.md b/ROADMAP.md index 8f7a806..b991568 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -11,3 +11,26 @@ * allow to call odoo-bin shell, via : https://github.com/d11wtq/dockerpty (see https://github.com/docker/docker-py/issues/247) + + +* ``openupgradelib`` requires a new feature psycopg2.sql since + (21 Aug 2019) + https://github.com/OCA/openupgradelib/commit/7408580e4469ba4b0cabb923da7facd71567a2fb + so we pin openupgradelib==2.0.0 (21 Jul 2018) + + +V12 : Python 3.5.3 (default, Apr 5 2021, 09:00:41) + +``` +# See : https://github.com/OCA/openupgradelib/issues/248 +# https://github.com/OCA/openupgradelib/issues/288 +_LEGACY_OPENUPGRADELIB = ( + "git+https://github.com/OCA/openupgradelib.git" + "@ed01555b8ae20f66b3af178c8ecaf6edd110ce75#egg=openupgradelib" +) + +# List of the series of odoo +# python version is defined, based on the OCA CI. +# https://github.com/OCA/oca-addons-repo-template/blob/master/src/.github/workflows/%7B%25%20if%20ci%20%3D%3D%20'GitHub'%20%25%7Dtest.yml%7B%25%20endif%20%25%7D.jinja + +``` diff --git a/odoo_openupgrade_wizard/cli_options.py b/odoo_openupgrade_wizard/cli_options.py index aa32637..225f952 100644 --- a/odoo_openupgrade_wizard/cli_options.py +++ b/odoo_openupgrade_wizard/cli_options.py @@ -3,6 +3,7 @@ import click def releases_options(function): function = click.option( + "-r", "--releases", type=str, help="Coma-separated values of odoo releases for which" diff --git a/odoo_openupgrade_wizard/configuration_version_dependant.py b/odoo_openupgrade_wizard/configuration_version_dependant.py index d29c96b..0cb8873 100644 --- a/odoo_openupgrade_wizard/configuration_version_dependant.py +++ b/odoo_openupgrade_wizard/configuration_version_dependant.py @@ -1,41 +1,33 @@ from pathlib import Path -# See : https://github.com/OCA/openupgradelib/issues/248 -# https://github.com/OCA/openupgradelib/issues/288 -_LEGACY_OPENUPGRADELIB = ( - "git+https://github.com/OCA/openupgradelib.git" - "@ed01555b8ae20f66b3af178c8ecaf6edd110ce75#egg=openupgradelib" -) - - -# List of the series of odoo -# python version is defined, based on the OCA CI. -# https://github.com/OCA/oca-addons-repo-template/blob/master/src/.github/workflows/%7B%25%20if%20ci%20%3D%3D%20'GitHub'%20%25%7Dtest.yml%7B%25%20endif%20%25%7D.jinja _ODOO_VERSION_TEMPLATES = [ { "release": 8.0, "python_major_version": "python2", - "python_libraries": [_LEGACY_OPENUPGRADELIB], + "python_libraries": [], }, { "release": 9.0, "python_major_version": "python2", - "python_libraries": [_LEGACY_OPENUPGRADELIB], + "python_libraries": ["openupgradelib==2.0.0"], }, { "release": 10.0, "python_major_version": "python2", - "python_libraries": [_LEGACY_OPENUPGRADELIB], + "python_libraries": ["openupgradelib==2.0.0"], }, { "release": 11.0, "python_major_version": "python3", - "python_libraries": ["openupgradelib"], + "python_libraries": ["openupgradelib==2.0.0"], }, { "release": 12.0, "python_major_version": "python3", - "python_libraries": ["openupgradelib"], + "python_libraries": [ + "git+https://github.com/grap/openupgradelib.git" + "@2.0.1#egg=openupgradelib" + ], }, { "release": 13.0, @@ -89,7 +81,7 @@ def get_odoo_versions(initial_release: float, final_release: float) -> list: def get_odoo_run_command(migration_step: dict) -> str: """Return the name of the command to execute, depending on the migration step. (odoo-bin, odoo.py, etc...)""" - if migration_step["release"] >= 9.0: + if migration_step["release"] >= 10.0: return "odoo-bin" return "odoo.py"