修改获取编程文件根目录

This commit is contained in:
胡尧
2025-03-31 09:28:30 +08:00
parent 21148ae74b
commit 1d857be16a
3 changed files with 12 additions and 12 deletions

View File

@@ -1410,10 +1410,10 @@ class MrpProduction(models.Model):
for file_name in files_r:
file_path = os.path.join(program_path_tmp_panel, file_name)
os.remove(file_path)
# download_state = self.env['sf.cnc.processing'].download_file_tmp(result['folder_name'],
# processing_panel)
# if download_state is False:
# raise UserError('编程单号为%s的CNC程序文件从FTP拉取失败' % (self.programming_no))
download_state = self.env['sf.cnc.processing'].download_file_tmp(result['folder_name'],
processing_panel)
if download_state is False:
raise UserError('编程单号为%s的CNC程序文件从FTP拉取失败' % (self.programming_no))
productions = self.env['mrp.production'].search(
[('programming_no', '=', self.programming_no), ('state', 'not in', ('cancel', 'done'))])
if productions: