[FIX] timeoff: traceback on time off type#5151
[FIX] timeoff: traceback on time off type#5151yogietama wants to merge 1 commit intomaster-hr-onboarding-yometfrom
Conversation
|
This PR targets the un-managed branch odoo-dev/odoo:master-hr-onboarding-yomet, it needs to be retargeted before it can be merged. |
d556e3f to
5b81e52
Compare
Mahmoudk3m
left a comment
There was a problem hiding this comment.
Thanks for your work 🚀.
It's a good practice to write a test when you fix a bug, it's not really necessary here.
But if you want to write a test to get a feedback on it, you can do that :)
| def _search_virtual_remaining_leaves(self, operator, value): | ||
| def is_valid(work_entry_type): | ||
| return not work_entry_type.requires_allocation or op(work_entry_type.virtual_remaining_leaves) | ||
| return not work_entry_type.requires_allocation or op(work_entry_type.virtual_remaining_leaves, 0) |
There was a problem hiding this comment.
If you hardcode 0, it will ignore the value coming from the domain.
There was a problem hiding this comment.
One more thing, for the commit message.
the correct format is
[FIX] module_name: commit message title.
Here the correct module name is hr_holidays.
Here's the commit message guidelines in case you need it. For bug fixes, we need to have a structure like this: Steps to reproduce, Bug cause, Solution.
e054b3a to
7a1db82
Compare
Bug Produce Steps: - Navigation: Time Off >> Configuration >> Time Off Types >> Open any type, navigate to the Smart button Time Off >> Click on New >> Time Off Type Reason: Error occurs during time off type selection if there is time off allocation, due to invalid number of paramater task:6189286
7a1db82 to
5eac7ef
Compare
Bug Produce Steps:
Time Off >> Configuration >> Time Off Types >> Open any type, navigate to the Smart button Time Off >> Click on New >> Time Off Type
Reason:
Error occurs during time off type selection if there is time off allocation, due to invalid number of paramater
task:6189286