diff --git a/erpnext/controllers/item_variant.py b/erpnext/controllers/item_variant.py index 7749ac5f05..a54411903c 100644 --- a/erpnext/controllers/item_variant.py +++ b/erpnext/controllers/item_variant.py @@ -272,18 +272,19 @@ def copy_attributes_to_variant(item, variant): else: variant.set(field.fieldname, item.get(field.fieldname)) - variant.variant_of = item.name - variant.has_variants = 0 - if not variant.description: - variant.description = "" + if 'description' in allow_fields: + variant.variant_of = item.name + variant.has_variants = 0 + if not variant.description: + variant.description = "" - if item.variant_based_on=='Item Attribute': - if variant.attributes: - attributes_description = "" - for d in variant.attributes: - attributes_description += "