From 952e663b31ee9806646869f0d0a9eee28594337d Mon Sep 17 00:00:00 2001 From: yuxianghui <3437689193@qq.com> Date: Tue, 19 Mar 2024 17:20:19 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E8=A7=A3=E5=86=B3=E5=88=80=E5=85=B7?= =?UTF-8?q?=E7=89=A9=E6=96=99=E9=87=87=E8=B4=AD=E6=97=B6=EF=BC=8C=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E7=94=9F=E6=88=90=E5=BA=8F=E5=88=97=E5=8F=B7=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E9=97=AE=E9=A2=98=EF=BC=9B2=E3=80=81=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E5=88=80=E5=85=B7=E7=89=A9=E6=96=99=E7=94=9F=E6=88=90?= =?UTF-8?q?=E5=BA=8F=E5=88=97=E5=8F=B7=E6=97=B6=EF=BC=8C=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=88=80=E5=85=B7=E7=89=A9=E6=96=99=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E8=AE=B0=E5=BD=95=E7=9A=84=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_manufacturing/models/stock.py | 2 +- sf_tool_management/models/functional_tool_enroll.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sf_manufacturing/models/stock.py b/sf_manufacturing/models/stock.py index c9c2ebf2..9cfcffc5 100644 --- a/sf_manufacturing/models/stock.py +++ b/sf_manufacturing/models/stock.py @@ -263,7 +263,7 @@ class ProductionLot(models.Model): if not last_serial: return "%s-%s%03d" % (product.cutting_tool_model_id.code[:-12], now, 1) else: - return "%s-%s%03d" % (product.cutting_tool_model_id.code[:-12], now, int(last_serial.name[-3:]) + 1) + return "%s-%s%03d" % (product.cutting_tool_model_id.code[:-12], now, int(last_serial.name[-3:]) + 2) else: raise ValidationError('该刀具物料产品的型号字段为空,请补充完整!!!') diff --git a/sf_tool_management/models/functional_tool_enroll.py b/sf_tool_management/models/functional_tool_enroll.py index 1d954ed0..6c35f2ef 100644 --- a/sf_tool_management/models/functional_tool_enroll.py +++ b/sf_tool_management/models/functional_tool_enroll.py @@ -66,7 +66,7 @@ class StockLot(models.Model): records = super(StockLot, self).create(vals_list) for record in records: if record.product_id.categ_id.name == '刀具': - record.tool_material_status = '可用' + record.tool_material_status = '未入库' record.enroll_tool_material_stock() return records