diff --git a/sf_manufacturing/models/mrp_workorder.py b/sf_manufacturing/models/mrp_workorder.py index d50b1df2..6858ccab 100644 --- a/sf_manufacturing/models/mrp_workorder.py +++ b/sf_manufacturing/models/mrp_workorder.py @@ -1095,8 +1095,7 @@ class ResMrpWorkOrder(models.Model): # ================= 如果制造订单刀具状态为[无效刀、缺刀] 或者 制造订单状态为[返工]========================== if (workorder.production_id.tool_state in ['1', '2'] or workorder.production_id.state == 'rework' or workorder.production_id.schedule_state != '已排' - or len( - workorder.production_id.picking_ids.filtered(lambda w: w.state not in ['done', 'cancel'])) != 0 + or workorder.production_id.reservation_state not in ['assigned'] or workorder.production_id.workorder_ids.filtered( lambda wk: wk.sequence == workorder.sequence - 1).test_results in ['报废', '返工']): if workorder.state != 'waiting':