-
-
Notifications
You must be signed in to change notification settings - Fork 696
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by legalsylvain
- Loading branch information
Showing
4 changed files
with
55 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
openupgrade_scripts/scripts/resource/17.0.1.1/post-migration.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Copyright 2024 Viindoo Technology Joint Stock Company (Viindoo) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from openupgradelib import openupgrade | ||
|
||
_deleted_xml_records = [ | ||
"resource.resource_calendar_std_35h", | ||
"resource.resource_calendar_std_38h", | ||
] | ||
|
||
|
||
@openupgrade.migrate() | ||
def migrate(env, version): | ||
openupgrade.delete_records_safely_by_xml_id( | ||
env, | ||
_deleted_xml_records, | ||
) |
16 changes: 16 additions & 0 deletions
16
openupgrade_scripts/scripts/resource/17.0.1.1/pre-migration.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Copyright 2024 Viindoo Technology Joint Stock Company (Viindoo) | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from openupgradelib import openupgrade | ||
|
||
|
||
@openupgrade.migrate() | ||
def migrate(env, version): | ||
openupgrade.set_xml_ids_noupdate_value( | ||
env, | ||
"resource", | ||
[ | ||
"resource_calendar_std", | ||
], | ||
True, | ||
) |
21 changes: 21 additions & 0 deletions
21
openupgrade_scripts/scripts/resource/17.0.1.1/upgrade_analysis_work.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
---Models in module 'resource'--- | ||
---Fields in module 'resource'--- | ||
resource / resource.calendar / hours_per_day (float) : now a function | ||
# Nothing To Do, compute non-stored | ||
|
||
resource / resource.calendar.attendance / _order : _order is now 'sequence, week_type, dayofweek, hour_from' ('week_type, dayofweek, hour_from') | ||
# Nothing To Do, default order when search | ||
|
||
resource / resource.calendar.attendance / day_period (selection) : selection_keys is now '['afternoon', 'lunch', 'morning']' ('['afternoon', 'morning']') | ||
# Nothing To Do, new option: lunch | ||
|
||
resource / resource.calendar.attendance / duration_days (float) : NEW hasdefault: compute | ||
# Nothing To Do, no need precomputation | ||
|
||
---XML records in module 'resource'--- | ||
resource.calendar: resource.resource_calendar_std (noupdate) (noupdate switched) | ||
# DONE: switched noupdate | ||
|
||
DEL resource.calendar: resource.resource_calendar_std_35h (noupdate) | ||
DEL resource.calendar: resource.resource_calendar_std_38h (noupdate) | ||
# DONE: safely delete in post-migration |