过滤掉检测结果为合格的数据

This commit is contained in:
liaodanlong
2025-02-26 14:15:46 +08:00
parent 266c448c00
commit cd115ea411

View File

@@ -105,7 +105,10 @@ class ResMrpWorkOrder(models.Model):
record.back_button_display = False
# tag_type
if cur_workorder.is_subcontract or cur_workorder.name == '解除装夹' or any(
detection_result.processing_panel == cur_workorder.processing_panel and detection_result.routing_type == cur_workorder.routing_type and cur_workorder.tag_type !='重新加工'
detection_result.processing_panel == cur_workorder.processing_panel and
detection_result.routing_type == cur_workorder.routing_type and
cur_workorder.tag_type !='重新加工' and
detection_result.test_results != '合格'
for detection_result in cur_workorder.production_id.detection_result_ids
):
record.back_button_display = False
@@ -118,7 +121,10 @@ class ResMrpWorkOrder(models.Model):
else:
record.back_button_display = False
if cur_workorder.is_subcontract or cur_workorder.name == '解除装夹' or any(
detection_result.processing_panel == cur_workorder.processing_panel and detection_result.routing_type == cur_workorder.routing_type and cur_workorder.tag_type !='重新加工'
detection_result.processing_panel == cur_workorder.processing_panel and
detection_result.routing_type == cur_workorder.routing_type and
cur_workorder.tag_type !='重新加工' and
detection_result.test_results != '合格'
for detection_result in cur_workorder.production_id.detection_result_ids
):
record.back_button_display = False