From 916ff91d9704d962af04505ee9574fae992691e5 Mon Sep 17 00:00:00 2001 From: pengyuthon Date: Sun, 14 Dec 2025 18:24:33 +0800 Subject: [PATCH 1/2] 1 --- yuthon_hr_attendance/models/hr_attendance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yuthon_hr_attendance/models/hr_attendance.py b/yuthon_hr_attendance/models/hr_attendance.py index 9ca435e68..0aeb0e5eb 100644 --- a/yuthon_hr_attendance/models/hr_attendance.py +++ b/yuthon_hr_attendance/models/hr_attendance.py @@ -988,7 +988,7 @@ class HrAttendance(models.Model): def test_card(self): content_item = [{"key": "班次", "value": "测试行政"}, {"key": "类型", "value": "下班"}] self.sudo().env["wecom.apps"].sync_send_message_textcard( - category='att', user_id='18562027762', + category='att', user_id='78', description="记得打卡", title="打卡提醒", content_item=content_item, ) From c2ec0f475ead0787cc5b2e77ea7f480074ee6f38 Mon Sep 17 00:00:00 2001 From: pengyuthon Date: Sun, 14 Dec 2025 18:25:11 +0800 Subject: [PATCH 2/2] 1 --- yuthon_hr_attendance/models/hr_attendance.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yuthon_hr_attendance/models/hr_attendance.py b/yuthon_hr_attendance/models/hr_attendance.py index 0aeb0e5eb..bf7f1689b 100644 --- a/yuthon_hr_attendance/models/hr_attendance.py +++ b/yuthon_hr_attendance/models/hr_attendance.py @@ -985,10 +985,10 @@ class HrAttendance(models.Model): except Exception as e: _logger.error(f"下班打卡提醒发送失败:员工={employee_id.name}, 错误={e}") - def test_card(self): + def test_card(self, user_id): content_item = [{"key": "班次", "value": "测试行政"}, {"key": "类型", "value": "下班"}] self.sudo().env["wecom.apps"].sync_send_message_textcard( - category='att', user_id='78', + category='att', user_id=str(user_id), description="记得打卡", title="打卡提醒", content_item=content_item, )