Merge pull request #3242 from neilLasrado/crm
view leads button added to campaign
diff --git a/erpnext/selling/doctype/campaign/campaign.js b/erpnext/selling/doctype/campaign/campaign.js
index 77a7955..31a796f 100644
--- a/erpnext/selling/doctype/campaign/campaign.js
+++ b/erpnext/selling/doctype/campaign/campaign.js
@@ -6,4 +6,10 @@
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);
+ }
})