Skip to content

[FIX] hr_holidays: fix syntax error in for virtual days computation#5152

Open
belam-odoo wants to merge 1 commit intomaster-hr-onboarding-belamfrom
master-hr-onboarding-belam-time-hr_holidays_fix_time_off_tracking-belam
Open

[FIX] hr_holidays: fix syntax error in for virtual days computation#5152
belam-odoo wants to merge 1 commit intomaster-hr-onboarding-belamfrom
master-hr-onboarding-belam-time-hr_holidays_fix_time_off_tracking-belam

Conversation

@belam-odoo
Copy link
Copy Markdown

Additional :
made a test as exercise. It does not prevent the bug to reproduce. But I leave it still in order to get some feedback on it.

@robodoo
Copy link
Copy Markdown

robodoo commented May 6, 2026

This PR targets the un-managed branch odoo-dev/odoo:master-hr-onboarding-belam, it needs to be retargeted before it can be merged.

Copy link
Copy Markdown

@mepe-odoo mepe-odoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your work

Your commit message is not correct :D here you will find the git guidelines https://www.odoo.com/documentation/19.0/contributing/development/git_guidelines.html#commit-message-structure

and as it's a fix commit you need also to check this documentation : https://www.odoo.com/odoo/knowledge/16726 and the section bugfix task :)

wet_with_context = work_entry_type.with_context({
"employee_id": employee.id,
})
# 2nd of januari
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

January no ? 🤔

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a good practice to write a test when you are fixing a bug fix but here I think it's not really necessary.
But as you want to write a test you can write a smaller one.

In this commit you are fixing a search method a field. So you can just try to search with this field in the domain; your search method will be called :)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated the test as suggested : it's shorted and it actually covers the broken part.

Bug introduced:

Introduced by commit: 6485081

---
Step to reproduce:
1. Make sure the employee has at least one time off allocation (work_entry with requires_allocation set to True).

In-app : TIME OFF > Management > Allocations > New...

2. Create a time off for that employee and try to select the Time Type

In-app: TIME OFF > Management > Time Off > New > Select employee + Select Time Type

Reason:
Syntax error - one argument was passed to a method instead of two
The method was only called by an domain RPC search in the form.

Solution:
Added the second parameters in the method call
---

Task #6187725
@belam-odoo belam-odoo force-pushed the master-hr-onboarding-belam-time-hr_holidays_fix_time_off_tracking-belam branch from f4b942e to f74998c Compare May 8, 2026 08:55
@belam-odoo belam-odoo requested a review from mepe-odoo May 8, 2026 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants