diff --git a/addons/hr_holidays/models/hr_leave.py b/addons/hr_holidays/models/hr_leave.py index 315c5ed8b10..bcd2845052d 100644 --- a/addons/hr_holidays/models/hr_leave.py +++ b/addons/hr_holidays/models/hr_leave.py @@ -79,7 +79,7 @@ class HolidaysRequest(models.Model): defaults = self._default_get_request_parameters(defaults) if 'holiday_status_id' in fields_list and not defaults.get('holiday_status_id'): - lt = self.env['hr.leave.type'].search(['|', ('requires_allocation', '=', 'no'), ('has_valid_allocation', '=', True)], limit=1) + lt = self.env['hr.leave.type'].search(['|', ('requires_allocation', '=', 'no'), ('has_valid_allocation', '=', True)], limit=1, order='sequence') if lt: defaults['holiday_status_id'] = lt.id