From 01eefafad544d1bc2e6efccb1fea25f20e960354 Mon Sep 17 00:00:00 2001 From: Makarand Bauskar Date: Mon, 23 Jan 2017 12:15:36 +0530 Subject: [PATCH] [minor] minor fixes in opportunity form (#7549) --- erpnext/crm/doctype/opportunity/opportunity.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/crm/doctype/opportunity/opportunity.js b/erpnext/crm/doctype/opportunity/opportunity.js index 21fba7b1e72..b86a5a52874 100644 --- a/erpnext/crm/doctype/opportunity/opportunity.js +++ b/erpnext/crm/doctype/opportunity/opportunity.js @@ -23,7 +23,7 @@ frappe.ui.form.on("Opportunity", { refresh: function(frm) { var doc = frm.doc; frm.events.enquiry_from(frm); - if(doc.status!=="Lost") { + if(!doc.__islocal && doc.status!=="Lost") { if(doc.with_items){ frm.add_custom_button(__('Supplier Quotation'), function() { @@ -109,7 +109,7 @@ cur_frm.cscript.refresh = function(doc, cdt, cdn) { erpnext.toggle_naming_series(); var frm = cur_frm; - if(frm.perm[0].write && doc.docstatus==0) { + if(!doc.__islocal && frm.perm[0].write && doc.docstatus==0) { if(frm.doc.status==="Open") { frm.add_custom_button(__("Close"), function() { frm.set_value("status", "Closed");