From 6b2608e41952add688bbac34201e7358b68d3a2a Mon Sep 17 00:00:00 2001 From: "jinling.yang" Date: Fri, 23 Feb 2024 17:24:46 +0800 Subject: [PATCH 1/2] =?UTF-8?q?ftp=E6=B7=BB=E5=8A=A0=E6=96=B0=E7=9A=84?= =?UTF-8?q?=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_mrs_connect/models/ftp_operate.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sf_mrs_connect/models/ftp_operate.py b/sf_mrs_connect/models/ftp_operate.py index eaf214de..1d97e56f 100644 --- a/sf_mrs_connect/models/ftp_operate.py +++ b/sf_mrs_connect/models/ftp_operate.py @@ -48,10 +48,12 @@ class FtpController(): logging.info('serverdir:%s' % serverdir) logging.info('reportpath:%s' % reportpath) target_dir1 = target_dir.split('/') - logging.info('target_dir1:%s' % target_dir1[0]) - self.ftp.cwd(target_dir1) # 切换工作路径 - logging.info('FTP目录111111:%s' % target_dir) + logging.info('target_dir1:%s' % target_dir1[1]) + target_dir = os.path.join('/', target_dir1[1]) + logging.info('target_dir:%s' % target_dir) self.ftp.cwd(target_dir) # 切换工作路径 + logging.info('FTP目录111111:%s' % target_dir[2]) + self.ftp.cwd(target_dir[2]) # 切换工作路径 logging.info('FTP目录:%s' % target_dir) remotenames = self.ftp.nlst() logging.info('FTP目录检测报告文件:%s' % remotenames) From 4fcbf57e9726402795a2913f4c18c137772f323b Mon Sep 17 00:00:00 2001 From: "jinling.yang" Date: Fri, 23 Feb 2024 17:24:58 +0800 Subject: [PATCH 2/2] Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into develop --- sf_warehouse/models/model.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/sf_warehouse/models/model.py b/sf_warehouse/models/model.py index 74e1ad4e..4b53ea75 100644 --- a/sf_warehouse/models/model.py +++ b/sf_warehouse/models/model.py @@ -73,7 +73,6 @@ class SfLocation(models.Model): ], string='货位状态', default='空闲') # product_id = fields.Many2one('product.template', string='产品') product_id = fields.Many2one('product.product', string='产品', compute='_compute_product_id', readonly=True) - # product_id = fields.Many2one('product.product', string='产品', readonly=True) product_sn_id = fields.Many2one('stock.lot', string='产品序列号') # time_test = fields.Char(string='time') # 添加SQL约束 @@ -364,7 +363,7 @@ class ShelfLocation(models.Model): ('禁用', '禁用') ], string='货位状态', default='空闲', readonly=True) # product_id = fields.Many2one('product.template', string='产品') - product_id = fields.Many2one('product.product', string='产品', compute='_compute_product_id', readonly=True) + product_id = fields.Many2one('product.product', string='产品', readonly=True) product_sn_id = fields.Many2one('stock.lot', string='产品序列号') # 修改货位状态为禁用 @@ -386,13 +385,11 @@ class ShelfLocation(models.Model): record.sudo().location_status = '占用' else: - if record.production_id: - record.location_status = '占用' - else: - record.product_id = False - # record.location_status = '空闲' + record.product_id = False + # record.location_status = '空闲' - # 调取获取货位信息接口 + + #调取获取货位信息接口 def get_sf_shelf_location_info(self): # sf_sync_config = self.env['res.config.settings'].get_values() # token = sf_sync_config['token']