fix(Stock): item variant description (#19134)
diff --git a/erpnext/controllers/item_variant.py b/erpnext/controllers/item_variant.py
index dee71dc..29f8dd5 100644
--- a/erpnext/controllers/item_variant.py
+++ b/erpnext/controllers/item_variant.py
@@ -283,7 +283,7 @@
if 'description' not in allow_fields:
if not variant.description:
variant.description = ""
-
+ else:
if item.variant_based_on=='Item Attribute':
if variant.attributes:
attributes_description = item.description + " "
@@ -291,7 +291,7 @@
attributes_description += "<div>" + d.attribute + ": " + cstr(d.attribute_value) + "</div>"
if attributes_description not in variant.description:
- variant.description += attributes_description
+ variant.description = attributes_description
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"""