Skip to content

Conversation

@abdullahsherif
Copy link

this fixes the traceback error occuring when trying to select time off types via some flows

Task #5379901

@robodoo
Copy link

robodoo commented Dec 2, 2025

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

Copy link

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

The fix is good but I have some comments about the commit message:

You wrote the wrong module name in the commit message

for bug fixes we need:

  • Steps to reproduce and bug description
  • Cause of the bug
  • How you fixed it

Also, for bug fixes, we need to add tests to prevent it from happening again.

@abdullahsherif abdullahsherif force-pushed the master-hr-onboarding-traceback_on_time_off_type-abshe branch from 0d0aa75 to e414881 Compare December 4, 2025 12:19
Copy link

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

Helloo.

The commit message is still a bit wrong:
you're missing the module name.
bug fix tasks should have: (bug, cause, fix)

Also you're still missing the tests :)
Thanks for your work 🚀

@abdullahsherif abdullahsherif force-pushed the master-hr-onboarding-traceback_on_time_off_type-abshe branch from e414881 to 08d5ab5 Compare December 4, 2025 12:58
Copy link

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

Hello,

tests for search methods should actually assert something about the results, not just call .search() and ignore the return value.

So if you try to remove your fix and run the test it'll still pass.

'requires_allocation': True,
})

leave_type.search(domain=[('virtual_remaining_leaves', '>', 0)])

Choose a reason for hiding this comment

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

Suggested change
leave_type.search(domain=[('virtual_remaining_leaves', '>', 0)])
self.env['hr.leave.type'].search(domain=[('virtual_remaining_leaves', '>', 0)])

It should be self.env['hr.lreave.type'] instead of leave_type.search. Even though it does the same thing.

Bug: traceback error when going throw normal flows

Cause: missing parameter on a function call

Fix: added the missing parameter

Steps to reproduce: Time Off >> Configuration >> Time Off Types >> Open any type, navigate to the Smart button Time Off >> Click on New >> Time Off Type

Task #5379901
@abdullahsherif abdullahsherif force-pushed the master-hr-onboarding-traceback_on_time_off_type-abshe branch from 08d5ab5 to 5a2a39a Compare December 5, 2025 08:43
Copy link

@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, LGTM 🚀

@Mahmoudk3m Mahmoudk3m merged commit a9f8d87 into master-hr-onboarding-abshe Dec 5, 2025
@Mahmoudk3m Mahmoudk3m deleted the master-hr-onboarding-traceback_on_time_off_type-abshe branch December 5, 2025 15:32
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.

4 participants