Skip to content

[17.0][FIX+IMP] hr_holidays_natural_period: Hide Half day option in leaves if natural_day is selected + natural_day_half_day option #195

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: 17.0
Choose a base branch
from

Conversation

victoralmau
Copy link
Member

FWP from 16.0: #192

Continuation of #191

hr_holidays_natural_period: Hide Half day option in leaves if natural_day is selected

Before
antes

After
despues

Extra changes done:

  • hr_holidays_natural_period: Add Natural day (Half day) option (natural_day_half_day)
  • hr_holidays_natural_period: Adding tests to cover cases with natural_day_half_day

Please @pedrobaeza and @carlos-lopez-tecnativa can you review it?

@Tecnativa TT56402

@pedrobaeza pedrobaeza added this to the 17.0 milestone May 29, 2025
Copy link

@carlos-lopez-tecnativa carlos-lopez-tecnativa left a comment

Choose a reason for hiding this comment

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

Sorry, but I don't fully understand the behavior of the new natural_day_half_day option. I have the following scenario:

Two time off types: one configured as half day and another with natural_day_half_day.

image

But when I assign the time off, the new option counts full days. I expected it to count half days instead.
Is this not the expected behavior?
image

image

@pedrobaeza
Copy link
Member

The "half-day" option is to allow to have the check to put the half day. Some may not be interested in allow you half-day on your time-offs, so you restrict it. But when ticking it and selecting half-day, the leave should be 0.5. Isn't that working?

@carlos-lopez-tecnativa
Copy link

The "half-day" option is to allow to have the check to put the half day. Some may not be interested in allow you half-day on your time-offs, so you restrict it. But when ticking it and selecting half-day, the leave should be 0.5. Isn't that working?

I hope it works as you described, but please take a look at my screenshots, this new option is counting full days.

@pedrobaeza
Copy link
Member

Then that can be considered incorrect indeed.

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