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

@robodoo
Copy link
Contributor

robodoo commented Nov 4, 2025

Pull request status dashboard

@robodoo robodoo added forwardport This PR was created by @fw-bot conflict There was an error while creating this forward-port PR labels Nov 4, 2025
@fw-bot
Copy link
Contributor Author

fw-bot commented Nov 4, 2025

@yoba-odoo @Bertrand2 cherrypicking of pull request #225015 failed.

stdout:

Auto-merging addons/hr_holidays_attendance/models/hr_leave_type.py
CONFLICT (content): Merge conflict in addons/hr_holidays_attendance/models/hr_leave_type.py
Auto-merging addons/hr_holidays_attendance/tests/test_holidays_overtime.py

Either perform the forward-port manually (and push to this branch, proceeding as usual) or close this PR (maybe?).

In the former case, you may want to edit this PR message as well.

⚠️ after resolving this conflict, you will need to merge it via @robodoo.

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

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
@yoba-odoo yoba-odoo force-pushed the saas-18.3-18.0-opw-5042325-show_extra_hours_on_dashboard-yoba-475012-fw branch from 741c157 to fbe6bae Compare November 5, 2025 15:46
@C3POdoo C3POdoo requested a review from a team November 5, 2025 16:02
@yoba-odoo
Copy link
Contributor

@robodoo r+

robodoo pushed a commit that referenced this pull request Nov 6, 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 #234426

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 6, 2025
@fw-bot fw-bot deleted the saas-18.3-18.0-opw-5042325-show_extra_hours_on_dashboard-yoba-475012-fw branch November 13, 2025 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conflict There was an error while creating this forward-port PR forwardport This PR was created by @fw-bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants