Skip to content

Conversation

@Faruk372742
Copy link

Bug reproduction steps: Timeoff->Configuration->Accrual Reports, when adding milestones you can select all days from 1 to 31 independently from the month when you selected yearly or twice a year options.

Bug cause: The days are kept with selection field and this selection field takes all the values in between 1-31.

Solution: Keeping maximum day limit for the last selected month as a field. To apply filtering (domain) to the selected day in the UI, the field must be relational field
1 - I opened a new accrual_days class and convert selection fields of days to the many2one relationship with accrual_days class.
2 - By that way, I applied a domain so that the selected day cannot be larger than max day in the selected month.
3 - Initially, there was no data in the accrual_days, I created new data file to save all 31 days to there.
4 - In the UI, use many2one day id fields instead of previous selection fields.
5 - First, I applied the logic to yearly_day to fix the day selection when the 'yearly' option is selected, then I fixed the day selection issue in 'biyearly' option with the same logic.

task - 5463057

Bug reproduction steps: Timeoff->Configuration->Accrual Reports, when adding milestones you can select all days from 1 to 31 independently from the month when you selected yearly or twice a year options.
Bug cause: The days are kept with selection field and this selection field takes all the values in between 1-31.
Solution: Keeping maximum day limit for the last selected month as a field. To apply filtering (domain) to the selected day in the UI, the field must be relational field
          1 - I opened a new accrual_days class and convert selection fields of days to the many2one relationship with accrual_days class.
          2 - By that way, I applied a domain so that the selected day cannot be larger than max day in the selected month.
          3 - Initially, there was no data in the accrual_days, I created new data file to save all 31 days to there.
          4 - In the UI, use many2one day id fields instead of previous selection fields.
          5 - First, I applied the logic to yearly_day to fix the day selection when the 'yearly' option is selected, then I fixed the day selection issue in 'biyearly' option with the same logic.

task - 5463057
@robodoo
Copy link

robodoo commented Jan 6, 2026

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

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