draft: [16.0][FIX] hr_holidays_natural_period: fix compatibility with hr_work_entry_holidays
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.
Hi @victoralmau, some modules you are maintaining are being modified, check this out!
Perhaps the error is related to https://github.com/OCA/hr-holidays/pull/226 and can be resolved with that change.
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.