From 2fd2e40b3e8548f042c3bb652005193361eb1d52 Mon Sep 17 00:00:00 2001 From: pengyuthon Date: Wed, 11 Feb 2026 09:49:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_hr_attendance/controllers/applet_address.py | 3 ++- .../wizard/applet_security_quick_perm_views.xml | 9 ++++++--- .../wizard/applet_security_quick_perm_wizard.py | 5 ++++- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/yuthon_hr_attendance/controllers/applet_address.py b/yuthon_hr_attendance/controllers/applet_address.py index 3ed20bff1..cf650007a 100644 --- a/yuthon_hr_attendance/controllers/applet_address.py +++ b/yuthon_hr_attendance/controllers/applet_address.py @@ -31,12 +31,14 @@ class AppletAddress(models.Model): class AppletSecurity(models.Model): _name = 'applet.security' _description = "小程序权限管理" + _rec_name = "employee_id" employee_id = fields.Many2one('hr.employee', string="员工") company_id = fields.Many2one(related="employee_id.company_id", string="公司", store=True) department_id = fields.Many2one(related="employee_id.department_id", string="部门", store=True) applet_security_setting_ids = fields.Many2many('applet.security.setting', string="权限板块") + def init_applet_security(self): """ 初始化权限 @@ -68,7 +70,6 @@ class AppletSecurity(models.Model): "target": "new", "context": { "default_applet_security_ids": applet_ids.ids, # 默认员工 - # "default_employee_ids": applet_ids.employee_id.ids, # 默认员工 }, } diff --git a/yuthon_hr_attendance/wizard/applet_security_quick_perm_views.xml b/yuthon_hr_attendance/wizard/applet_security_quick_perm_views.xml index c70cb9b28..075ea2399 100644 --- a/yuthon_hr_attendance/wizard/applet_security_quick_perm_views.xml +++ b/yuthon_hr_attendance/wizard/applet_security_quick_perm_views.xml @@ -3,9 +3,12 @@ applet.security.quick.perm.wizard.form applet.security.quick.perm.wizard -
+ - + + + +