From f08e483ed7863fbb332bd306317d89acf9f7e932 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 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js index 3cc1140ac1..8aefcbafa7 100644 --- a/erpnext/stock/doctype/item/item.js +++ b/erpnext/stock/doctype/item/item.js @@ -572,9 +572,10 @@ $.extend(erpnext.item, { function make_fields_from_attribute_values(attr_dict) { let fields = []; - Object.keys(attr_dict).forEach((name, i) => { - if(i % 3 === 0){ - fields.push({fieldtype: 'Section Break'}); + let att_key = frm.doc.attributes.map((idx) => idx.attribute); + att_key.forEach((name, i) => { + if (i % 3 === 0) { + fields.push({ fieldtype: "Section Break" }); } fields.push({fieldtype: 'Column Break', label: name, fieldname: name}); attr_dict[name].forEach(value => { -- GitLab