Merge pull request #281 from expsa/abuzar_task_hr

add task permation and fix holiday
This commit is contained in:
AbuzarExp 2024-07-18 18:15:24 +03:00 committed by GitHub
commit 7c93206e0e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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(