Merge pull request #112 from expsa/abuzar_task_hr

[FIX] fix holiday.can_reset = True is else
This commit is contained in:
AbuzarExp 2024-07-08 16:12:48 +03:00 committed by GitHub
commit 98af396a6e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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):