From 43a48fd2bcefe646a9d1150d2803f6b9ef1ba734 Mon Sep 17 00:00:00 2001 From: nick9822 Date: Tue, 20 Jun 2017 17:02:55 +0530 Subject: [PATCH] Resetting batch and serial nos checks --- erpnext/stock/doctype/item/item.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js index 86c6959448..1667741b55 100644 --- a/erpnext/stock/doctype/item/item.js +++ b/erpnext/stock/doctype/item/item.js @@ -121,7 +121,15 @@ frappe.ui.form.on("Item", { if(!frm.doc.description) frm.set_value("description", frm.doc.item_code); }, - + + is_stock_item: function(frm) { + if(!frm.doc.is_stock_item) { + frm.set_value("has_batch_no", 0); + frm.set_value("create_new_batch", 0); + frm.set_value("has_serial_no", 0); + } + }, + copy_from_item_group: function(frm) { return frm.call({ doc: frm.doc,