Skip to content

[FIX] timeoff: traceback on time off type#5151

Open
yogietama wants to merge 1 commit intomaster-hr-onboarding-yometfrom
master-hr-traceback_on_time_off-yomet
Open

[FIX] timeoff: traceback on time off type#5151
yogietama wants to merge 1 commit intomaster-hr-onboarding-yometfrom
master-hr-traceback_on_time_off-yomet

Conversation

@yogietama
Copy link
Copy Markdown

@yogietama yogietama commented May 6, 2026

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

@robodoo
Copy link
Copy Markdown

robodoo commented May 6, 2026

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

@yogietama yogietama force-pushed the master-hr-traceback_on_time_off-yomet branch 2 times, most recently from d556e3f to 5b81e52 Compare May 7, 2026 08:59
Copy link
Copy Markdown

@Mahmoudk3m Mahmoudk3m 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 🚀.

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)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

If you hardcode 0, it will ignore the value coming from the domain.

Copy link
Copy Markdown

@Mahmoudk3m Mahmoudk3m left a comment

Choose a reason for hiding this comment

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

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.

@yogietama yogietama force-pushed the master-hr-traceback_on_time_off-yomet branch 4 times, most recently from e054b3a to 7a1db82 Compare May 8, 2026 13:11
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
@yogietama yogietama force-pushed the master-hr-traceback_on_time_off-yomet branch from 7a1db82 to 5eac7ef Compare May 8, 2026 14:49
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