1、处理二维码问题

This commit is contained in:
yuxianghui
2024-06-12 10:02:15 +08:00
parent 7d7f0348d2
commit 469839f38e
2 changed files with 23 additions and 2 deletions

View File

@@ -968,8 +968,9 @@ class SfStockPicking(models.Model):
if move and move.product_id.cutting_tool_material_id.name == '刀柄' or '托盘' in (
move.product_id.fixture_material_id.name or ''):
for item in move.move_line_nosuggest_ids:
if self.env['stock.lot'].search([('rfid', '=', item.rfid)]):
raise ValidationError('该Rfid%s】在系统中已经存在,请重新录入!' % item.rfid)
if item.rfid:
if self.env['stock.lot'].search([('rfid', '=', item.rfid)]):
raise ValidationError('该Rfid【%s】在系统中已经存在,请重新录入!' % item.rfid)
if item.location_dest_id.name == '进货':
if not item.rfid:
raise ValidationError('你需要提供%s的Rfid' % move.product_id.name)