Merge pull request #5477 from neilLasrado/hotfix
Set `get_contact_details` and `get_address_display` to the right stan…
This commit is contained in:
commit
10ee3655d3
@ -8,7 +8,9 @@ frappe.ui.form.on("Opportunity", {
|
||||
customer: function(frm) {
|
||||
erpnext.utils.get_party_details(frm);
|
||||
},
|
||||
customer_address: erpnext.utils.get_address_display,
|
||||
customer_address: function(frm, cdt, cdn){
|
||||
erpnext.utils.get_address_display(frm, 'customer_address', 'address_display', false);
|
||||
},
|
||||
contact_person: erpnext.utils.get_contact_details,
|
||||
enquiry_from: function(frm) {
|
||||
frm.toggle_reqd("lead", frm.doc.enquiry_from==="Lead");
|
||||
|
@ -5,10 +5,12 @@ frappe.provide("erpnext.support");
|
||||
|
||||
frappe.ui.form.on_change("Maintenance Schedule", "customer", function(frm) {
|
||||
erpnext.utils.get_party_details(frm) });
|
||||
frappe.ui.form.on_change("Maintenance Schedule", "customer_address",
|
||||
erpnext.utils.get_address_display);
|
||||
frappe.ui.form.on_change("Maintenance Schedule", "contact_person",
|
||||
erpnext.utils.get_contact_details);
|
||||
frappe.ui.form.on_change("Maintenance Schedule", "customer_address", function(){
|
||||
erpnext.utils.get_address_display(cur_frm, 'customer_address', 'address_display');
|
||||
});
|
||||
frappe.ui.form.on_change("Maintenance Schedule", "contact_person", function(){
|
||||
erpnext.utils.get_contact_details(cur_frm);
|
||||
});
|
||||
|
||||
// TODO commonify this code
|
||||
erpnext.support.MaintenanceSchedule = frappe.ui.form.Controller.extend({
|
||||
|
@ -6,10 +6,12 @@ frappe.require("assets/erpnext/js/utils.js");
|
||||
|
||||
frappe.ui.form.on_change("Maintenance Visit", "customer", function(frm) {
|
||||
erpnext.utils.get_party_details(frm) });
|
||||
frappe.ui.form.on_change("Maintenance Visit", "customer_address",
|
||||
erpnext.utils.get_address_display);
|
||||
frappe.ui.form.on_change("Maintenance Visit", "contact_person",
|
||||
erpnext.utils.get_contact_details);
|
||||
frappe.ui.form.on_change("Maintenance Visit", "customer_address", function(frm){
|
||||
erpnext.utils.get_address_display(frm, 'customer_address', 'address_display')
|
||||
});
|
||||
frappe.ui.form.on_change("Maintenance Visit", "contact_person", function(frm){
|
||||
erpnext.utils.get_contact_details(frm)
|
||||
});
|
||||
|
||||
// TODO commonify this code
|
||||
erpnext.support.MaintenanceVisit = frappe.ui.form.Controller.extend({
|
||||
@ -87,4 +89,4 @@ cur_frm.fields_dict['purposes'].grid.get_field('item_code').get_query = function
|
||||
|
||||
cur_frm.fields_dict.customer.get_query = function(doc,cdt,cdn) {
|
||||
return {query: "erpnext.controllers.queries.customer_query" }
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user