[fix] Do not append description to variant if description already exists (#11204)

This commit is contained in:
Saurabh
2017-10-18 16:02:08 +05:30
committed by Nabin Hait
parent 7624e7bf85
commit a7d5f94d4a
3 changed files with 52 additions and 3 deletions

View File

@@ -205,9 +205,10 @@ def copy_attributes_to_variant(item, variant):
if item.variant_based_on=='Item Attribute':
if variant.attributes:
variant.description += "\n"
for d in variant.attributes:
variant.description += "<div>" + d.attribute + ": " + cstr(d.attribute_value) + "</div>"
if not variant.description:
variant.description += "\n"
for d in variant.attributes:
variant.description += "<div>" + d.attribute + ": " + cstr(d.attribute_value) + "</div>"
def make_variant_item_code(template_item_code, template_item_name, variant):
"""Uses template's item code and abbreviations to make variant's item code"""