Skip to content
Snippets Groups Projects
Commit d1d43643 authored by Yannick Tivisse's avatar Yannick Tivisse
Browse files

[FIX] hr_holidays: Only allow time off users to be time off type responsible

This could responsibility is designed for that kind of users.

Without that it could lead to inconsistencies during the time off
validation flow. (ir.rule errors, ...)
parent 2df9d021
Branches
Tags
No related merge requests found
......@@ -69,6 +69,7 @@ class HolidaysType(models.Model):
compute='_compute_group_days_leave', string='Group Time Off')
company_id = fields.Many2one('res.company', string='Company', default=lambda self: self.env.company)
responsible_id = fields.Many2one('res.users', 'Responsible',
domain=lambda self: [('groups_id', 'in', self.env.ref('hr_holidays.group_hr_holidays_user').id)],
help="This user will be responsible for approving this type of times off"
"This is only used when validation is 'hr' or 'both'",)
validation_type = fields.Selection([
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment