employees=[] if record.department_id.x_hrbp_sp1: employees.append(record.department_id.x_hrbp_sp1.id) if record.department_id.x_hrbp_sp2: employees.append(record.department_id.x_hrbp_sp2.id) if record.department_id.x_hrbp_sp3: employees.append(record.department_id.x_hrbp_sp3.id) if record.department_id.x_hrbp_2: employees.append(record.department_id.x_hrbp_2.id) chen=env['hr.employee'].search([('employee_number','=','800015347')]) zhang=env['hr.employee'].search([('employee_number','=','800138028')]) _logger.info('---------------------------') _logger.info('---------------------------') _logger.info('---------------------------') _logger.info('当前所有的审批人:%s,%s,%s,%s。陈思明:%s。张洁:%s' % (record.department_id.x_hrbp_sp1.name,record.department_id.x_hrbp_sp2.name,record.department_id.x_hrbp_sp3,record.department_id.x_hrbp_2.name,chen.name,zhang.name)) _logger.info('employees:%s' % (employees)) if chen.id in employees: cc_user_ids = [zhang.user_id.id] _logger.info('cc_user_ids:%s' % (cc_user_ids)) result = cc_user_ids else: result = []
审批流员工自助离职,截图中节点,当审批人是陈思明800015347的情况下抄送员工张洁800138028