Merge pull request #2497 from expsa/Esraa-Ensan-hr-tasks
rais warning when training lines in draft
This commit is contained in:
commit
a5372414a8
|
|
@ -489,7 +489,7 @@ class HrOfficialMission(models.Model):
|
|||
|
||||
def hr_aaproval(self):
|
||||
# self.chick_employee_ids()
|
||||
lines_draft_status = any(self.employee_ids.filtered(lambda emp: emp.status == 'draft'))
|
||||
lines_draft_status = any(self.employee_ids.filtered(lambda emp: emp.status in ('draft','direct_manager')))
|
||||
if lines_draft_status and self.mission_type.work_state=='training':
|
||||
raise ValidationError(_("You must Approve all Employees Line First."))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue