Skip to content

[IMP] hr_holiday: dynamically disable invalid date options in accrual plan levels. - #5262

Open
aski97 wants to merge 1 commit into
master-hr-onboarding-vibelfrom
master-hr_holidays-fix_accrual_level_ux-vibel
Open

[IMP] hr_holiday: dynamically disable invalid date options in accrual plan levels.#5262
aski97 wants to merge 1 commit into
master-hr-onboarding-vibelfrom
master-hr_holidays-fix_accrual_level_ux-vibel

Conversation

@aski97

@aski97 aski97 commented Sep 2, 2026

Copy link
Copy Markdown

The purpose of this task is to prevent the selection of invalid dates (such as February 31st) in accrual plan levels by adding cross-validation for dependent selection fields.

UX Improvements:

  • Add disabled_selection OWL widget extending native SelectionField. Instead of hiding invalid options, it keeps all choices visible in the UI dropdown while graying out non-allowed choices. The component handles two selection types:
    • Days: restricts available days based on the selected month via target_field option (e.g., selecting February grays out days 30 and 31).
    • Months: restricts available months based on the selected day via target_field option (e.g., selecting the 31st disables months with fewer days like Feb/Apr/Jun/Sep/Nov).

Task-ID: 6524484

@robodoo

robodoo commented Sep 2, 2026

Copy link
Copy Markdown

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

@aski97
aski97 force-pushed the master-hr_holidays-fix_accrual_level_ux-vibel branch 2 times, most recently from 137c79d to 0ac4a14 Compare September 2, 2026 12:59
Comment thread addons/hr_holidays/models/hr_leave_accrual_plan.py
Comment thread addons/hr_holidays/models/hr_leave_accrual_plan_level.py
@aski97
aski97 force-pushed the master-hr_holidays-fix_accrual_level_ux-vibel branch from 0ac4a14 to 0c0ca73 Compare September 4, 2026 13:28
@aski97 aski97 changed the title [REF] hr_holiday: dynamically disable invalid date options in accrual plan levels. [IMP] hr_holiday: dynamically disable invalid date options in accrual plan levels. Sep 4, 2026
… plan levels.

The purpose of this task is to prevent the selection of invalid dates (such as February 31st) in accrual plan levels by adding cross-validation for dependent selection fields.

UX Improvements:
- Add `disabled_selection` OWL widget extending native `SelectionField`. Instead of hiding invalid options, it keeps all choices visible in the UI dropdown while graying out non-allowed choices. The component handles two selection types:
  * Days: restricts available days based on the selected month via `target_field` option (e.g., selecting February grays out days 30 and 31).
  * Months: restricts available months based on the selected day via `target_field` option (e.g., selecting the 31st disables months with fewer days like Feb/Apr/Jun/Sep/Nov).

Task-ID: 6524484
@aski97
aski97 force-pushed the master-hr_holidays-fix_accrual_level_ux-vibel branch from 0c0ca73 to b6236e8 Compare September 4, 2026 13:56
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