[FIX] hr_holidays: allow request unlink because of typo in group name
opw 2144639 closes odoo/odoo#40927 X-original-commit: 82de73f421885e76aae81e2e6d8ec7bb585ad3f4 Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
This commit is contained in:
@@ -706,7 +706,7 @@ class HolidaysRequest(models.Model):
|
||||
error_message = _('You cannot delete a time off which is in %s state')
|
||||
state_description_values = {elem[0]: elem[1] for elem in self._fields['state']._description_selection(self.env)}
|
||||
|
||||
if not self.user_has_groups('hr_holidays.groups_hr_user'):
|
||||
if not self.user_has_groups('hr_holidays.group_hr_holidays_user'):
|
||||
if any(hol.state != 'draft' for hol in self):
|
||||
raise UserError(error_message % state_description_values.get(self[:1].state))
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user