代码优化

This commit is contained in:
mgw
2024-02-27 17:33:08 +08:00
parent 70038e05c8
commit 586216fa01
2 changed files with 2 additions and 3 deletions

View File

@@ -693,7 +693,7 @@ class CNCprocessing(models.Model):
workorder = self.env['mrp.workorder'].search([('production_id.name', '=', ret['production_order_no']),
('processing_panel', '=', obj['processing_panel']),
('routing_type', '=', 'CNC加工')])
logging.info('workorder:%s' % workorder.name)
logging.info('workorder:%s' % workorder.id)
logging.info('obj:%s' % obj)
if obj['program_name'] in program_path:
logging.info('obj:%s' % obj['program_name'])
@@ -711,7 +711,7 @@ class CNCprocessing(models.Model):
'cutting_tool_handle_type': obj['cutting_tool_handle_type'],
'estimated_processing_time': obj['estimated_processing_time'],
'remark': obj['remark'],
'program_path': program_path
'program_path': program_path.replace('/tmp', '')
})
cnc_processing.get_cnc_processing_file(program_path_tmp, cnc_processing, program_path)
# cnc_workorder.state = 'done'