添加功能
This commit is contained in:
@@ -59,15 +59,16 @@ class YuthonCatering(models.Model):
|
||||
if not tomorrow_menu:
|
||||
return
|
||||
for emp in employee_ids:
|
||||
url = f"https://phone.thtzjt.com/phone/Meal/{emp.user_id.id}"
|
||||
self.sudo().env["wecom.apps"].sync_send_message_textcard(
|
||||
category='can',
|
||||
user_id=emp.wecom_userid,
|
||||
title="餐饮通知",
|
||||
description="请在 18:00 前登记下一工作日用餐,18点后未填的系统将自动视为就餐,如有疑问,联系办公室。",
|
||||
url=url,
|
||||
btntxt="详细信息"
|
||||
)
|
||||
if emp.name == '叶华锋':
|
||||
url = f"https://phone.thtzjt.com/phone/Meal/{emp.user_id.id}"
|
||||
self.sudo().env["wecom.apps"].sync_send_message_textcard(
|
||||
category='can',
|
||||
user_id=emp.wecom_userid,
|
||||
title="餐饮通知",
|
||||
description="请在 18:00 前登记下一工作日用餐,18点后未填的系统将自动视为就餐,如有疑问,联系办公室。",
|
||||
url=url,
|
||||
btntxt="详细信息"
|
||||
)
|
||||
|
||||
def task_conf(self):
|
||||
tomorrow = fields.Date.today() + timedelta(days=1)
|
||||
|
||||
Reference in New Issue
Block a user