Try ERPNext Buy Support Partners Foundation

Item Variant procedure

Hi all,
When I create Item variants by “Make --> Multiple Variants” button, all the filed that I need in the variant configure in “Item Variant Settings” form. All its work fine here.

Then I open each Variant and update the Barcode field with the Item Code (just copy & paste). Where I modify the code so that the Item Code will copy in the Barcode field during creation of Variants?

-MAK

I try the below custom script, but no luck:
customScript

-MAK

Hi, is your field name barcode?
You have to give

cur_frm.set_value(“field_name”,value);

Yes, this is standard Barcode field in Item DocType. kindly check my above first post for detail.

I think that code does not trigger when Multiple Variants button executed.

-MAK

Can anybody guide me to find the code of MAKE --> MULTIPLE VARIANTS button in ITEM doctype.

-MAK

Hi,
I have done that task by the below workaround:
In class Item(WebsiteGenerator) of item.py file I insert code in def autoname(self):

self.barcode = self.item_code

I appreciate, if someone guides me a better way to do this task.

-MAK