修改产品名称生成规则
This commit is contained in:
@@ -12,10 +12,10 @@ class ProductTemplate(models.Model):
|
||||
|
||||
def generate_embryo_name(self, order_id, item, materials_id, materials_type_id, embryo_redundancy_id, i):
|
||||
"""生成坯料名称"""
|
||||
embryo_name = '%s-%s-%s [%s %s-%s * %s * %s]' % ('R',
|
||||
order_id.name, i, materials_id.name, materials_type_id.name,
|
||||
embryo_name = '%s-%s[%s * %s * %s]%s' % (materials_id.name, materials_type_id.name,
|
||||
self.format_float(item['model_long'] + embryo_redundancy_id.long),
|
||||
self.format_float(item['model_width'] + embryo_redundancy_id.width),
|
||||
self.format_float(item['model_height'] + embryo_redundancy_id.height))
|
||||
self.format_float(item['model_height'] + embryo_redundancy_id.height),
|
||||
item['model_id'])
|
||||
return embryo_name
|
||||
|
||||
Reference in New Issue
Block a user