制造订单状态优化

This commit is contained in:
yuxianghui
2024-11-28 15:51:54 +08:00
parent d741d6ccf5
commit 2c37dbf5c4

View File

@@ -331,6 +331,9 @@ class MrpProduction(models.Model):
production.state = 'pending_cam'
if production.is_rework is True:
production.state = 'rework'
if (production.state == 'rework' and production.tool_state == '0'
and production.schedule_state == '已排' and production.is_rework is False):
production.state = 'pending_cam'
# if production.state == 'pending_cam':
# if all(wo_state in 'done' for wo_state in production.workorder_ids.mapped('state')):
# production.state = 'done'
@@ -353,6 +356,7 @@ class MrpProduction(models.Model):
if production.tool_state == '2':
production.state = 'rework'
# 退回调整
def technology_back_adjust(self):
process_parameters = []