This commit is contained in:
Bakry 2025-01-15 13:02:09 +03:00
parent 5c2eccbbb1
commit 6ef03fb757
1 changed files with 2 additions and 2 deletions

View File

@ -255,8 +255,8 @@ class HRHolidays(models.Model):
raise ValidationError(_('Sorry you have no balance'))
worked_days = ((datetime.utcnow() + timedelta(hours=3)).date() -
datetime.strptime(str(rec.employee_id.first_hiring_date), "%Y-%m-%d").date()).days + 1
if worked_days < rec.holiday_status_id.number_of_days:
raise exceptions.Warning(_('Sorry you can not create leave request you have not holidays'))
#if worked_days < rec.holiday_status_id.number_of_days:
# raise exceptions.Warning(_('Sorry you can not create leave request you have not holidays'))
#### Delete upcoming_leave and add up##
if rec.number_of_days_temp > rec.leave_balance_date and rec.state != 'validate1' and not (