调整打印机模型结构
This commit is contained in:
@@ -322,8 +322,8 @@ class ProductionLot(models.Model):
|
||||
printer_config = self.env['printer.configuration'].search([('model', '=', self._name)], limit=1)
|
||||
if not printer_config:
|
||||
raise UserError('请先配置打印机')
|
||||
host = printer_config.ip_address
|
||||
port = printer_config.port
|
||||
host = printer_config.printer_id.ip_address
|
||||
port = printer_config.printer_id.port
|
||||
self.print_qr_code(lot_name, host, port)
|
||||
|
||||
# self.ensure_one() # 确保这个方法只为一个记录调用
|
||||
|
||||
Reference in New Issue
Block a user