mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 04:09:11 +00:00
fix: Dynamic link fixes in quotation and opportunity
This commit is contained in:
@@ -20,6 +20,13 @@ frappe.ui.form.on("Opportunity", {
|
||||
});
|
||||
},
|
||||
|
||||
customer_lead: function(frm) {
|
||||
if (frm.doc.opportunity_from == "Customer") {
|
||||
frm.trigger('set_contact_link');
|
||||
erpnext.utils.get_party_details(frm);
|
||||
}
|
||||
},
|
||||
|
||||
with_items: function(frm) {
|
||||
frm.trigger('toggle_mandatory');
|
||||
},
|
||||
@@ -73,6 +80,14 @@ frappe.ui.form.on("Opportunity", {
|
||||
}
|
||||
},
|
||||
|
||||
set_contact_link: function(frm) {
|
||||
if(frm.doc.opportunity_from == "Customer" && frm.doc.customer_lead) {
|
||||
frappe.dynamic_link = {doc: frm.doc, fieldname: 'customer', doctype: 'Customer'}
|
||||
} else if(frm.doc.opportunity_from == "Lead" && frm.doc.customer_lead) {
|
||||
frappe.dynamic_link = {doc: frm.doc, fieldname: 'lead', doctype: 'Lead'}
|
||||
}
|
||||
},
|
||||
|
||||
set_dynamic_field_label: function(frm){
|
||||
if (frm.doc.opportunity_from == "Customer")
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user