!8755 Merge remote-tracking branch 'origin/dev' into dev
Merge pull request !8755 from 李鹏宇/dev
This commit is contained in:
@@ -277,7 +277,7 @@ class HrAttendance(models.Model):
|
||||
])
|
||||
# 按员工分组,整理异常记录(结构:{员工ID: [异常文案列表, 员工对象]})
|
||||
employee_abnormal = {}
|
||||
for rec in attendance_records.search([('employee_id.name', '=', '叶华锋')]):
|
||||
for rec in attendance_records:
|
||||
emp = rec.employee_id
|
||||
emp_id = emp.id
|
||||
if emp_id not in employee_abnormal:
|
||||
@@ -316,11 +316,13 @@ class HrAttendance(models.Model):
|
||||
abnormal_list = data['abnormal_list']
|
||||
if not abnormal_list:
|
||||
continue
|
||||
abnormal_str = '、'.join(abnormal_list)
|
||||
reminder_msg = f"{abnormal_str},请尽快处理。"
|
||||
menu_id = self.env['ir.ui.menu'].search([('name', '=', '我的考勤')])
|
||||
target_url = f'https://oa.thtzjt.com/web=#action=2465&model=hr.attendance&view_type=list&cids=2-1-3-4&menu_id={menu_id}'
|
||||
url = self.sudo().env["wecom.apps"].generate_oauth_login_url(target_url, emp.user_id.id)
|
||||
# abnormal_str = '、'.join(abnormal_list)
|
||||
# reminder_msg = f"{abnormal_str},请尽快处理。"
|
||||
# menu_id = self.env['ir.ui.menu'].search([('name', '=', '我的考勤')])
|
||||
# target_url = f'https://oa.thtzjt.com/web=#action=2465&model=hr.attendance&view_type=list&cids=2-1-3-4&menu_id={menu_id}'
|
||||
# url = self.sudo().env["wecom.apps"].generate_oauth_login_url(target_url, emp.user_id.id)
|
||||
|
||||
url = f'https://phone.thtzjt.com/phone/AttendanceSummary/{fields.date.today().year}/{fields.date.today().month}/{emp.user_id.id}'
|
||||
self.sudo().env["wecom.apps"].sync_send_message_textcard(category='att_ok',
|
||||
user_id=emp.wecom_userid,
|
||||
title='【考勤异常提醒】',
|
||||
|
||||
Reference in New Issue
Block a user