From 91fc418a930c844377d8409d3cb257524daaf877 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= <9664676+pengyuthon@user.noreply.gitee.com> Date: Wed, 17 Dec 2025 10:21:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_will_task/models/yuthon_will_task.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/yuthon_will_task/models/yuthon_will_task.py b/yuthon_will_task/models/yuthon_will_task.py index 2d52a9b68..3798360d3 100644 --- a/yuthon_will_task/models/yuthon_will_task.py +++ b/yuthon_will_task/models/yuthon_will_task.py @@ -204,11 +204,12 @@ class YuthonWillTask(models.Model): def add_comment(self): self.ensure_one() - employee_list = [i.id for i in self.employee_ids] + [i.id for i in self.employee_ids2] + admin = self.env['hr.employee'].search([('name', '=', 'Administrator')]) + employee_list = [i.id for i in self.employee_ids] + [i.id for i in self.employee_ids2] + admin.id for employee_id in self.env['hr.employee'].search([('id', 'in', employee_list)]): if not employee_id.wecom_userid: raise UserError("请同步{}的企业微信".format(employee_id.name)) - url = f'http:://oa.thtzjt.com/webh5#/journey?id={self.id}' + url = f'https://oa.thtzjt.com/webh5#/journey?id={self.id}' data_name = "事项名称: " + self.name + '\n' data_user_ids = '参与人: ' + ', '.join(self.employee_ids.mapped('name')) + '\n' data_employee_id = ('司机:' + ', '.join(self.employee_ids2.mapped('name')) + '\n') if self.employee_ids2 else ''