From 194c876b75c26a0d88665a25459459924ccac305 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= <9664676+pengyuthon@user.noreply.gitee.com> Date: Mon, 29 Jun 2026 18:33:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_hr_attendance/models/hr_attendance_detail_wechat.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/yuthon_hr_attendance/models/hr_attendance_detail_wechat.py b/yuthon_hr_attendance/models/hr_attendance_detail_wechat.py index 62fdbf426..05be98727 100644 --- a/yuthon_hr_attendance/models/hr_attendance_detail_wechat.py +++ b/yuthon_hr_attendance/models/hr_attendance_detail_wechat.py @@ -293,6 +293,8 @@ class HrAttendanceDetail(models.Model): template_domain.append(('planning_name', '=', planning_name)) template_domain.append(('department_id', 'in', all_dept_ids)) template = self.env['planning.slot.template'].search(template_domain, limit=1) + if not planning_slots: + template = None if not template: role_templates = [