fix: Added description if item variants does not have description in map(v12) (#17796)
* fix: variant item description based on attribute * style: removed unwanted changes
This commit is contained in:
parent
9944ef2baf
commit
62d58acea9
@ -279,14 +279,14 @@ def copy_attributes_to_variant(item, variant):
|
||||
variant.set(field.fieldname, item.get(field.fieldname))
|
||||
|
||||
variant.variant_of = item.name
|
||||
if 'description' in allow_fields:
|
||||
variant.has_variants = 0
|
||||
|
||||
if 'description' not in allow_fields:
|
||||
if not variant.description:
|
||||
variant.description = ""
|
||||
|
||||
if item.variant_based_on=='Item Attribute':
|
||||
if variant.attributes:
|
||||
attributes_description = ""
|
||||
attributes_description = item.description + " "
|
||||
for d in variant.attributes:
|
||||
attributes_description += "<div>" + d.attribute + ": " + cstr(d.attribute_value) + "</div>"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user