!11061 添加功能

Merge pull request !11061 from 李鹏宇/dev_zhou
This commit is contained in:
李鹏宇
2026-04-21 09:57:52 +00:00
committed by Gitee
2 changed files with 7 additions and 1 deletions
@@ -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:
@@ -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,
})