Merge branch 'master' of github.com:webnotes/erpnext

This commit is contained in:
Rushabh Mehta 2012-11-22 14:26:39 +01:00
commit 0a68da5d15
3 changed files with 14 additions and 17 deletions

View File

@ -14,6 +14,9 @@ cur_frm.cscript.onload = function(doc) {
company_name like \"%%%s\") \
order by lead_name asc limit 50";
};
cur_frm.fields_dict.customer.get_query = erpnext.utils.customer_query;
cur_frm.fields_dict.supplier.get_query = erpnext.utils.supplier_query;
}
cur_frm.cscript.refresh = function(doc, dt, dn) {
@ -137,7 +140,3 @@ cur_frm.cscript.hide_dialog = function() {
if(cur_frm.communication_list)
cur_frm.communication_list.run();
}
cur_frm.fields_dict.customer.get_query = erpnext.utils.customer_query;
cur_frm.fields_dict.supplier.get_query = erpnext.utils.supplier_query;

View File

@ -18,6 +18,9 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
cur_frm.add_fetch('customer', 'customer_name', 'customer_name');
cur_frm.add_fetch('supplier', 'supplier_name', 'supplier_name');
cur_frm.fields_dict.customer.get_query = erpnext.utils.customer_query;
cur_frm.fields_dict.supplier.get_query = erpnext.utils.supplier_query;
var route = wn.get_route();
if(route[1]=='Supplier') {
var supplier = wn.container.page.frm.doc;
@ -40,7 +43,3 @@ cur_frm.cscript.hide_dialog = function() {
if(cur_frm.address_list)
cur_frm.address_list.run();
}
cur_frm.fields_dict.customer.get_query = erpnext.utils.customer_query;
cur_frm.fields_dict.supplier.get_query = erpnext.utils.supplier_query;

View File

@ -16,8 +16,11 @@
//--------- ONLOAD -------------
cur_frm.cscript.onload = function(doc, cdt, cdn) {
if(doc.customer) cur_frm.add_fetch('customer', 'customer_name', 'customer_name');
if(doc.supplier) cur_frm.add_fetch('supplier', 'supplier_name', 'supplier_name');
cur_frm.add_fetch('customer', 'customer_name', 'customer_name');
cur_frm.add_fetch('supplier', 'supplier_name', 'supplier_name');
cur_frm.fields_dict.customer.get_query = erpnext.utils.customer_query;
cur_frm.fields_dict.supplier.get_query = erpnext.utils.supplier_query;
var route = wn.get_route();
if(route[1]=='Supplier') {
@ -41,7 +44,3 @@ cur_frm.cscript.hide_dialog = function() {
if(cur_frm.contact_list)
cur_frm.contact_list.run();
}
cur_frm.fields_dict.customer.get_query = erpnext.utils.customer_query;
cur_frm.fields_dict.supplier.get_query = erpnext.utils.supplier_query;