1、优化货位变更接口、优化同步库存信息接口;2、隐藏已取消状态的销售订单的【确认接单】和【取消】按钮;3、处理功能刀具从线边刀库到刀具房没有生成移动历史问题;
This commit is contained in:
@@ -118,27 +118,28 @@ class FunctionalCuttingToolEntity(models.Model):
|
||||
def tool_in_out_stock_location(self, location_id):
|
||||
tool_room_id = self.env['stock.location'].search([('name', '=', '刀具房')])
|
||||
pre_manufacturing_id = self.env['stock.location'].search([('name', '=', '制造前')])
|
||||
for item in self:
|
||||
# 中控反馈该位置有刀
|
||||
if item:
|
||||
# 系统该位置有刀
|
||||
if location_id.product_sn_id:
|
||||
# 中控反馈和系统中,该位置是同一把刀
|
||||
if item.barcode_id == location_id.product_sn_id:
|
||||
return True
|
||||
# 中控反馈和系统中,该位置不是同一把刀
|
||||
else:
|
||||
# 原刀从线边出库
|
||||
item.tool_in_out_stock_location_1(location_id, tool_room_id)
|
||||
# 新刀入库到线边
|
||||
item.create_stock_move(pre_manufacturing_id, location_id)
|
||||
item.current_shelf_location_id = location_id.id
|
||||
if self:
|
||||
for item in self:
|
||||
# 中控反馈该位置有刀
|
||||
if item:
|
||||
# 系统该位置有刀
|
||||
if location_id.product_sn_id:
|
||||
# 中控反馈和系统中,该位置是同一把刀
|
||||
if item.barcode_id == location_id.product_sn_id:
|
||||
return True
|
||||
# 中控反馈和系统中,该位置不是同一把刀
|
||||
else:
|
||||
# 原刀从线边出库
|
||||
item.tool_in_out_stock_location_1(location_id, tool_room_id)
|
||||
# 新刀入库到线边
|
||||
item.create_stock_move(pre_manufacturing_id, location_id)
|
||||
item.current_shelf_location_id = location_id.id
|
||||
|
||||
# 中控反馈该位置没有刀
|
||||
else:
|
||||
# 系统该位置有刀
|
||||
if location_id.product_sn_id:
|
||||
item.tool_in_out_stock_location_1(location_id, tool_room_id)
|
||||
# 中控反馈该位置没有刀
|
||||
else:
|
||||
# 系统该位置有刀
|
||||
if location_id.product_sn_id:
|
||||
self.tool_in_out_stock_location_1(location_id, tool_room_id)
|
||||
|
||||
def tool_in_out_stock_location_1(self, location_id, tool_room_id):
|
||||
tool = self.env['sf.functional.cutting.tool.entity'].search(
|
||||
|
||||
@@ -53,7 +53,7 @@ class SfMaintenanceEquipment(models.Model):
|
||||
params = {"DeviceId": self.name}
|
||||
r = requests.get(crea_url, params=params, headers=headers)
|
||||
ret = r.json()
|
||||
logging.info('register_equipment_tool:%s' % ret)
|
||||
logging.info('机床刀库register_equipment_tool():%s' % ret)
|
||||
datas = ret['Datas']
|
||||
self.write_maintenance_equipment_tool(datas)
|
||||
if ret['Succeed']:
|
||||
|
||||
Reference in New Issue
Block a user