odoo/odoo#234426
Created by fw-bot
Merged
at 6cfff4aa9b9e7b073d4fcd5f09dab01d8196d942
Statuses:
- legal/cla: Contributor License Agreement check
- ci/runbot: Odoo Test Suite
- ci/upgrade_enterprise: Test upgrades for enterprise master
- ci/template: Contact runbot team on discord for help.
- ci/style: Optional style check. Ignore it only if strictly necessary.
- ci/security: Required security check. Can only be ignored by security team.
- label
- odoo-dev:saas-18.3-18.0-opw-5042325-show_extra_hours_on_dashboard-yoba-475012-fw
- head
- fbe6baefe39c0119de22694b8d2c663a5692e443
- merged
- 1 month ago by Bugfix, Youssef Bashandy (yoba)
| odoo/odoo | |
|---|---|
| 18.0 | #225015 |
| saas-18.2 | #234403 |
| saas-18.3 | #234426 |
| saas-18.4 | #234781 |
| 19.0 | #234796 |
| master | #234983 |
[FIX] hr_holidays_attendance : Show Extra Hours on Dashboard
Steps to reproduce:
- Install Attendance and Time off apps
- Create some attendance with extra hours for the employee
- Go to the employee's time off dashboard
- Notice Extra Hours allocation is not shown
Cause:
When we are getting the allocation data we check for the leave types that require allocation
https://github.com/odoo/odoo/blob/5f6d2afa8c09fe72c01d056ebef01214567a4a99/addons/hr_holidays/models/hr_leave_type.py#L473
And then when checking the types that doesn't require allocation we are looping on the res that we got from the super which already excluded those types
https://github.com/odoo/odoo/blob/5f6d2afa8c09fe72c01d056ebef01214567a4a99/addons/hr_holidays_attendance/models/hr_leave_type.py#L41-L43
Fix:
We loop over the self leave types to make sure we are getting all of the employee's leave data whether the type requires allocation or not.
Forward-Port-Of: #225015