From ac59c2b300c5929e1468ce8fbae78b34fb4d2646 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 16 Jun 2015 13:06:37 -0400 Subject: [PATCH] [minor] clear Item's introduction section on refresh --- erpnext/stock/doctype/item/item.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js index b31b682984..ed1367e0b6 100644 --- a/erpnext/stock/doctype/item/item.js +++ b/erpnext/stock/doctype/item/item.js @@ -55,6 +55,9 @@ frappe.ui.form.on("Item", { // read only if any stock ledger entry exists erpnext.item.make_dashboard(frm); + // clear intro + frm.set_intro(); + if (frm.doc.has_variants) { frm.set_intro(__("This Item is a Template and cannot be used in transactions. Item attributes will be copied over into the variants unless 'No Copy' is set"), true); frm.add_custom_button(__("Show Variants"), function() { @@ -85,7 +88,7 @@ frappe.ui.form.on("Item", { erpnext.item.weight_to_validate(frm); erpnext.item.variants_can_not_be_created_manually(frm); }, - + image: function(frm) { refresh_field("image_view"); }, @@ -209,11 +212,11 @@ $.extend(erpnext.item, { validated = 0; } }, - + variants_can_not_be_created_manually: function(frm) { if (frm.doc.__islocal && frm.doc.variant_of) frappe.throw(__("Variants can not be created manually, add item attributes in the template item")) } - + });