mission type condition
This commit is contained in:
parent
8617cc5ff3
commit
d6f15be742
|
|
@ -435,7 +435,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'))
|
||||
if lines_draft_status:
|
||||
if lines_draft_status and self.mission_type.work_state=='training':
|
||||
raise ValidationError(_("You must Approve all Employees Line First."))
|
||||
|
||||
self.employee_ids.chick_not_overtime()
|
||||
|
|
|
|||
Loading…
Reference in New Issue