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, )