diff --git a/erpnext/stock/doctype/item_attribute/item_attribute.js b/erpnext/stock/doctype/item_attribute/item_attribute.js index 22c7978ac3c..d6f0f259174 100644 --- a/erpnext/stock/doctype/item_attribute/item_attribute.js +++ b/erpnext/stock/doctype/item_attribute/item_attribute.js @@ -1,4 +1,13 @@ // Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors // For license information, please see license.txt -frappe.ui.form.on("Item Attribute", {}); +frappe.ui.form.on("Item Attribute", { + numeric_values(frm) { + // Numeric attributes have no discrete values; drop the rows so their + // mandatory Attribute Value / Abbreviation don't block the save. + if (frm.doc.numeric_values) { + frm.clear_table("item_attribute_values"); + frm.refresh_field("item_attribute_values"); + } + }, +});