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(