From 456ed4902fedbeefefa865d8b073b557ae52febe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E5=81=A5=E6=98=8E?= Date: Wed, 3 Jul 2024 21:39:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=81=E4=B8=9A=E5=BE=AE=E4=BF=A1=20?= =?UTF-8?q?=E5=91=98=E5=B7=A5=E5=88=9B=E5=BB=BA=E7=94=A8=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_wechat/models/hr_employee.py | 4 ++++ yuthon_wechat/views/hr_employee_views.xml | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/yuthon_wechat/models/hr_employee.py b/yuthon_wechat/models/hr_employee.py index a73767efe..3d08c0199 100644 --- a/yuthon_wechat/models/hr_employee.py +++ b/yuthon_wechat/models/hr_employee.py @@ -50,3 +50,7 @@ class HrEmployee(models.Model): """ def send_wecom_employee(self): pass + + def action_create_user(self): + self._context["default_oauth_uid"] = self.wecom_userid + return super().action_create_user() diff --git a/yuthon_wechat/views/hr_employee_views.xml b/yuthon_wechat/views/hr_employee_views.xml index 5d98ca4eb..9cd0945a9 100644 --- a/yuthon_wechat/views/hr_employee_views.xml +++ b/yuthon_wechat/views/hr_employee_views.xml @@ -21,4 +21,15 @@ + + + res.users.simple.form.inherit + res.users + + + + + + + \ No newline at end of file