From 266c448c0032b17b575c1db8b99dbac72a14a688 Mon Sep 17 00:00:00 2001 From: liaodanlong Date: Wed, 26 Feb 2025 13:21:27 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=AD=97=E6=AE=B5=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/purchase_order.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sf_manufacturing/models/purchase_order.py b/sf_manufacturing/models/purchase_order.py index a16eb120..398db85b 100644 --- a/sf_manufacturing/models/purchase_order.py +++ b/sf_manufacturing/models/purchase_order.py @@ -110,7 +110,7 @@ class PurchaseOrderLine(models.Model): _inherit = 'purchase.order.line' part_number = fields.Char('零件图号', store=True, compute='_compute_related_product') - part_name = fields.Char('零件图号', store=True, + part_name = fields.Char('零件名称', store=True, compute='_compute_related_product') related_product = fields.Many2one('product.product', string='关联产品', help='经此产品工艺加工成的成品') From cd115ea41138725f8067d6c43721dd965d541dc4 Mon Sep 17 00:00:00 2001 From: liaodanlong Date: Wed, 26 Feb 2025 14:15:46 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=BF=87=E6=BB=A4=E6=8E=89=E6=A3=80?= =?UTF-8?q?=E6=B5=8B=E7=BB=93=E6=9E=9C=E4=B8=BA=E5=90=88=E6=A0=BC=E7=9A=84?= =?UTF-8?q?=E6=95=B0=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 From 0cb73b6d29009b4d87b2adb704a935d7c9652013 Mon Sep 17 00:00:00 2001 From: liaodanlong Date: Wed, 26 Feb 2025 14:36:50 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=88=87=E5=89=B2=E5=B7=A5=E5=8D=95?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E6=8E=89=E5=9B=9E=E9=80=80=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/mrp_workorder.py | 6 +++--- sf_mrs_connect/models/sync_common.py | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/sf_manufacturing/models/mrp_workorder.py b/sf_manufacturing/models/mrp_workorder.py index 099c28df..867cd50d 100644 --- a/sf_manufacturing/models/mrp_workorder.py +++ b/sf_manufacturing/models/mrp_workorder.py @@ -90,7 +90,7 @@ class ResMrpWorkOrder(models.Model): ('state', '!=', 'cancel') ]) finish_move = next((move for move in moves if move.location_dest_id.name == '制造后'), None) - if not finish_move and not cur_workorder.is_subcontract and not cur_workorder.name == '解除装夹': + if not finish_move and not cur_workorder.is_subcontract and not cur_workorder.routing_type == '解除装夹': record.back_button_display = True else: record.back_button_display = any( @@ -104,7 +104,7 @@ class ResMrpWorkOrder(models.Model): else: record.back_button_display = False # tag_type - if cur_workorder.is_subcontract or cur_workorder.name == '解除装夹' or any( + if cur_workorder.is_subcontract or cur_workorder.routing_type == '解除装夹' or cur_workorder.routing_type == '切割' or any( detection_result.processing_panel == cur_workorder.processing_panel and detection_result.routing_type == cur_workorder.routing_type and cur_workorder.tag_type !='重新加工' and @@ -120,7 +120,7 @@ class ResMrpWorkOrder(models.Model): record.back_button_display = True else: record.back_button_display = False - if cur_workorder.is_subcontract or cur_workorder.name == '解除装夹' or any( + if cur_workorder.is_subcontract or cur_workorder.routing_type == '解除装夹' or cur_workorder.routing_type == '切割' or any( detection_result.processing_panel == cur_workorder.processing_panel and detection_result.routing_type == cur_workorder.routing_type and cur_workorder.tag_type !='重新加工' and diff --git a/sf_mrs_connect/models/sync_common.py b/sf_mrs_connect/models/sync_common.py index d7444afb..b4a05353 100644 --- a/sf_mrs_connect/models/sync_common.py +++ b/sf_mrs_connect/models/sync_common.py @@ -2305,8 +2305,6 @@ class Cutting_tool_standard_library(models.Model): result = json.loads(r['result']) if result['status'] == 1: for item in result['cutting_tool_standard_library_all_list']: - if item['code'] == 'JKM-T-DJWL-ZTDJ-20250225001': - print('qwfhuiuiohfqwuio') cutting_tool_standard_library = self.search( [("code", '=', item['code']), ("active", 'in', [True, False])])