parent
8331c6cc8b
commit
97569423e5
|
|
@ -3626,8 +3626,8 @@ msgstr ""
|
|||
|
||||
#. module: employee_requests
|
||||
#: model:ir.model.fields.selection,name:employee_requests.selection__hr_clearance_form__clearance_type__final
|
||||
msgid "Final Clearance"
|
||||
msgstr "إنهاء خدمات"
|
||||
msgid "خروج نهائية"
|
||||
msgstr ""
|
||||
|
||||
#. module: employee_requests
|
||||
#: model:ir.model.fields.selection,name:employee_requests.selection__hr_personal_permission__type_exit__late_entry
|
||||
|
|
|
|||
|
|
@ -278,7 +278,7 @@ class HrPersonalPermission(models.Model):
|
|||
clause_3 = ['&', ('date_from', '<=', date_from), ('date_to', '>=', date_to)]
|
||||
return clause_1, clause_2, clause_3
|
||||
|
||||
@api.constrains('date_from', 'date_to','state')
|
||||
@api.constrains('date_from', 'date_to')
|
||||
def _get_date_constrains(self):
|
||||
for item in self:
|
||||
item.check_holiday_mission()
|
||||
|
|
@ -327,7 +327,7 @@ class HrPersonalPermission(models.Model):
|
|||
if item.duration > item.permission_number:
|
||||
raise exceptions.Warning(
|
||||
_('This Duration not Allowed it must be Less Than or equal Permission Hours in Month'))
|
||||
for employee_permission in employee_permissions.filtered(lambda r: r.id != self.id):
|
||||
for employee_permission in employee_permissions:
|
||||
if employee_permission.date_to and item.date_to:
|
||||
permission_date = datetime.strptime(str(employee_permission.date_to),
|
||||
DEFAULT_SERVER_DATETIME_FORMAT).date()
|
||||
|
|
@ -357,7 +357,7 @@ class HrPersonalPermission(models.Model):
|
|||
|
||||
# @api.constrains('date_from', 'date_to')
|
||||
def send(self):
|
||||
#self._get_date_constrains()
|
||||
self._get_date_constrains()
|
||||
self.permission_number_decrement()
|
||||
self._get_date_constrains2()
|
||||
self.state = "send"
|
||||
|
|
|
|||
Loading…
Reference in New Issue