From 069d1f50b07d87bd32a0ea8087a5cf7645f77453 Mon Sep 17 00:00:00 2001 From: yuxianghui <3437689193@qq.com> Date: Tue, 27 Aug 2024 14:39:49 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=88=80=E5=85=B7=E7=BB=84?= =?UTF-8?q?=E8=A3=85=E6=97=B6=EF=BC=8C=E6=89=AB=E6=8F=8F=E5=88=9A=E5=88=9A?= =?UTF-8?q?=E6=8B=86=E8=A7=A3=E5=AE=8C=E7=9A=84=E5=88=80=E6=9F=84=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E6=B2=A1=E6=9C=89=E5=AE=9E=E6=97=B6=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E4=B8=BA=E5=8F=AF=E7=94=A8=E7=9A=84=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_tool_management/wizard/wizard.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sf_tool_management/wizard/wizard.py b/sf_tool_management/wizard/wizard.py index 52dc8529..aa5c645e 100644 --- a/sf_tool_management/wizard/wizard.py +++ b/sf_tool_management/wizard/wizard.py @@ -387,9 +387,9 @@ class FunctionalToolAssemblyOrder(models.TransientModel): lot_ids = self.env['stock.lot'].sudo().search([('rfid', '=', barcode)]) if lot_ids: for lot_id in lot_ids: - if lot_id.quant_ids[-1].location_id.name in '刀具房': + if lot_id.tool_material_status == '可用': record.handle_code_id = lot_id.id - elif lot_id.quant_ids[-1].location_id.name == '刀具组装位置': + elif lot_id.quant_ids[-1].location_id.name in ['刀具组装位置']: raise ValidationError('该刀柄已使用,请重新扫描!!!') else: raise ValidationError('该刀柄未入库,请重新扫描!!!')