添加功能
This commit is contained in:
@@ -341,8 +341,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}】',
|
||||
|
||||
Reference in New Issue
Block a user