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
-