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

PRO来伊份-自定字‘段来伊份员工类型’需要根据2个字段自动生成

XMLWord打印

    • Icon: Change Change
    • 解决结果: 完成
    • Icon: Medium Medium
    • 202101
    • L-来伊份-Y2020036
    • 基础通用功能
    • 隐藏

      该字段需要在新建时,修改时都需要根据逻辑自动变化
      若不满足以上条件则为空白

      for record in self:
      if record.employee_type.code == 'ET012':
      record['x_emptype_empgroup1'] = 227
      elif record.employee_type.code == 'ET010':
      record['x_emptype_empgroup1'] = 228
      elif record.employee_type.code == 'ET011':
      record['x_emptype_empgroup1'] = 244
      elif record.employee_group.code in ['E1','F1']:
      record['x_emptype_empgroup1'] = 226
      elif record.employee_group.code == 'C5' and record.employee_group.code not in ['ET012','ET010','ET011']:
      record['x_emptype_empgroup1'] = 225
      elif record.employee_group.code != 'C5' and record.employee_group.code not in ['ET012','ET010','ET011']:
      record['x_emptype_empgroup1'] = 224
      else:
      record['x_emptype_empgroup1'] = False

      显示
      该字段需要在新建时,修改时都需要根据逻辑自动变化 若不满足以上条件则为空白 for record in self: if record.employee_type.code == 'ET012': record ['x_emptype_empgroup1'] = 227 elif record.employee_type.code == 'ET010': record ['x_emptype_empgroup1'] = 228 elif record.employee_type.code == 'ET011': record ['x_emptype_empgroup1'] = 244 elif record.employee_group.code in ['E1','F1'] : record ['x_emptype_empgroup1'] = 226 elif record.employee_group.code == 'C5' and record.employee_group.code not in ['ET012','ET010','ET011'] : record ['x_emptype_empgroup1'] = 225 elif record.employee_group.code != 'C5' and record.employee_group.code not in ['ET012','ET010','ET011'] : record ['x_emptype_empgroup1'] = 224 else: record ['x_emptype_empgroup1'] = False

      实施在emp.job模型中增加自定义字段x_emptype_empgroup1(来伊份员工类型),该字段为select类型,需要根据员工类型employee_type,员工分组employee_group的修改自动变更,逻辑如下:
      1,当员工类型为临时工编码为(ET012),那么来伊份员工类型则为临时工编码为(S000110)
      2,当员工类型为加盟工编码为(ET010),那么来伊份员工类型则为加盟工编码为(S000111)
      3,当员工类型为挂靠员工编码为(ET011),那么来伊份员工类型则为挂靠员工编码为(S000137)
      4,当员工分组的编码为E1,F1,那么来伊份员工类型则为操作工编码为(S000109)
      5,当员工分组的编码为C5,并且员工类型非临时(ET012),非加盟(ET010),非挂靠(ET011)那么来伊份员工类型则为营业员元编码为(S000108)
      6,当员工分组的编码为非C5,并且员工类型非临时(ET012),非加盟(ET010),非挂靠(ET011)那么来伊份员工类型则为内勤员工编码为(S000107)

        1. image.png
          240 kB
          刘文强
        2. WX20210125-154743.png
          129 kB
          郭义

            wenqiang.liu 刘文强
            guoy 郭义
            表决:
            0 为这个问题表决

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