优化制造订单状态方法
This commit is contained in:
@@ -381,6 +381,10 @@ class MrpProduction(models.Model):
|
||||
# 如果制造订单的功能刀具为【无效刀】则制造订单状态改为返工
|
||||
if production.tool_state == '2':
|
||||
production.state = 'rework'
|
||||
if all(wo_state in ('done', 'rework', 'cancel') for wo_state in production.workorder_ids.mapped('state')):
|
||||
if production.state not in ['scrap', 'rework']:
|
||||
production.state = 'done'
|
||||
|
||||
|
||||
# 退回调整
|
||||
def technology_back_adjust(self):
|
||||
|
||||
Reference in New Issue
Block a user