From 0785c318251e5cddbc6fd31ea3fd6e0a2eb1d35f Mon Sep 17 00:00:00 2001 From: Sylvain LE GAL Date: Mon, 4 Nov 2024 10:55:46 +0100 Subject: [PATCH] [REF] Improve settings. Introduce _FIRST_ODOO_VERSION_SUPPORTED and _LAST_ODOO_VERSION_SUPPORTED --- .../configuration_version_dependant.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/odoo_openupgrade_wizard/configuration_version_dependant.py b/odoo_openupgrade_wizard/configuration_version_dependant.py index e3e6f47..c6791ea 100644 --- a/odoo_openupgrade_wizard/configuration_version_dependant.py +++ b/odoo_openupgrade_wizard/configuration_version_dependant.py @@ -2,7 +2,15 @@ from pathlib import Path from loguru import logger -_ALL_ODOO_VERSIONS = [8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0] +FIRST_ODOO_VERSION_SUPPORTED = 8 +LAST_ODOO_VERSION_SUPPORTED = 16 + +_ALL_ODOO_VERSIONS = [ + float(x) + for x in range( + FIRST_ODOO_VERSION_SUPPORTED, LAST_ODOO_VERSION_SUPPORTED + 1 + ) +] def get_version_options(mode: str) -> list: