[FIX] hr_holidays: fix traceback in virtual leaves search#5149
Open
ahmedamein100 wants to merge 1 commit intomaster-hr-onboarding-ahnaefrom
Open
[FIX] hr_holidays: fix traceback in virtual leaves search#5149ahmedamein100 wants to merge 1 commit intomaster-hr-onboarding-ahnaefrom
ahmedamein100 wants to merge 1 commit intomaster-hr-onboarding-ahnaefrom
Conversation
|
This PR targets the un-managed branch odoo-dev/odoo:master-hr-onboarding-ahnae, it needs to be retargeted before it can be merged. |
Mahmoudk3m
requested changes
May 8, 2026
Mahmoudk3m
left a comment
There was a problem hiding this comment.
Thanks for your work 🚀 Just a small comment.
The code is good but the commit message doesn't follow the guidelines. Also, for bug fix, we need to have a structure like this: Steps to reproduce, Bug cause, Solution.
Also, while it's not mandatory. It's a best practice to write a test for bug fixes.
Steps to reproduce: 1. Go to Time Off > Configuration > Time Off Types. 2. Open any type and click the 'Time Off' smart button. 3. Click 'New' or attempt to filter/search on the resulting view. 4. A TypeError occurs during the evaluation of the remaining leaves. Bug: In `_search_virtual_remaining_leaves`, the operator `op` was being called without its second argument (the comparison value). Solution: Pass the comparison value to the operator in `_search_virtual_remaining_leaves` to ensure the comparison is evaluated correctly and prevent the TypeError. task: 6194971
b1d3006 to
c4c5662
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pass the comparison value to the operator in _search_virtual_remaining_leaves to prevent a TypeError when navigating via smart buttons.
Task: 6194971