制造订单状态为返工时限制表面工艺工单状态
This commit is contained in:
@@ -1227,6 +1227,9 @@ class ResMrpWorkOrder(models.Model):
|
|||||||
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:
|
||||||
|
if workorder.production_id.state == 'rework':
|
||||||
|
workorder.state = 'waiting'
|
||||||
|
continue
|
||||||
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':
|
||||||
workorder.state = 'ready'
|
workorder.state = 'ready'
|
||||||
|
|||||||
Reference in New Issue
Block a user