add task permation and fix holiday

This commit is contained in:
odex 2024-07-18 18:14:23 +03:00
parent 4fd15ea5f5
commit a90acb0a7a
1 changed files with 2 additions and 2 deletions

View File

@ -97,7 +97,7 @@ class HrPersonalPermission(models.Model):
@api.depends('date_from', 'date_to')
def get_duration_no(self):
for item in self:
item._onchange_time()
# item._onchange_time()
if item.date_from and item.date_to:
start_date_value = datetime.strptime(str(item.date_from), "%Y-%m-%d %H:%M:%S")
end_date = datetime.strptime(str(item.date_to), "%Y-%m-%d %H:%M:%S")
@ -112,7 +112,7 @@ class HrPersonalPermission(models.Model):
@api.onchange('date_to', 'date_from', 'employee_id')
def permission_number_decrement(self):
for item in self:
item._onchange_time()
# item._onchange_time()
if item.employee_id:
if not item.employee_id.first_hiring_date:
raise exceptions.Warning(