[cleanup] move contact, address to frappe 💥

This commit is contained in:
Rushabh Mehta
2017-01-13 18:53:11 +05:30
parent 448acf6f46
commit b92087cb2d
52 changed files with 196 additions and 3168 deletions

View File

@@ -1,14 +1,17 @@
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
cur_frm.cscript.refresh = function(doc,dt,dn){
frappe.ui.form.on('Sales Partner', {
refresh: function(frm) {
frappe.contact_link = {doc: frm.doc, fieldname: 'name', doctype: 'Sales Person'}
if(doc.__islocal){
hide_field(['address_html', 'contact_html']);
erpnext.utils.clear_address_and_contact(cur_frm);
if(doc.__islocal){
hide_field(['address_html', 'contact_html']);
erpnext.utils.clear_address_and_contact(frm);
}
else{
unhide_field(['address_html', 'contact_html']);
erpnext.utils.render_address_and_contact(frm);
}
}
else{
unhide_field(['address_html', 'contact_html']);
erpnext.utils.render_address_and_contact(cur_frm);
}
}
});