From 42cf46a4ac09ab2b8304b593e9f16d5dce0fdf16 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: Fri, 6 Feb 2026 14:54:21 +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_notice/models/yuthon_notice.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yuthon_notice/models/yuthon_notice.py b/yuthon_notice/models/yuthon_notice.py index b9687463a..da2bdabd7 100644 --- a/yuthon_notice/models/yuthon_notice.py +++ b/yuthon_notice/models/yuthon_notice.py @@ -206,7 +206,10 @@ class YuthonNotice(models.Model): user_wecom_mapping = [] we_id_list = [] for user_id in self.users_ids: - employee = user_id.employee_ids + employee = self.env['hr.employee'].sudo().search( + [('user_id', '=', user_id.id)], + limit=1 + ) if not employee: continue emp_id = employee.id