diff --git a/yuthon_hr_attendance/models/yuthon_shift_planning.py b/yuthon_hr_attendance/models/yuthon_shift_planning.py index 9af9953e7..9173e6bf7 100644 --- a/yuthon_hr_attendance/models/yuthon_shift_planning.py +++ b/yuthon_hr_attendance/models/yuthon_shift_planning.py @@ -96,7 +96,7 @@ class YuthonShiftPlanning(models.Model): break weekday_mapping = { - 'one': 6, 'two': 0, 'three': 1, 'four': 2, 'five': 3, 'six': 4, 'seven': 5 + 'one': 0, 'two': 1, 'three': 2, 'four': 3, 'five': 4, 'six': 5, 'seven': 6 } ever_holidays = {} # 处理早班员工的休息日 @@ -126,11 +126,11 @@ class YuthonShiftPlanning(models.Model): if resource_id in ever_holidays and current_weekday in ever_holidays[resource_id]: pass else: - self.create_planning_slot(record, role_a,role_item, current_date) # 确保这个方法存在 + self.create_planning_slot(record, role_a, role_item, current_date) # 确保这个方法存在 current_date += timedelta(days=1) - # 为白班员工创建排班 + # 为白班员工创建排班 create_shifts_for_group(self.planning_ever_white_ids, role[0]) - # 为中班员工创建排班 + # 为中班员工创建排班 create_shifts_for_group(self.planning_ever_noon_ids, role[1]) def create_planning_slot(self, record,role,role_template,current_date): diff --git a/yuthon_hr_attendance/views/yuthon_shift_planning_views.xml b/yuthon_hr_attendance/views/yuthon_shift_planning_views.xml index 7269beeb5..8b1f3ad37 100644 --- a/yuthon_hr_attendance/views/yuthon_shift_planning_views.xml +++ b/yuthon_hr_attendance/views/yuthon_shift_planning_views.xml @@ -25,9 +25,9 @@ - + - + @@ -36,7 +36,7 @@ - + @@ -45,7 +45,7 @@ - +