fix overtime and mission constrain
This commit is contained in:
parent
328bb67cf8
commit
148ac10844
|
|
@ -314,7 +314,7 @@ class employee_overtime_request(models.Model):
|
|||
mission = self.env['hr.official.mission.employee'].search(
|
||||
[('employee_id', '=', line.employee_id.id), ('official_mission_id.state', '!=', 'refused'),
|
||||
('official_mission_id.mission_type.related_with_financial', '=', True),
|
||||
('official_mission_id.mission_type.work_state', '=', 'legation'),
|
||||
#('official_mission_id.mission_type.work_state', '=', 'legation'),
|
||||
'|', '|'] + clause_1 + clause_2 + clause_3)
|
||||
if mission:
|
||||
raise exceptions.Warning(_('Sorry The Employee %s Actually Has Legation '
|
||||
|
|
|
|||
|
|
@ -1407,7 +1407,8 @@ class HrOfficialMissionEmployee(models.Model):
|
|||
finacial = rec.official_mission_id.mission_type.related_with_financial
|
||||
delegation = rec.official_mission_id.mission_type.work_state
|
||||
if modules_req:
|
||||
if delegation == 'legation' and finacial:
|
||||
#if delegation == 'legation' and finacial:
|
||||
if finacial == True:
|
||||
if rec.date_to and rec.date_from:
|
||||
clause_1 = ['&', ('employee_over_time_id.date_from', '<=', rec.date_from),
|
||||
('employee_over_time_id.date_to', '>=', rec.date_from)]
|
||||
|
|
|
|||
Loading…
Reference in New Issue