This commit is contained in:
Bakry 2025-01-01 18:09:43 +03:00
parent fcb225a421
commit 2f20f070ff
1 changed files with 2 additions and 1 deletions

View File

@ -544,7 +544,8 @@ class HRHolidays(models.Model):
for index in range(1, days_diff):
open_year_date = open_year + timedelta(days=index)
dutartion += self.remaining_leaves_of_day_by_date(emp, str(open_year_date), item , is_month=False, is_years=False)
if already_exist.remaining_leaves - dutartion > dutartion:
# fix fix
if already_exist.remaining_leaves - this_year_balance > dutartion:
dutartion = dutartion + this_year_balance
already_exist.write({'remaining_leaves': dutartion})
@api.model