File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
openupgrade_scripts/scripts/maintenance/17.0.1.0 Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change 1- # Copyright 2024 Tecnativa - Víctor Martínez
1+ # Copyright 2024-2025 Tecnativa - Víctor Martínez
22# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
33from openupgradelib import openupgrade
44
55
6+ def _maintenance_plan (env ):
7+ """Rename the fields if the maintenance_plan module was installed."""
8+ if openupgrade .column_exists (env .cr , "maintenance_request" , "note" ):
9+ openupgrade .rename_fields (
10+ env ,
11+ [
12+ (
13+ "maintenance.request" ,
14+ "maintenance_request" ,
15+ "note" ,
16+ "instruction_text" ,
17+ ),
18+ ],
19+ )
20+
21+
622def _maintenance_request_company_id (env ):
723 """We set the company_id value for requests that do not have it.
824 We get the value of what will be deductively most appropriate (equipment, team or
@@ -34,3 +50,4 @@ def _maintenance_request_company_id(env):
3450@openupgrade .migrate ()
3551def migrate (env , version ):
3652 _maintenance_request_company_id (env )
53+ _maintenance_plan (env )
You can’t perform that action at this time.
0 commit comments