Merge pull request !3873 from 李鹏宇/dev
This commit is contained in:
李鹏宇
2025-07-15 09:13:26 +00:00
committed by Gitee
@@ -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 []