添加功能

This commit is contained in:
李鹏宇
2026-04-09 18:53:02 +08:00
parent f106b7ac9d
commit 5c394d4127
2 changed files with 4 additions and 1 deletions
@@ -6,7 +6,7 @@
<field name="arch" type="xml">
<tree editable="bottom">
<header>
<button name="action_init_device" string="初始化设备" type="object"/>
<button name="action_init_device" string="同步员工" type="object"/>
</header>
<field name="name"/>
<field name="attendance_address"/>
@@ -207,6 +207,9 @@ class YuthonOnboardApproval(models.Model):
})
# employee_id.send_wecom_employee()
employee_id.create_user()
iots = self.env['attendance.iot'].sudo().search([('company_id', '=', self.company_id.id)])
for iot in iots:
iot.action_init_device()
if self.job_id.name not in ['董事长', '总经理', '副总经理']:
applet_security = self.env['applet.security'].sudo().search([
('employee_id', '=', employee_id.id)