[FIX] hr_holidays: fix syntax error in for virtual days computation#5152
Conversation
|
This PR targets the un-managed branch odoo-dev/odoo:master-hr-onboarding-belam, it needs to be retargeted before it can be merged. |
mepe-odoo
left a comment
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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
f4b942e to
f74998c
Compare
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.