Item code clarification

hello, let’s say i have the same product like a cloths store, “X” product but with different sizes and colors, so basically they have different barcodes, but like in this case what can be the item code ? , because in ERPnext the item code is a mandatory field which should be also unique .

In the awesome bar at the top of your ERPNext screen type “Variant” and then select the “Variants List” from the drop down menu.

This is where you can see the possible variants used for Items that have variants like size or color.

There is a check box in the Item doc to indicate the Item has Vairants. Once checked, the Item doc becomes a “template” instead of a fixed item. You then select the variants that go with the Item and it will generate the new Item codes to coincide with the template.

Further reading on topic can be found here:
https://erpnext.com/docs/user/manual/en/stock/item/item-variants

BKM