From bae947bdca15cc86dfccf50dc20f0f90dfd74f7c Mon Sep 17 00:00:00 2001 From: yuxianghui <3437689193@qq.com> Date: Tue, 11 Jun 2024 15:18:13 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E6=B7=BB=E5=8A=A0=E9=87=87=E8=B4=AD?= =?UTF-8?q?=E5=85=A5=E5=BA=93=E6=97=B6=E5=AF=B9=E9=9C=80=E8=A6=81=E5=BD=95?= =?UTF-8?q?=E5=85=A5=E7=9A=84Rfid=E8=BF=9B=E8=A1=8C=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_warehouse/models/model.py | 2 ++ 1 file changed, 2 insertions(+) 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)