添加功能

This commit is contained in:
李鹏宇
2026-04-20 19:52:29 +08:00
parent 0dc15074d4
commit 2ee0a306e6
+9 -3
View File
@@ -656,9 +656,11 @@ class IssueLibrary(models.Model):
# 生成议题明细,根据是否含党字设置 is_sanda
for issue in issue_active_ids:
dept_manager = self.env['hr.employee'].search([
dept_manager = self.env['hr.employee'].sudo().search([
('active', '=', True),
'|',
('user_role_id.name', '=', '部门经理'),
('user_role_ids.name', '=', '部门经理'),
'|',
('department_id', '=', issue.department_id.id),
('department_ids', 'in', [issue.department_id.id])
@@ -715,13 +717,17 @@ class IssueLibrary(models.Model):
target_managers = self.env['hr.employee'].search([
('company_id', '=', current_user.company_id.id),
('department_id.name', 'in', target_dept_names),
('active', '=', True),
'|',
('user_role_id.name', '=', '部门经理'),
('active', '=', True)
('user_role_ids.name', '=', '部门经理'),
])
manager_employee = self.env['hr.employee'].search([
('id', 'in', target_managers.ids),
('user_role_id.name', '=', '部门经理')
'|',
('user_role_id.name', '=', '部门经理'),
('user_role_ids.name', '=', '部门经理')
], limit=1)
attendees_ids = []