diff --git a/sf_warehouse/models/model.py b/sf_warehouse/models/model.py index 155d5924..286cdf88 100644 --- a/sf_warehouse/models/model.py +++ b/sf_warehouse/models/model.py @@ -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)