diff --git a/yuthon_hr_attendance/models/yuthon_shift_planning.py b/yuthon_hr_attendance/models/yuthon_shift_planning.py index 367f6809d..52db6b490 100644 --- a/yuthon_hr_attendance/models/yuthon_shift_planning.py +++ b/yuthon_hr_attendance/models/yuthon_shift_planning.py @@ -129,15 +129,10 @@ class YuthonShiftPlanning(models.Model): current_date = start_date while current_date <= end_date: current_weekday = current_date.weekday() - if resource_id in ever_holidays and current_weekday in ever_holidays[resource_id]: - pass - else: + if not (resource_id in ever_holidays and current_weekday in ever_holidays[resource_id]): self.create_planning_slot(record, role_a, role_item, current_date) current_date += timedelta(days=1) - if current_date >= end_date: - break - if current_date >= end_date: - break + # 为白班员工创建排班 create_shifts_for_group(self.planning_ever_white_ids, role[0]) # 为中班员工创建排班 diff --git a/yuthon_hr_attendance/views/yuthon_holiday_statement.xml b/yuthon_hr_attendance/views/yuthon_holiday_statement.xml index 872b21d18..d6960c392 100644 --- a/yuthon_hr_attendance/views/yuthon_holiday_statement.xml +++ b/yuthon_hr_attendance/views/yuthon_holiday_statement.xml @@ -12,10 +12,10 @@ - + - +