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