[FIX] fix holiday.can_reset = True is else

This commit is contained in:
odex 2024-07-08 16:11:28 +03:00
parent fbbc8fb0c4
commit 896c6d2ea0
1 changed files with 2 additions and 0 deletions

View File

@ -242,6 +242,8 @@ class Holidays(models.Model):
for holiday in self:
if group_hr_manager in user.groups_id or holiday.employee_id and holiday.employee_id.user_id == user:
holiday.can_reset = True
else:
holiday.can_reset = False
@api.constrains('date_from', 'date_to')
def _check_date(self):