@@ -224,13 +224,8 @@ class SoongWorkflowCommentWizard(models.TransientModel):
|
||||
# 根据勾选的条件设置域条件(只勾选一个)
|
||||
if is_automatic and record_id.department_id:
|
||||
# 按当前申请人自动匹配-本部门(保留部门和公司条件)
|
||||
# 获取当前部门及其上一级部门ID
|
||||
department_ids = [record_id.department_id.id]
|
||||
if record_id.department_id.parent_id:
|
||||
department_ids.append(record_id.department_id.parent_id.id)
|
||||
department_domain = ['|'] * (len(department_ids) - 1)
|
||||
for dep_id in department_ids:
|
||||
department_domain.extend([('department_id', '=', dep_id), ('department_ids', 'in', dep_id)])
|
||||
department_domain = ['|', ('department_id', '=', record_id.department_id.id),
|
||||
('department_ids', 'in', record_id.department_id.id)]
|
||||
company_domain = [('company_id', '=', record_id.company_id.id)] if hasattr(record_id,
|
||||
'company_id') else []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user