去除对切割工单的编程控制
This commit is contained in:
@@ -1217,10 +1217,9 @@ class ResMrpWorkOrder(models.Model):
|
|||||||
# ================= 如果制造订单制造类型为【人工线下加工】==========================
|
# ================= 如果制造订单制造类型为【人工线下加工】==========================
|
||||||
if (workorder.production_id.production_type == '人工线下加工'
|
if (workorder.production_id.production_type == '人工线下加工'
|
||||||
and workorder.production_id.schedule_state == '已排'
|
and workorder.production_id.schedule_state == '已排'
|
||||||
and workorder.routing_type == '人工线下加工'
|
|
||||||
and len(workorder.production_id.picking_ids.filtered(
|
and len(workorder.production_id.picking_ids.filtered(
|
||||||
lambda w: w.state not in ['done', 'cancel'])) == 0
|
lambda w: w.state not in ['done', 'cancel'])) == 0):
|
||||||
and workorder.production_id.programming_state == '已编程'):
|
# and workorder.production_id.programming_state == '已编程'
|
||||||
if workorder.is_subcontract is True:
|
if workorder.is_subcontract is True:
|
||||||
purchase_orders_id = self._get_surface_technics_purchase_ids()
|
purchase_orders_id = self._get_surface_technics_purchase_ids()
|
||||||
if purchase_orders_id.state == 'purchase':
|
if purchase_orders_id.state == 'purchase':
|
||||||
@@ -1236,6 +1235,9 @@ class ResMrpWorkOrder(models.Model):
|
|||||||
else:
|
else:
|
||||||
workorder.state = 'waiting'
|
workorder.state = 'waiting'
|
||||||
continue
|
continue
|
||||||
|
elif workorder.routing_type == '人工线下加工':
|
||||||
|
if workorder.production_id.programming_state == '已编程':
|
||||||
|
workorder.state = 'ready'
|
||||||
else:
|
else:
|
||||||
workorder.state = 'ready'
|
workorder.state = 'ready'
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user