制造订单状态优化

This commit is contained in:
yuxianghui
2025-01-17 11:06:17 +08:00
parent 57ab276c37
commit 41cdeb7fd9

View File

@@ -350,7 +350,7 @@ class MrpProduction(models.Model):
if any((wo.test_results == '返工' and wo.state == 'done' and
(production.programming_state in ['已编程'] or wo.individuation_page_PTD is True))
or (wo.is_rework is True and wo.state == 'done' and production.programming_state in ['编程中', '已编程'])
for wo in production.workorder_ids):
for wo in production.workorder_ids) or production.is_rework is True:
production.state = 'rework'
if any(wo.test_results == '报废' and wo.state == 'done' for wo in production.workorder_ids):
production.state = 'scrap'