Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/制造代码优化

This commit is contained in:
mgw
2024-03-20 17:33:58 +08:00
22 changed files with 637 additions and 707 deletions

View File

@@ -331,6 +331,7 @@ class ResProductMo(models.Model):
(6, 0, self.cutting_tool_model_id.suitable_coolant_ids.ids)]
self.compaction_way_id = self.cutting_tool_model_id.compaction_way_id.id
self.fit_blade_shape_id = self.cutting_tool_model_id.fit_blade_shape_id.id
self.image_1920 = self.cutting_tool_model_id.image
else:
self.cutting_tool_type_id = False
self.brand_id = False

View File

@@ -264,7 +264,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('该刀具物料产品的型号字段为空,请补充完整!!!')