result = []
dep_manager = record.employee_id.dep_manager
if dep_manager:
if dep_manager.id == record.employee_id.id:
result = [record.employee_id.parent_id.user_id.id if record.employee_id.parent_id else None]
else:
result = [dep_manager.user_id.id]
在对应审批节点,“审批角色”选择编码查询,然后将以下代码复制到“python code 查找”框里保存即可。
result = []
dep_manager = record.employee_id.dep_manager
if dep_manager:
if dep_manager.id == record.employee_id.id:
result = [record.employee_id.parent_id.user_id.id if record.employee_id.parent_id else None]
else :
result = [dep_manager.user_id.id]