From 523cc4ac5e75263045b5c32efbf0fcc754567a9e Mon Sep 17 00:00:00 2001 From: mgw <1392924357@qq.com> Date: Mon, 10 Feb 2025 11:29:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=BA=E5=B7=A5=E7=BA=BF?= =?UTF-8?q?=E4=B8=8B=E5=8A=A0=E5=B7=A5=E5=B7=A5=E5=8D=95=E7=9A=84=E6=9F=A5?= =?UTF-8?q?=E6=89=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/mrp_production.py | 2 +- sf_mrs_connect/controllers/controllers.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sf_manufacturing/models/mrp_production.py b/sf_manufacturing/models/mrp_production.py index 0cd04e27..8cf3b7df 100644 --- a/sf_manufacturing/models/mrp_production.py +++ b/sf_manufacturing/models/mrp_production.py @@ -1366,7 +1366,7 @@ class MrpProduction(models.Model): 'cnc_worksheet': base64.b64encode(open(panel_file_path, 'rb').read())}) logging.info('len(cnc_worksheet):%s' % len(panel_workorder.cnc_worksheet)) pre_workorder = production.workorder_ids.filtered(lambda - ap: ap.routing_type == '装夹预调' and ap.processing_panel == processing_panel and ap.state not in ( + ap: ap.routing_type in ['装夹预调', '人工线下加工'] and ap.processing_panel == processing_panel and ap.state not in ( 'rework', 'done')) if pre_workorder: pre_workorder.write( diff --git a/sf_mrs_connect/controllers/controllers.py b/sf_mrs_connect/controllers/controllers.py index 39bdcef8..a74758b4 100644 --- a/sf_mrs_connect/controllers/controllers.py +++ b/sf_mrs_connect/controllers/controllers.py @@ -91,7 +91,7 @@ class Sf_Mrs_Connect(http.Controller, MultiInheritController): logging.info('panel_file_path:%s' % panel_file_path) cnc_workorder.write({'cnc_worksheet': base64.b64encode(open(panel_file_path, 'rb').read())}) pre_workorder = productions.workorder_ids.filtered( - lambda ap: ap.routing_type == '装夹预调' and ap.state not in ['done', 'rework' + lambda ap: ap.routing_type in ['装夹预调', '人工线下加工'] and ap.state not in ['done', 'rework' 'cancel'] and ap.processing_panel == panel) if pre_workorder: pre_workorder.write(