更新库位信息接口,优化获取到数据后的数据处理逻辑。
This commit is contained in:
@@ -150,6 +150,17 @@ class FunctionalCuttingToolEntity(models.Model):
|
|||||||
else:
|
else:
|
||||||
# 原刀从线边出库
|
# 原刀从线边出库
|
||||||
item.tool_in_out_stock_location_1(location_id, tool_room_id)
|
item.tool_in_out_stock_location_1(location_id, tool_room_id)
|
||||||
|
# 系统中该刀在线边刀架其他位置,需先清除这个位置的刀具信息
|
||||||
|
shelf_location_id = self.env['sf.shelf.location'].sudo().search([
|
||||||
|
('product_sn_id', '=', item.barcode_id.id)])
|
||||||
|
if shelf_location_id:
|
||||||
|
shelf_location_id.write(
|
||||||
|
{'product_id': None,
|
||||||
|
'product_sn_id': None,
|
||||||
|
'tool_rfid': None,
|
||||||
|
"tool_name_id": None,
|
||||||
|
'product_num': 0,
|
||||||
|
'location_status': '空闲'})
|
||||||
# 新刀入库到线边
|
# 新刀入库到线边
|
||||||
item.create_stock_move(pre_manufacturing_id, location_id)
|
item.create_stock_move(pre_manufacturing_id, location_id)
|
||||||
item.current_shelf_location_id = location_id.id
|
item.current_shelf_location_id = location_id.id
|
||||||
|
|||||||
Reference in New Issue
Block a user