diff --git a/yuthon_hr_attendance/models/hr_attendance.py b/yuthon_hr_attendance/models/hr_attendance.py index 45d028808..a3075fb78 100644 --- a/yuthon_hr_attendance/models/hr_attendance.py +++ b/yuthon_hr_attendance/models/hr_attendance.py @@ -793,6 +793,7 @@ class HrAttendance(models.Model): 'is_early_card': False, 'is_late_card': False, 'is_abnormal': False, + 'is_approval': True, }) class card_remind_form(models.Model): diff --git a/yuthon_hr_attendance/models/hr_attendance_detail_wechat.py b/yuthon_hr_attendance/models/hr_attendance_detail_wechat.py index e3e668a10..c1f14a773 100644 --- a/yuthon_hr_attendance/models/hr_attendance_detail_wechat.py +++ b/yuthon_hr_attendance/models/hr_attendance_detail_wechat.py @@ -1078,8 +1078,8 @@ class HrAttendanceDetail(models.Model): if not global_leave: return False for leave in global_leave: - if leave.alternate_rest_day: - for rest_day in str(leave.alternate_rest_day).split(","): + if leave.shift_replacement_day: + for rest_day in str(leave.shift_replacement_day).split(","): # rest_day_month = str(rest_day).split("月")[0] rest_day_month = datetime.strptime(rest_day, "%m月%d日").strftime("%m") # rest_day_day = str(str(rest_day).split("月")[1].replace("月", "")).split("日")[0]