Merge pull request !9117 from 李鹏宇/dev
This commit is contained in:
李鹏宇
2026-03-02 03:13:33 +00:00
committed by Gitee
+6 -2
View File
@@ -354,8 +354,12 @@ class HrAttendance(models.Model):
title = '【本月考勤异常提醒】'
else:
continue
url = f'https://phone.thtzjt.com/phone/AttendanceSummary/{fields.date.today().year}/{fields.date.today().month}/{emp.user_id.id}'
today = fields.date.today()
if today.month == 1:
last_month = fields.date(today.year - 1, 12, 1)
else:
last_month = fields.date(today.year, today.month - 1, 1)
url = f'https://phone.thtzjt.com/phone/AttendanceSummary/{last_month.year}/{last_month.month}/{emp.user_id.id}'
self.sudo().env["wecom.apps"].sync_send_message_textcard(category='att',
user_id=emp.wecom_userid,
title=f'【{title}】',