diff --git a/sf_manufacturing/models/sale_order.py b/sf_manufacturing/models/sale_order.py
index a56721a2..5d318141 100644
--- a/sf_manufacturing/models/sale_order.py
+++ b/sf_manufacturing/models/sale_order.py
@@ -13,6 +13,9 @@ class SaleOrder(models.Model):
('sent', "报价已发送"),
('supply method', "供货方式待确认"),
('sale', "销售订单"),
+ ('processing', "加工中"),
+ ('physical_distribution', "物流中"),
+ ('delivered', "已交付"),
('done', "已锁定"),
('cancel', "已取消"),
])
diff --git a/sf_manufacturing/views/sale_order_views.xml b/sf_manufacturing/views/sale_order_views.xml
index 1e5c4587..49cc752f 100644
--- a/sf_manufacturing/views/sale_order_views.xml
+++ b/sf_manufacturing/views/sale_order_views.xml
@@ -13,7 +13,7 @@
- draft,sent,supply method,sale
+ supply method,sale,processing,physical_distribution,delivered
diff --git a/sf_mrs_connect/controllers/controllers.py b/sf_mrs_connect/controllers/controllers.py
index 87aee0dd..85b3d5fa 100644
--- a/sf_mrs_connect/controllers/controllers.py
+++ b/sf_mrs_connect/controllers/controllers.py
@@ -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(