File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
openupgrade_scripts/scripts/hr_timesheet/18.0.1.1 Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 11# Copyright 2025 Le Filament (https://le-filament.com)
2+ # Copyright 2025 Tecnativa - Pedro M. Baeza
23# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
34from openupgradelib import openupgrade
45
56
7+ def _convert_task_progress (env ):
8+ """On v17, the value was multiplied by 100:
9+
10+ https://github.com/odoo/odoo/blob/f9726cfe93e8850a38d9de06acfa5d78473b50b0/addons/hr_timesheet/models/project_task.py#L101
11+
12+ but on v18, it's not:
13+
14+ https://github.com/odoo/odoo/blob/1cac54db8634267a780b4011291f1e8a80ac5f5b/addons/hr_timesheet/models/project_task.py#L98
15+
16+ so we have to divide current stored values by 100.
17+ """
18+ openupgrade .logged_query (
19+ env .cr , "UPDATE project_task SET progress = progress / 100"
20+ )
21+
22+
623@openupgrade .migrate ()
724def migrate (env , version ):
825 openupgrade .load_data (env , "hr_timesheet" , "18.0.1.1/noupdate_changes.xml" )
26+ _convert_task_progress (env )
You can’t perform that action at this time.
0 commit comments