From 4fcbf57e9726402795a2913f4c18c137772f323b Mon Sep 17 00:00:00 2001 From: "jinling.yang" Date: Fri, 23 Feb 2024 17:24:58 +0800 Subject: [PATCH] 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']