Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/新增工件装夹

This commit is contained in:
jinling.yang
2023-07-06 17:33:47 +08:00
33 changed files with 1133 additions and 301 deletions

View File

@@ -231,18 +231,8 @@ class ProductionLot(models.Model):
1]
now = datetime.now().strftime("%Y-%m-%d")
# formatted_date = now.strftime("%Y-%m-%d")
if product.integral_cutting_tool_type_id:
return "%s-%s-%03d" % (product.integral_cutting_tool_type_id.code, now, 1)
if product.blade_type_id:
return "%s-%s-%03d" % (product.blade_type_id.code, now, 1)
if product.cutter_bar_type_id:
return "%s-%s-%03d" % (product.cutter_bar_type_id.code, now, 1)
if product.cutter_pad_type_id:
return "%s-%s-%03d" % (product.cutter_pad_type_id.code, now, 1)
if product.handle_type_id:
return "%s-%s-%03d" % (product.handle_type_id.code, now, 1)
if product.chuck_type_id:
return "%s-%s-%03d" % (product.chuck_type_id.code, now, 1)
if product.cutting_tool_model_id:
return "%s-%s-%03d" % (product.cutting_tool_model_id.code, now, 1)
return "%s-%03d" % (product.name, 1)