fix: can not create item variants (#25433)
* fix: item_code assigned to function returning None
* fix: ignore has_variants and attributes in variant
* fix: patch to remove has_variants and attributes
* chore: fix whitespace in translation
diff --git a/erpnext/controllers/item_variant.py b/erpnext/controllers/item_variant.py
index 1f95e00..051481f 100644
--- a/erpnext/controllers/item_variant.py
+++ b/erpnext/controllers/item_variant.py
@@ -262,7 +262,8 @@
# copy non no-copy fields
exclude_fields = ["naming_series", "item_code", "item_name", "show_in_website",
- "show_variant_in_website", "opening_stock", "variant_of", "valuation_rate"]
+ "show_variant_in_website", "opening_stock", "variant_of", "valuation_rate",
+ "has_variants", "attributes"]
if item.variant_based_on=='Manufacturer':
# don't copy manufacturer values if based on part no