[cleanup] [minor] fetch lead details in opportunity

This commit is contained in:
Nabin Hait
2013-09-25 20:00:22 +05:30
parent 1ec5109a1a
commit 16ec981bfd
4 changed files with 69 additions and 64 deletions

View File

@@ -33,16 +33,7 @@ erpnext.LeadController = wn.ui.form.Controller.extend({
var doc = this.frm.doc;
erpnext.hide_naming_series();
this.frm.clear_custom_buttons();
this.frm.dashboard.reset(doc);
if(!doc.__islocal) {
if(doc.status=="Converted") {
this.frm.dashboard.set_headline_alert(wn._("Converted"), "alert-success", "icon-ok-sign");
} else {
this.frm.dashboard.set_headline_alert(wn._(doc.status), "alert-info", "icon-exclamation-sign");
}
}
this.frm.__is_customer = this.frm.__is_customer || this.frm.doc.__is_customer;
if(!this.frm.doc.__islocal && !this.frm.__is_customer) {
this.frm.add_custom_button("Create Customer", this.create_customer);

View File

@@ -126,6 +126,10 @@ def make_opportunity(source_name, target_doclist=None):
"campaign_name": "campaign",
"doctype": "enquiry_from",
"name": "lead",
"lead_name": "contact_display",
"company_name": "customer_name",
"email_id": "contact_email",
"mobile_no": "contact_mobile"
}
}}, target_doclist)