From 751a0a93ef6c86dcc4b88e7d84971bcc542f46be Mon Sep 17 00:00:00 2001 From: Shreyas Sojitra Date: Fri, 27 Dec 2024 10:53:17 +0530 Subject: [PATCH] fix: attribute order in create multiple variants dialog (#44800) * Fix : show multiple variants dialog Fixed attribute order in create multiple variant dialog. * fix(dialog): attribute order in create multiple variants dialog Fixed attribute order in create multiple variant dialog. --- erpnext/stock/doctype/item/item.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js index 0c34f82798a..675d49aab22 100644 --- a/erpnext/stock/doctype/item/item.js +++ b/erpnext/stock/doctype/item/item.js @@ -545,7 +545,8 @@ $.extend(erpnext.item, { function make_fields_from_attribute_values(attr_dict) { let fields = []; - Object.keys(attr_dict).forEach((name, i) => { + let att_key = frm.doc.attributes.map((idx) => idx.attribute); + att_key.forEach((name, i) => { if (i % 3 === 0) { fields.push({ fieldtype: "Section Break" }); }