添加功能
This commit is contained in:
@@ -715,12 +715,8 @@ class SoongWorkflowCommentWizard(models.TransientModel):
|
||||
"done_by": self.employee_ids.user_id.id,
|
||||
"node_btn_name": "0",
|
||||
})
|
||||
result_data = self.sudo().env["wecom.apps"].sync_send_message_textcard(category='oa', user_id=self.employee_ids.wecom_userid, title=record_id._description, description=description, url=url, btntxt="查看详情")
|
||||
msg_id = None
|
||||
if result_data and isinstance(result_data, list) and len(result_data) > 0:
|
||||
last_item = result_data[-1]
|
||||
if isinstance(last_item, dict) and 'msgid' in last_item:
|
||||
msg_id = last_item['msgid'] or ""
|
||||
result_data = self.sudo().env["wecom.apps"].sync_send_message_textcard(category='oa', user_id='18562027762', title=record_id._description, description=description, url=url, btntxt="查看详情")
|
||||
msg_id = result_data[-1]['msgid']
|
||||
log_id.msg_id = msg_id
|
||||
for emp in self.dep_manager_employee_ids:
|
||||
workflow_record_id.users_ids = [(4, employee.user_id.id) for employee in self.dep_manager_employee_ids if employee.user_id]
|
||||
@@ -735,11 +731,7 @@ class SoongWorkflowCommentWizard(models.TransientModel):
|
||||
"node_btn_name": "4",
|
||||
})
|
||||
result_data = self.sudo().env["wecom.apps"].sync_send_message_textcard(category='oa', user_id=emp.wecom_userid, title=record_id._description + "承办", description=description, url=url, btntxt="查看详情")
|
||||
msg_id = None
|
||||
if result_data and isinstance(result_data, list) and len(result_data) > 0:
|
||||
last_item = result_data[-1]
|
||||
if isinstance(last_item, dict) and 'msgid' in last_item:
|
||||
msg_id = last_item['msgid'] or ""
|
||||
msg_id = result_data[-1]['msgid']
|
||||
log_id.msg_id = msg_id
|
||||
for employee in self.circulated_employee_ids:
|
||||
workflow_record_id.users_ids = [(4, employee.user_id.id) for employee in self.circulated_employee_ids if employee.user_id]
|
||||
@@ -763,12 +755,8 @@ class SoongWorkflowCommentWizard(models.TransientModel):
|
||||
"node_btn_id": self.node_btn_id.id,
|
||||
"approval_state": "0",
|
||||
})
|
||||
result_data = self.sudo().env["wecom.apps"].sync_send_message_textcard(category='oa', user_id=emp.wecom_userid, title=record_id._description + "传阅/抄送",description=description, url=url, btntxt="查看详情")
|
||||
msg_id = None
|
||||
if result_data and isinstance(result_data, list) and len(result_data) > 0:
|
||||
last_item = result_data[-1]
|
||||
if isinstance(last_item, dict) and 'msgid' in last_item:
|
||||
msg_id = last_item['msgid'] or ""
|
||||
result_data = self.sudo().env["wecom.apps"].sync_send_message_textcard(category='oa', user_id='18562027762', title=record_id._description + "传阅/抄送",description=description, url=url, btntxt="查看详情")
|
||||
msg_id = result_data[-1]['msgid']
|
||||
log2_id.msg_id = msg_id
|
||||
workflow_record_id.employee_ids = self.dep_manager_employee_ids + self.employee_ids + self.circulated_employee_ids
|
||||
record_id.log_ids[-1].write({"comment": self.comment, "approval_state": "2", "lase_click_date": fields.Datetime.now()})
|
||||
|
||||
Reference in New Issue
Block a user