-
-
Notifications
You must be signed in to change notification settings - Fork 768
Open
Labels
Description
Module
hr_holidays
Describe the bug
When upgrading a v17 database with archived hr_leave_allocation records to v18, the scripts transform those records to the invalid state "cancel", which crashes the view when trying to access the "allocations" menu in the hr_holidays module.
To Reproduce
[17.0 to 18.0]:
Steps to reproduce the behavior:
- Create Time Off assignation records and archive them on the v17 DB.
- Perform the upgrade.
- As the Administrator, go to Time Off > Management > Allocations and remove all the filters.
- The traceback will appear, with the error "KeyError: 'cancel'".

Expected behavior
Archived hr_leave_allocation errors should stay as-is, without any transformations.
Additional context
The exact action is made by scripts/hr_holidays/18.0.1.6/pre-migration.py, from line 50 to 57