Merge pull request #5390 from MaxMorais/patch-5
get_address_display cannot be called directly
This commit is contained in:
commit
1df75c930f
@ -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.provide("erpnext.support");
|
||||
|
||||
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({
|
||||
@ -81,4 +83,4 @@ cur_frm.fields_dict['contact_person'].get_query = function(doc, cdt, cdn) {
|
||||
|
||||
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