Skip to content

Conversation

@fw-bot
Copy link
Contributor

@fw-bot fw-bot commented Nov 4, 2025

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

leave_type_requires_allocation = self.filtered(lambda lt: lt.requires_allocation == 'yes')

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

for employee in res:
for leave_data in res[employee]:
if leave_data[0] in leave_type_names:

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.

opw-5042325

Forward-Port-Of: #225015

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.

opw-5042325

X-original-commit: aaa093f
@robodoo robodoo added the forwardport This PR was created by @fw-bot label Nov 4, 2025
@robodoo
Copy link
Contributor

robodoo commented Nov 4, 2025

Pull request status dashboard

@fw-bot
Copy link
Contributor Author

fw-bot commented Nov 4, 2025

This PR targets saas-18.2 and is part of the forward-port chain. Further PRs will be created up to master.

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@fw-bot
Copy link
Contributor Author

fw-bot commented Nov 4, 2025

@yoba-odoo @Bertrand2 the next pull request (#234426) is in conflict. You can merge the chain up to here by saying

@robodoo r+

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@yoba-odoo
Copy link
Contributor

@robodoo r+

robodoo pushed a commit that referenced this pull request Nov 5, 2025
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.

opw-5042325

closes #234403

X-original-commit: aaa093f
Signed-off-by: Bertrand Dossogne (bedo) <bedo@odoo.com>
Signed-off-by: Youssef Bashandy (yoba) <yoba@odoo.com>
robodoo pushed a commit that referenced this pull request Nov 5, 2025
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.

opw-5042325

closes #234403

X-original-commit: aaa093f
Signed-off-by: Bertrand Dossogne (bedo) <bedo@odoo.com>
Signed-off-by: Youssef Bashandy (yoba) <yoba@odoo.com>
robodoo pushed a commit that referenced this pull request Nov 5, 2025
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.

opw-5042325

closes #234403

X-original-commit: aaa093f
Signed-off-by: Bertrand Dossogne (bedo) <bedo@odoo.com>
Signed-off-by: Youssef Bashandy (yoba) <yoba@odoo.com>
@robodoo robodoo closed this Nov 5, 2025
@fw-bot fw-bot deleted the saas-18.2-18.0-opw-5042325-show_extra_hours_on_dashboard-yoba-459933-fw branch November 12, 2025 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

forwardport This PR was created by @fw-bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants