1、隐藏返工状态工单的开始按钮;2、优化工单状态方法;3、优化制造订单状态
This commit is contained in:
@@ -1114,9 +1114,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 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 ['报废', '返工']):
|
||||
or workorder.production_id.reservation_state not in ['assigned']):
|
||||
if workorder.state != 'waiting':
|
||||
workorder.state = 'waiting'
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user