上传的图像用于项目: 'CST技术支持'
  1. CST技术支持
  2. SLAL2-2325

【Pro-e签宝】-绩效管理执行人python支持

XMLWord打印

    • Icon: Change Change
    • 解决结果: 完成
    • Icon: High High
    • 202104
    • E-e签宝-OP-Y202005001
    • e签宝项目 http://testhr.tsign.cn/
    • 基础通用功能
    • 隐藏

      无规则:
      emps = env['hr.employee'].search([('employee_status.code','=','active'),('employee_status.code','=','active'),('x_juese','in',['TL','D'])])
      result = emps.mapped('user_id')

      ==============================
      有规则
      the_mapping = {
      'TL':'D',
      'a':'b',
      }
      submitter_uid = env['bp'].get_bp_info(self).get('submitter_uid')
      if submitter_uid.employee_id.x_juese in the_mapping:
      mapped_code = the_mapping.get(submitter_uid.employee_id.x_juese)
      emps = env['hr.employee'].search([('employee_status.code','=','active'),('employee_status.code','=','active'),('x_juese','=',mapped_code)])
      result = emps.mapped('user_id')

      显示
      无规则: emps = env ['hr.employee'] .search([('employee_status.code','=','active'),('employee_status.code','=','active'),('x_juese','in', ['TL','D'] )]) result = emps.mapped('user_id') ============================== 有规则 the_mapping = { 'TL':'D', 'a':'b', } submitter_uid = env ['bp'] .get_bp_info(self).get('submitter_uid') if submitter_uid.employee_id.x_juese in the_mapping: mapped_code = the_mapping.get(submitter_uid.employee_id.x_juese) emps = env ['hr.employee'] .search( [('employee_status.code','=','active'),('employee_status.code','=','active'),('x_juese','=',mapped_code)] ) result = emps.mapped('user_id')

      1.执行人规则(有条件):
      当提交人为普通员工角色时,执行人为TL层
      当提交人为TL层时,执行人为D层
      当提交人为D层时,执行人为高管层
      员工角色字段为后台自定义字段x_juese,目前维护的选择项是D层和TL层(可做一个样例之后维护数据后我们再按照样例修改)
      2.执行人规则(无条件):
      执行人为C&B层
      执行人为CEO和CHO

            grant.yang 杨光磊
            zhiling.lv 吕致伶
            表决:
            0 为这个问题表决

              创建日期:
              已更新:
              已解决: