constant.py 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. # -*- coding: utf-8 -*-
  2. # 说明:Selection,如果被引用,则为字符串字段。因此,不能设置默认值,否则新建报错
  3. # odoo14中selection的tuple[0]位置要求是str格式,否则 AssertionError: Field jc_bill_base.bill_state with non-str value in selection
  4. PRODUCT_NAME = 'Z2'
  5. bill_state = [('1', u'未审核'), ('10', u'已审核'), ('20', u'已完毕'), ('-1', u'已作废')]
  6. create_type = [('1', u'不生成'), ('10', u'未审核'), ('20', u'已审核')]
  7. create_type2 = [('1', u'不生成'), ('10', u'未确认'), ('20', u'已确认')]
  8. available = [('1', u'不启用'), ('10', u'启用')]
  9. # 销售流程状态:
  10. SALE_STATE_NOTIFIED_MINUS_1 = '-1'
  11. SALE_STATE_NOT_CHECKED_1 = '1'
  12. SALE_STATE_APPROVING_4 = '4'
  13. SALE_STATE_REFUSED_7 = '7'
  14. SALE_STATE_CHECKED_10 = '10'
  15. SALE_STATE_DO_TRAFFIC_14 = '14'
  16. SALE_STATE_LOADED_20 = '20'
  17. SALE_STATE_SECOND_WEIGHT_30 = '30'
  18. SALE_STATE_WAITING_PAY_40 = '40'
  19. SALE_STATE_INVOICED_50 = '50'
  20. SALE_STATE_TURN_OUT_STOCK_60 = '60'
  21. SALE_STATE_DO_FINISHED_70 = '70'
  22. SALE_STATE_REMIND_80 = '80'
  23. process_state = [(SALE_STATE_NOTIFIED_MINUS_1, u'已作废'), (SALE_STATE_NOT_CHECKED_1, u'未审核'),
  24. (SALE_STATE_APPROVING_4, u'审批中'), (SALE_STATE_REFUSED_7, u'已驳回'), (SALE_STATE_CHECKED_10, u'已审核'),
  25. (SALE_STATE_DO_TRAFFIC_14, u'已过磅'), (SALE_STATE_LOADED_20, u'已装货'),
  26. (SALE_STATE_SECOND_WEIGHT_30, u'已复磅'),
  27. (SALE_STATE_WAITING_PAY_40, u'待付款'), (SALE_STATE_INVOICED_50, u'已开票'),
  28. (SALE_STATE_TURN_OUT_STOCK_60, u'转出库'), (SALE_STATE_DO_FINISHED_70, u'已完毕'),
  29. (SALE_STATE_REMIND_80, u'提醒')]
  30. process_state_dic = {
  31. SALE_STATE_NOTIFIED_MINUS_1: u'已作废',
  32. SALE_STATE_NOT_CHECKED_1: u'未审核',
  33. SALE_STATE_APPROVING_4: u'审批中',
  34. SALE_STATE_REFUSED_7: u'已驳回',
  35. SALE_STATE_CHECKED_10: u'已审核',
  36. SALE_STATE_DO_TRAFFIC_14: U'已过磅',
  37. SALE_STATE_LOADED_20: u'已装货',
  38. SALE_STATE_SECOND_WEIGHT_30: u'已复磅',
  39. SALE_STATE_WAITING_PAY_40: u'待付款',
  40. SALE_STATE_INVOICED_50: u'已开票',
  41. SALE_STATE_TURN_OUT_STOCK_60: u'转出库',
  42. SALE_STATE_DO_FINISHED_70: u'已完毕',
  43. SALE_STATE_REMIND_80: u'提醒',
  44. }
  45. # 活禽采购流程状态:
  46. process_state_poultry_purchase = [('1', u'未确认'), ('10', u'已确认')]
  47. # 价格单类型
  48. CLASS_PRICE_1 = '1' # 分类价
  49. PROMOTION_PRICE_2 = '2' # 促销单价
  50. PRICE_BILL_TYPE = [
  51. # 销售
  52. (CLASS_PRICE_1, u'分类价'),
  53. (PROMOTION_PRICE_2, u'促销单价'),
  54. ]
  55. # 生产状态:
  56. produce_state1 = [('1', u'未审核'), ('10', u'已审核'), ('20', u'生产中'), ('30', u'已完工')]
  57. produce_state2 = [('1', u'未审核'), ('10', u'已审核'), ('20', u'已接收'), ('30', u'已完工')]
  58. # 上班标志
  59. working_flag = [('1', u'上班'), ('10', u'休班')]
  60. # 打卡标志 # 说明:'20'-->'193'; '30'-->'199'
  61. punch_mark = [('0', u'未打卡'), ('1', u'上班'), ('10', u'迟一'), ('102', u'迟二'), ('103', u'迟三'), ('104', u'迟四'),
  62. ('105', u'迟五'),
  63. ('130', u'中午早三'), ('131', u'中午早二'), ('132', u'中午早一'), ('139', u'中午下班'),
  64. ('170', u'中午上班'), ('177', u'中午迟一'), ('178', u'中午迟二'), ('179', u'中午迟三'),
  65. ('191', u'早三'), ('192', u'早二'), ('193', u'早一'), ('199', u'下班')]
  66. punch_mark_dic = {'0': u'未打卡', '1': u'上班', '10': u'迟一', '102': u'迟二', '103': u'迟三', '104': u'迟四', '105': u'迟五',
  67. '130': u'中午早三', '131': u'中午早二', '132': u'中午早一', '139': u'中午下班',
  68. '170': u'中午上班', '177': u'中午迟一', '178': u'中午迟二', '179': u'中午迟三',
  69. '191': u'早三', '192': u'早二', '193': u'早一', '199': u'下班'}
  70. # 产品分类
  71. goods_type_select = [('-1', u'产品分类'), ('1', u'产品分类1'), ('2', u'产品分类2'), ('3', u'产品分类3'), ('4', u'产品分类4'),
  72. ('5', u'产品分类5'), ('6', u'产品分类6')]
  73. goods_type_select_2 = [('goods_type_id', u'产品分类'), ('goods_type1_id', u'产品分类1'), ('goods_type2_id', u'产品分类2'),
  74. ('goods_type3_id', u'产品分类3'), ('goods_type4_id', u'产品分类4'), ('goods_type5_id', u'产品分类5'),
  75. ('goods_type6_id', u'产品分类6')]
  76. # 核销状态
  77. verify_state = [('1', u'未核销完成'), ('10', u'核销完成')]
  78. # 是否导出
  79. whether_export = [('true', u'是'), ('false', u'否')]
  80. # 考勤机
  81. attendance_state = [('1', u'打卡'), ('20', u'未打卡')]
  82. # 审批状态
  83. approve_state = [('1', u'未提交'), ('10', u'审批中'), ('20', u'审批完成')]
  84. # 审批操作
  85. approve_operate = [('1', u'提交'), ('5', u'撤回提交'), ('10', u'审批'), ('20', u'驳回'), ('30', u'撤回')]
  86. approve_1_COMMIT = '1' # u'提交'
  87. approve_5_BACK = '5' # u'撤回提交'
  88. approve_10_AGREE = '10' # u'审批'
  89. approve_20_REFUSE = '20' # u'驳回'
  90. approve_30_UN_AGREE = '30' # u'撤回'
  91. approve_operate_dic = {
  92. approve_1_COMMIT: u'提交',
  93. approve_5_BACK: u'撤回提交',
  94. approve_10_AGREE: u'审批',
  95. approve_20_REFUSE: u'驳回',
  96. approve_30_UN_AGREE: u'撤回'
  97. }
  98. # 员工/组
  99. staff_or_group = [('1', u'员工'), ('10', u'组')]
  100. # 默认每页打印行数
  101. DEFAULT_PRINT_LINE_COUNT_PER_PAGE = '6'
  102. # 单价/金额
  103. COMPUTE_PRICE = '1'
  104. COMPUTE_MONEY = '10'
  105. price_or_money = [(COMPUTE_PRICE, u'计算单价'), (COMPUTE_MONEY, u'计算金额')]
  106. # 成本方式
  107. COST_TYPE_INDEX_AVERAGE = '1'
  108. COST_TYPE_INDEX_FIFO = '10'
  109. cost_type = [(COST_TYPE_INDEX_AVERAGE, u'加权平均'), (COST_TYPE_INDEX_FIFO, u'先进先出')]
  110. # 审批
  111. APPROVE = '10'
  112. REFUSE = '12'
  113. APPROVE_SUCCESS = '14'
  114. ABNORMAL = '20'
  115. MESSAGE_TYPE = [
  116. (APPROVE, u'审批提醒'),
  117. (REFUSE, u'驳回提醒'),
  118. (APPROVE_SUCCESS, u'审批完成提醒'),
  119. (ABNORMAL, u'异常报警'),
  120. ]
  121. APPROVE_MODEL = ['jc_supply_chain.sale_order']
  122. ANALYSE = '1'
  123. ER_WEI = '10'
  124. CHART = '20'
  125. REPORT_TYPE = [(ANALYSE, u'分析表'), (ER_WEI, u'二维表'), (CHART, u'图表')]
  126. SINGLE_HEAD = '1'
  127. DOUBLE_HEAD = '10'
  128. TABLE_HEAD_TYPE = [
  129. (DOUBLE_HEAD, '双表头'),
  130. (SINGLE_HEAD, '单表头')
  131. ]
  132. LINE = '1'
  133. BAR = '10'
  134. CHART_TYPE = [(LINE, u'曲线图'), (BAR, u'柱状图')]