hr-holidays icon indicating copy to clipboard operation
hr-holidays copied to clipboard

draft: [16.0][FIX] hr_holidays_natural_period: fix compatibility with hr_work_entry_holidays

Open quirino95 opened this issue 2 months ago • 2 comments

This PR fixes compatibility issues with hr_work_entry_holidays, in particular regarding context management.

Working on method _get_number_of_days, fix makes create method override (introduced with https://github.com/OCA/hr-holidays/pull/117) useless, so I removed it. As a result, also duration calculation looks more consistent and robust.

quirino95 avatar Nov 04 '25 12:11 quirino95

Hi @victoralmau, some modules you are maintaining are being modified, check this out!

OCA-git-bot avatar Nov 04 '25 12:11 OCA-git-bot

Perhaps the error is related to https://github.com/OCA/hr-holidays/pull/226 and can be resolved with that change.

victoralmau avatar Nov 04 '25 13:11 victoralmau

Confirmation and Detailed Analysis

Hello, I would like to confirm that I am also experiencing this exact issue in Odoo 16.

The problem occurs when the hr_work_entry_holidays module is installed alongside hr_holidays_natural_period.

Observation: When hr_work_entry_holidays is active, the natural days (calendar days) calculation for time off requests breaks, and the system reverts to counting only working days (e.g., 5 days for a 7-day week).

This strongly suggests a method overriding conflict where hr_work_entry_holidays is inadvertently nullifying the calendar day logic provided by hr_holidays_natural_period.

I hope this confirmation helps prioritize the fix! Thank you.

HAGolf avatar Nov 18 '25 10:11 HAGolf