制造订单状态为返工时限制表面工艺工单状态

This commit is contained in:
liaodanlong
2025-02-28 16:36:16 +08:00
parent 72620236ab
commit 4c8cf5caf8

View File

@@ -1227,6 +1227,9 @@ class ResMrpWorkOrder(models.Model):
lambda w: w.state not in ['done', 'cancel'])) == 0):
# and workorder.production_id.programming_state == '已编程'
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()
if purchase_orders_id.state == 'purchase':
workorder.state = 'ready'