Item with Multiple variants


I created an Item template to make further variants, but when I try to create a variant of that item, it is again getting saved as a template instead and I’m not able to go through with this.

I have the same issue, when i try to make multiple variant, the system say “Item Code is required”…

I am facing same issue.

Looks like some configuration issue. I was able to solve it. Will share the solution

Where to change configuration? Can you please guide me?

refer to this github issue Item code error while creating a multiples variants · Issue #25037 · frappe/erpnext · GitHub

this is caused by incorrectly added attribute field into the item variant setting fields list.
related code is at erpnext.controllers.item_variant.copy_attribute_to_variant
allow_fields = [d.field_name for d in frappe.get_all(“Variant Field”, fields = [‘field_name’])]

make sure both 2 fields: attribute and has_variants not among the fields list.

Solved, thanks…

Alternatively, you can remove these fields from Item Variant Settings in Stocks module

Delete the rows Attribute & Has_Variants and save this form.

This should solve it

1 Like

hi @Aditya_Bagarka i am struggling to find out the fields. would appreciate if pls help me out…
v13.1.0 (version-13)
v13.1.1 (version-13)

Isn’t it included in latest fix?

I’m still on the previous version. I found the fix in Variant settings & deleted the attribute & has_variant from list of copy - which solved my issue

1 Like

Noted and thanks for replying

Hi! How to add in the Item Variant Settings value of field image and barcode?

Hello! How to add additional row to Variant Settings? I am interesting in copy images from template to variants and also prices. Which document should I edit?