去掉货架货位打印不必要的逻辑

This commit is contained in:
mgw
2024-06-13 15:29:15 +08:00
parent 741c5cf3d6
commit 38e99a0f26

View File

@@ -416,19 +416,19 @@ class ShelfLocation(models.Model):
host = printer_config.printer_id.ip_address host = printer_config.printer_id.ip_address
port = printer_config.printer_id.port port = printer_config.printer_id.port
self.print_qr_code(barcode, host, port) self.print_qr_code(barcode, host, port)
# 获取当前wizard的视图ID或其他标识信息 # # 获取当前wizard的视图ID或其他标识信息
view_id = self.env.context.get('view_id') # view_id = self.env.context.get('view_id')
# 构造返回wizard页面的action字典 # # 构造返回wizard页面的action字典
action = { # action = {
'type': 'ir.actions.act_window', # 'type': 'ir.actions.act_window',
'name': '返回 Wizard', # 'name': '返回 Wizard',
'res_model': 'sf.shelf', # 替换为你的wizard模型名称 # 'res_model': 'sf.shelf', # 替换为你的wizard模型名称
'view_mode': 'form', # 'view_mode': 'form',
'view_id': view_id, # 如果需要基于特定的视图返回 # 'view_id': view_id, # 如果需要基于特定的视图返回
'target': 'new', # 如果需要在新的窗口或标签页打开 # 'target': 'new', # 如果需要在新的窗口或标签页打开
'res_id': self.shelf_id, # 如果你想要返回当前记录的视图 # 'res_id': self.shelf_id, # 如果你想要返回当前记录的视图
} # }
return action # return action
# # 仓库类别selection库区、库位、货位 # # 仓库类别selection库区、库位、货位
# location_type = fields.Selection([ # location_type = fields.Selection([