From a422d93313c69a46030b028f381853d2f7aac395 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 f58f13efa8..084bd42783 100644 --- a/erpnext/stock/doctype/item/item.js +++ b/erpnext/stock/doctype/item/item.js @@ -652,7 +652,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" }); } -- GitLab