1、销售订单状态添加【加工中】、【物流中】、【已交付】三种状态;2、优化 获取mrs下发的编程单 接口,添加对返工重新编程的处理
This commit is contained in:
@@ -26,7 +26,7 @@ class Sf_Mrs_Connect(http.Controller, MultiInheritController):
|
||||
ret = json.loads(ret['result'])
|
||||
logging.info('下发编程单:%s' % ret)
|
||||
domain = [('programming_no', '=', ret['programming_no'])]
|
||||
if ret['manufacturing_type'] in ('scrap', 'invalid_tool_rework'):
|
||||
if ret['manufacturing_type'] in ('scrap', 'invalid_tool_rework', 'rework'):
|
||||
domain += [('state', 'not in', ['done', 'scrap', 'cancel'])]
|
||||
else:
|
||||
domain += [('state', 'in', ['confirmed', 'pending_cam'])]
|
||||
@@ -56,7 +56,7 @@ class Sf_Mrs_Connect(http.Controller, MultiInheritController):
|
||||
res['message'] = '编程单号为%s的CNC程序文件从FTP拉取失败' % (ret['programming_no'])
|
||||
return json.JSONEncoder().encode(res)
|
||||
for production in productions:
|
||||
production.write({'programming_state': '已编程', 'work_state': '已编程'})
|
||||
production.write({'programming_state': '已编程', 'work_state': '已编程', 'is_rework': False})
|
||||
for panel in ret['processing_panel'].split(','):
|
||||
# 查询状态为进行中且工序类型为CNC加工的工单
|
||||
cnc_workorder_has = production.workorder_ids.filtered(
|
||||
|
||||
Reference in New Issue
Block a user