创建胚料的bug修复
This commit is contained in:
@@ -32,16 +32,15 @@ class Sf_Mrs_Connect(http.Controller):
|
||||
logging.info('model_code:%s' % model_code)
|
||||
server_dir = cnc.with_user(request.env.ref("base.user_admin")).download_file_tmp(model_code,
|
||||
processing_panel)
|
||||
cnc_file_path = os.path.join(server_dir, cnc.program_name + '.NC')
|
||||
cnc_file_path = os.path.join('/', server_dir, cnc.program_name + '.nc')
|
||||
logging.info('cnc_file_path:%s' % cnc_file_path)
|
||||
cnc.with_user(request.env.ref("base.user_admin")).write_file(cnc_file_path, cnc)
|
||||
# logging.info('get_cnc_processing_create:%s' % '111111111111111')
|
||||
logging.info('get_cnc_processing_create:%s' % '111111111111111')
|
||||
# for root, dirs, files in os.walk(server_dir):
|
||||
# for file in files:
|
||||
# if os.path.splitext(file)[1] == '.xlsx' or os.path.splitext(file)[1] == ".xls":
|
||||
# for f in files:
|
||||
# if os.path.splitext(f)[1] == ".pdf":
|
||||
# pdf_path = os.path.splitext(file)[1] + '.PDF'
|
||||
# cnc_pdf_path = request.env['sf.cnc.processing'].with_user(
|
||||
# request.env.ref("base.user_admin")).to_pdf(os.path.join(root, file), pdf_path)
|
||||
#
|
||||
# if pdf_path != False:
|
||||
# if not cnc.workorder_id.cnc_worksheet:
|
||||
# cnc.workorder_id.cnc_worksheet = base64.b64encode(open(cnc_pdf_path, 'rb').read())
|
||||
|
||||
Reference in New Issue
Block a user