1.修改工单的托盘序列号,托盘名称,托盘品牌,托盘类型,托盘型号字段类型,且页面对应字段改为只读

2.装夹预调工单新增扫条形码,扫码时对该工单进行自动开始并将条码里对应的托盘产品信息回填到托盘序列号,托盘名称,托盘品牌,托盘类型,托盘型号字段上,点击完成时对前置三元定位检测参数进行验证
3.研究打印序列号(多个)
This commit is contained in:
jinling.yang
2024-01-25 17:51:57 +08:00
parent 8e3a316200
commit 37161e2e20
3 changed files with 42 additions and 60 deletions

View File

@@ -375,8 +375,18 @@ class ReStockMove(models.Model):
def print_serial_numbers(self):
if not self.next_serial:
raise UserError(_("请先分配序列号再进行打印"))
label_data = []
for item in self.move_line_ids:
print(item.lot_name)
label_data.append({
'item_id': item.id,
})
if label_data:
report_template = self.env.ref('stock.label_package_template')
res = report_template.report_action(label_data)
res['id'] = report_template.id
return res
else:
raise UserError(_("没有可打印的标签数据"))
class ReStockQuant(models.Model):