[FIX] hr_holidays: Allow to duplicate refused/cancelled leaves
There's no reason to forbid the duplication of leaves that are refused
or cancelled, as the overlap check are excluding them.
This way, we allow an exit flow for users with "Time Off / All approver"
group, as once the holiday is refused, they can't back it to draft (only
administrators can do it). A usual need for these intermediates users
with people in their charge is to modify the leaves to extend or shorten
the initial asked period (for example, more/less paid time-off due to
varying workloads, or extended period by long disease).
Thus, they can duplicate the leave and use it as base for the new
period, only changing the end date without having to input all data.
TT44801
closes odoo/odoo#133541
Signed-off-by:
Sofie Gvaladze (sgv) <sgv@odoo.com>
Loading