处理"打印的二维码信息与界面的二维码信息不一致"
This commit is contained in:
@@ -622,6 +622,11 @@ class SfStockMoveLine(models.Model):
|
||||
if not qr_code_data:
|
||||
raise UserError("没有找到二维码数据。")
|
||||
lot_name = self.lot_name
|
||||
|
||||
# 增加"当为坯料时,只打印序列号的前面部分"
|
||||
if self.lot_name: # 确保 lot_name 存在
|
||||
if self.product_id.categ_id.name == '坯料':
|
||||
lot_name = lot_name.split('[', 1)[0]
|
||||
# host = "192.168.50.110" # 可以根据实际情况修改
|
||||
# port = 9100 # 可以根据实际情况修改
|
||||
|
||||
@@ -1184,6 +1189,12 @@ class CustomStockMove(models.Model):
|
||||
# todo 待控制
|
||||
if not lot_name:
|
||||
raise ValidationError("请先分配序列号")
|
||||
|
||||
# 增加"当为坯料时,只打印序列号的前面部分"
|
||||
if record.lot_name: # 确保 lot_name 存在
|
||||
if record.product_id.categ_id.name == '坯料':
|
||||
lot_name = lot_name.split('[', 1)[0]
|
||||
|
||||
# host = "192.168.50.110" # 可以根据实际情况修改
|
||||
# port = 9100 # 可以根据实际情况修改
|
||||
|
||||
|
||||
Reference in New Issue
Block a user