From cd115ea41138725f8067d6c43721dd965d541dc4 Mon Sep 17 00:00:00 2001 From: liaodanlong Date: Wed, 26 Feb 2025 14:15:46 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=87=E6=BB=A4=E6=8E=89=E6=A3=80=E6=B5=8B?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E4=B8=BA=E5=90=88=E6=A0=BC=E7=9A=84=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/mrp_workorder.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sf_manufacturing/models/mrp_workorder.py b/sf_manufacturing/models/mrp_workorder.py index f65897d7..099c28df 100644 --- a/sf_manufacturing/models/mrp_workorder.py +++ b/sf_manufacturing/models/mrp_workorder.py @@ -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