diff --git a/yuthon_hr_attendance/models/message_reminder_tasks.py b/yuthon_hr_attendance/models/message_reminder_tasks.py index 0c1675f2b..c3e8715b2 100644 --- a/yuthon_hr_attendance/models/message_reminder_tasks.py +++ b/yuthon_hr_attendance/models/message_reminder_tasks.py @@ -58,6 +58,11 @@ class MessageReminderTasks(models.Model): final_employees = condition1_employees.filtered(lambda emp: emp not in condition2_employee_ids) task_vals_list = [] is_workday = self._process_shift_days(current_date) + template = self.env['planning.slot.template'].search( + [('role_id.name', '=', '集团行政')], + limit=1 + ) + sch_check_in_time, sch_check_out_time = self.normal_clock_in_time(template, current_date) if is_workday: for employee in final_employees: emp_name = employee.name @@ -66,7 +71,7 @@ class MessageReminderTasks(models.Model): is_lactating = employee.id in breastfeeding_employee_ids if is_lactating: # 哺乳人员 - reminder_times = self.get_reminder_lactating_personnel(employee, current_date) + reminder_times = self.get_reminder_lactating_personnel(employee, current_date, sch_check_in_time, sch_check_out_time) reminder_types = ['work', 'offWork'] shift_name = '行政班次(哺乳)' else: diff --git a/yuthon_hr_employee_approval/models/yuthon_onboard_approval.py b/yuthon_hr_employee_approval/models/yuthon_onboard_approval.py index 08c8fe03f..1ad9fcdde 100644 --- a/yuthon_hr_employee_approval/models/yuthon_onboard_approval.py +++ b/yuthon_hr_employee_approval/models/yuthon_onboard_approval.py @@ -260,6 +260,7 @@ class YuthonOnboardApproval(models.Model): 'date_end': self.duration_employment_end, 'start_date': self.probation_start_date or self.duration_employment, 'end_date': self.probation_end_date or self.duration_employment_end, + 'resource_calendar_id': resource_calendar_id.id, 'is_probation': True, })