diff --git a/migration/14.0.1.0.0/post-migration.py b/migration/14.0.1.0.0/post-migration.py index 0191717b17014a347c4b413a518bba598d75cafa..f297ff58bf4c9ea2aa4536adcee8cd7021c593cd 100644 --- a/migration/14.0.1.0.0/post-migration.py +++ b/migration/14.0.1.0.0/post-migration.py @@ -7,29 +7,23 @@ from openupgradelib import openupgrade # pylint: disable=W7936 def get_years(): year_list = [] for i in range(2019, 2030): - year_list.append((str(i), str(i))) + year_list.append((i, str(i))) return year_list +def get_months(): + month_list = [] + for i in range(1, 13): + month_list.append((i, str(i))) + return month_list + + def ur_month_timesheet_map_values(env): openupgrade.map_values( env.cr, openupgrade.get_legacy_name("month"), "month", - [ - ("1", "Janv"), - ("2", "Fév"), - ("3", "Mars"), - ("4", "Avr"), - ("5", "Mai"), - ("6", "Juin"), - ("7", "Juil"), - ("8", "Août"), - ("9", "Sept"), - ("10", "Oct"), - ("11", "Nov"), - ("12", "Dec"), - ], + get_months(), table="ur_month_timesheet", ) openupgrade.map_values(