Skip to content

[FIX] hr_holidays: Fix error when creating a leave - #5224

Merged
HashemKhaled merged 1 commit into
master-hr-onboarding-amgomfrom
master-time-off-fix-type-error-amgom
Aug 7, 2026
Merged

[FIX] hr_holidays: Fix error when creating a leave#5224
HashemKhaled merged 1 commit into
master-hr-onboarding-amgomfrom
master-time-off-fix-type-error-amgom

Conversation

@amgom-odoo

@amgom-odoo amgom-odoo commented Aug 6, 2026

Copy link
Copy Markdown

Fix a missing argument error when creating a leave and selecting work entry type.

Steps to reproduce:

  1. Create a new leave type with:
    • requires_allocation checked.
    • time_off_selectable checked.
    • allow_negative unchecked.
  2. Create a new allocation for this leave type with a positive number of days for an employee.
  3. Create a new leave request with this leave type and the allocated employee.

Task: 6449776

@robodoo

robodoo commented Aug 6, 2026

Copy link
Copy Markdown

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

@HashemKhaled HashemKhaled left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM! but since this is a bugfix task, we should add a test to be sure that it won't break again 🙂

@HashemKhaled HashemKhaled left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The commit message of bug fix tasks should include the steps to reproduce, reason and the solution

Image

@amgom-odoo
amgom-odoo force-pushed the master-time-off-fix-type-error-amgom branch 2 times, most recently from 805cd5a to f214dae Compare August 7, 2026 08:26

@HashemKhaled HashemKhaled left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

One small comment and we are ready to go

Comment thread addons/hr_holidays/tests/test_hr_holidays_virtual_remaining_leaves.py Outdated
Fix a missing argument error when creating a leave and selecting work entry type.

Steps to reproduce:
1. Create a new leave type with:
    - `requires_allocation` checked.
    - `time_off_selectable` checked.
    - `allow_negative` unchecked.
2. Create a new allocation for this leave type with a positive number of days for an employee.
3. Create a new leave request with this leave type and the allocated employee.

Task: 6449776
@amgom-odoo
amgom-odoo force-pushed the master-time-off-fix-type-error-amgom branch from f214dae to 6d91457 Compare August 7, 2026 09:53
@HashemKhaled
HashemKhaled merged commit e14c94f into master-hr-onboarding-amgom Aug 7, 2026
@HashemKhaled
HashemKhaled deleted the master-time-off-fix-type-error-amgom branch August 7, 2026 13:08
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