Tuesday, August 4, 2026
1 change · 19.0
Resolved issues and error corrections
Half-day unpaid time off is now consistently counted as 0.5 days, including repeat requests by the same employee. This prevents missing or understated leave entries that could lead to incorrect payslips.
Original PR description
## Current behavior: The unpaid leave count for some employees is calculated incorrectly. As a result, the work entries are generated incorrectly, which leads to incorrect payslip creation. - For the…
## Current behavior: The unpaid leave count for some employees is calculated incorrectly. As a result, the work entries are generated incorrectly, which leads to incorrect payslip creation. - For the first half-day unpaid leave, the system correctly counts 0.5 days. - When the same employee applies for another half-day unpaid leave on a different day, the system incorrectly counts it as 0.05 days instead of 0.5 days. - For some employees, even when they apply for a half-day leave, the system counts 0.00 days. ## Expected behavior: When an employee applies for half-day unpaid time off, the system should count it as 0.5 days ## Steps to reproduce: 1. Employee with attendance or working-schedule work entry source 2. Check in, approve half-day unpaid leave, check out 3. Generate payslip — leave missing 4. Apply a second half-day leave — duration may show 0.05 or 0.00 ## Causes of the issue: - `_cancel_work_entry_conflict()`: skipped leave work entry creation, so no leave work entry was created until refuse/re-approve or manual regeneration - `_get_durations()`: wrong calculations, could yield 0.00 days or 0.05 days for half-day off requests ## Fix: - `hr_work_entry_holidays`: Generate work entries for the leave period when needed, always create leave work entries after ensuring generation - `hr_holidays`: sets days to half day off (0.5) for single-day half-day requests. Keep half-day rounding for multi-day duration-based requests opw-6353480