1、优化工单状态

This commit is contained in:
yuxianghui
2024-07-26 14:51:23 +08:00
parent 98d2aa756a
commit b731ffba33
2 changed files with 11 additions and 0 deletions

View File

@@ -105,6 +105,12 @@ class CNCprocessing(models.Model):
'test_results': '返工',
'handle_result': '待处理'
})
if not production_id.is_rework:
production_id.write({
'is_rework': True
})
production_id.workorder_ids.filtered(
lambda a: a.processing_panel == key and not a.is_rework).write({'is_rework': True})
# 对缺刀信息进行处理
for key in data2:
if data2.get(key):