Skip to content
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

Inconsistencies in leave duration calculation between standard Odoo and hr_holidays_compute_days #292

Closed
LeartS opened this issue Nov 5, 2016 · 3 comments

Comments

@LeartS
Copy link

LeartS commented Nov 5, 2016

  • The standard Odoo module uses the calendar_id field of the resource to check the leave request boundaries and compute the number of days, while the hr_holidays_compute_days module uses the calendar_id of the employee's contract
  • The standard Odoo module can compute the duration as a floating point, e.g. if my working time for a day is 09:00 - 13:00 and 14:00 - 18:00, and I take a leave that day from 09:00 to 13:30, Odoo correctly returns 0.5 days, but If I install the module only integers days are computed, and it becomes 1 day.

In my opinion, to keep consistency and to not lose functionality, the hr_holidays_compute_days should also use the calendar_id field of the resource and allow for non integer leave duration.

@feketemihai
Copy link
Member

@LeartS I agree with you on this, we already had this in a roadmap, please see https://github.com/OCA/hr/tree/10.0/hr_holidays_legal_leave#known-issues--roadmap, but this should be done with a configuration field, since in a lot of countries, there isn't defined in legislation percentage of holiday days...If we will have a config on company level or holiday status (i don't think that the medical days are calculated the same as percentage) to allow this, i agree on this type of calculation.

@LeartS
Copy link
Author

LeartS commented Nov 7, 2016

@feketemihai and what about the two different calendars? (employee's calendar vs employee's contract's calendar)

@LeartS
Copy link
Author

LeartS commented Nov 16, 2016

By the way, I agree that the per-hour or per-day config should be specific per hr.holidays.status

sambarros pushed a commit to sambarros/hr that referenced this issue Jul 26, 2018
[BSSFL-413] PO partner reference
Mraimou pushed a commit to camptocamp/hr that referenced this issue Nov 25, 2019
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants