From 6c85479e4fefd321dc3eeed2bce59b2727b3f741 Mon Sep 17 00:00:00 2001 From: Neil Trini Lasrado Date: Mon, 11 May 2015 17:56:36 +0530 Subject: [PATCH] view leads button added to campaign --- erpnext/selling/doctype/campaign/campaign.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/erpnext/selling/doctype/campaign/campaign.js b/erpnext/selling/doctype/campaign/campaign.js index 77a7955c31..31a796fe04 100644 --- a/erpnext/selling/doctype/campaign/campaign.js +++ b/erpnext/selling/doctype/campaign/campaign.js @@ -6,4 +6,10 @@ frappe.ui.form.on("Campaign", "refresh", function(frm) { if(frm.doc.__islocal) { frm.toggle_display("naming_series", frappe.boot.sysdefaults.campaign_naming_by=="Naming Series"); } + else{ + cur_frm.add_custom_button(__("View Leads"), function() { + frappe.route_options = {"source": "Campaign","campaign_name": frm.doc.name} + frappe.set_route("List", "Lead"); + }, "icon-list", true); + } })