Accept Merge Request #1864: (feature/制造功能优化 -> develop)
Merge Request: 去除对切割工单的编程控制 Created By: @马广威 Accepted By: @马广威 URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/1864?initial=true
This commit is contained in:
@@ -1217,10 +1217,9 @@ class ResMrpWorkOrder(models.Model):
|
||||
# ================= 如果制造订单制造类型为【人工线下加工】==========================
|
||||
if (workorder.production_id.production_type == '人工线下加工'
|
||||
and workorder.production_id.schedule_state == '已排'
|
||||
and workorder.routing_type == '人工线下加工'
|
||||
and len(workorder.production_id.picking_ids.filtered(
|
||||
lambda w: w.state not in ['done', 'cancel'])) == 0
|
||||
and workorder.production_id.programming_state == '已编程'):
|
||||
lambda w: w.state not in ['done', 'cancel'])) == 0):
|
||||
# and workorder.production_id.programming_state == '已编程'
|
||||
if workorder.is_subcontract is True:
|
||||
purchase_orders_id = self._get_surface_technics_purchase_ids()
|
||||
if purchase_orders_id.state == 'purchase':
|
||||
@@ -1236,6 +1235,9 @@ class ResMrpWorkOrder(models.Model):
|
||||
else:
|
||||
workorder.state = 'waiting'
|
||||
continue
|
||||
elif workorder.routing_type == '人工线下加工':
|
||||
if workorder.production_id.programming_state == '已编程':
|
||||
workorder.state = 'ready'
|
||||
else:
|
||||
workorder.state = 'ready'
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user