1、添加采购入库时对需要录入的Rfid进行重复校验;

This commit is contained in:
yuxianghui
2024-06-11 15:18:13 +08:00
parent 14d823ab6e
commit bae947bdca

View File

@@ -968,6 +968,8 @@ 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.location_dest_id.name == '进货':
if not item.rfid:
raise ValidationError('你需要提供%s的Rfid' % move.product_id.name)