1、功能刀具拆解单优化;2、完成 需求坯料序列号生成规则优化2;
This commit is contained in:
@@ -1143,7 +1143,10 @@ class CustomStockMove(models.Model):
|
||||
move_lines = self.move_line_ids # 获取当前 stock.move 对应的所有 stock.move.line 记录
|
||||
for line in move_lines:
|
||||
if line.lot_name: # 确保 lot_name 存在
|
||||
qr_data = self.compute_lot_qr_code(line.lot_name)
|
||||
lot_name = line.lot_name
|
||||
if line.product_id.categ_id.name == '坯料':
|
||||
lot_name = lot_name.split('[', 1)[0]
|
||||
qr_data = self.compute_lot_qr_code(lot_name)
|
||||
# 假设 stock.move.line 模型中有一个字段叫做 lot_qr_code 用于存储二维码数据
|
||||
line.lot_qr_code = qr_data
|
||||
return result
|
||||
|
||||
Reference in New Issue
Block a user