diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js index f58f13efa86d7b2cb13436b7d39921e37c94c737..084bd42783bf160d733ccfffd5583dc65b71a170 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" }); }