From 92b6f766121500ecc7bdd8d6e5f6b3eaf25f975f Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Wed, 29 Jul 2015 15:17:30 +0530 Subject: [PATCH] [fix] disable save in naming series --- erpnext/setup/doctype/naming_series/naming_series.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/erpnext/setup/doctype/naming_series/naming_series.js b/erpnext/setup/doctype/naming_series/naming_series.js index e781754df5..5917f52d4c 100644 --- a/erpnext/setup/doctype/naming_series/naming_series.js +++ b/erpnext/setup/doctype/naming_series/naming_series.js @@ -1,7 +1,10 @@ // Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors // License: GNU General Public License v3. See license.txt + cur_frm.cscript.onload_post_render = function(doc, cdt, cdn) { + cur_frm.disable_save(); + cur_frm.toolbar.print_icon.addClass("hide"); return cur_frm.call({ doc: cur_frm.doc, method: 'get_transactions', @@ -18,7 +21,7 @@ cur_frm.cscript.update_selects = function(r) { } cur_frm.cscript.select_doc_for_series = function(doc, cdt, cdn) { - cur_frm.toggle_display(['help_html','set_options', 'user_must_always_select', 'update'], + cur_frm.toggle_display(['help_html','set_options', 'user_must_always_select', 'update'], doc.select_doc_for_series); var callback = function(r, rt){ @@ -40,4 +43,4 @@ cur_frm.cscript.prefix = function(doc, dt, dn) { return cur_frm.call_server('get_current', '', function(r) { refresh_field('current_value'); }); -} \ No newline at end of file +}