添加功能
This commit is contained in:
@@ -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 = []
|
||||
|
||||
Reference in New Issue
Block a user