代码优化
This commit is contained in:
@@ -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'
|
||||
|
||||
@@ -29,7 +29,6 @@ class FtpController():
|
||||
logging.info("进入FTP目录 ")
|
||||
self.ftp.cwd(target_dir) # 切换工作路径
|
||||
logging.info('FTP目录:%s' % target_dir)
|
||||
self.ftp.mkd('detection')
|
||||
remotenames = self.ftp.nlst()
|
||||
logging.info('FTP目录文件:%s' % remotenames)
|
||||
for file in remotenames:
|
||||
|
||||
Reference in New Issue
Block a user