[Fix] Lead address not able to select on the quotation (#10328)

This commit is contained in:
rohitwaghchaure 2017-08-08 17:27:58 +05:30 committed by Nabin Hait
parent 39ec7dc658
commit 468fb97c81

View File

@ -9,6 +9,15 @@ frappe.ui.form.on('Quotation', {
frm.custom_make_buttons = { frm.custom_make_buttons = {
'Sales Order': 'Make Sales Order' 'Sales Order': 'Make Sales Order'
} }
},
refresh: function(frm) {
frm.trigger("set_label");
},
quotation_to: function(frm) {
frm.trigger("set_label");
},
set_label: function(frm) {
frm.fields_dict.customer_address.set_label(__(frm.doc.quotation_to + " Address"));
} }
}); });
@ -24,6 +33,8 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({
}, },
refresh: function(doc, dt, dn) { refresh: function(doc, dt, dn) {
this._super(doc, dt, dn); this._super(doc, dt, dn);
doctype = doc.quotation_to == 'Customer' ? 'Customer':'Lead';
frappe.dynamic_link = {doc: this.frm.doc, fieldname: doctype.toLowerCase(), doctype: doctype}
var me = this; var me = this;