From 83350bc94665b98ee837cd69543f8cce57b091fc Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 22 Nov 2012 17:39:19 +0530 Subject: [PATCH] supplier can now be searched using name --- buying/doctype/purchase_common/purchase_common.js | 4 +++- stock/doctype/item/item.js | 5 ++++- stock/doctype/serial_no/serial_no.js | 4 +++- stock/doctype/stock_entry/stock_entry.js | 4 +++- support/doctype/communication/communication.js | 4 +++- utilities/doctype/address/address.js | 4 +++- utilities/doctype/contact/contact.js | 2 ++ 7 files changed, 21 insertions(+), 6 deletions(-) diff --git a/buying/doctype/purchase_common/purchase_common.js b/buying/doctype/purchase_common/purchase_common.js index f295aa00ef..7553a49c45 100644 --- a/buying/doctype/purchase_common/purchase_common.js +++ b/buying/doctype/purchase_common/purchase_common.js @@ -668,4 +668,6 @@ cur_frm.cscript.project_name = function(doc, cdt, cdn) { }); refresh_field(cur_frm.cscript.fname); } -} \ No newline at end of file +} + +cur_frm.fields_dict.supplier.get_query = erpnext.utils.supplier_query; \ No newline at end of file diff --git a/stock/doctype/item/item.js b/stock/doctype/item/item.js index c5501d5166..828beab384 100644 --- a/stock/doctype/item/item.js +++ b/stock/doctype/item/item.js @@ -144,4 +144,7 @@ cur_frm.fields_dict['ref_rate_details'].grid.onrowadd = function(doc, cdt, cdn){ } cur_frm.fields_dict.item_customer_details.grid.get_field("customer_name").get_query = - erpnext.utils.customer_query; \ No newline at end of file + erpnext.utils.customer_query; + +cur_frm.fields_dict.item_supplier_details.grid.get_field("supplier").get_query = + erpnext.utils.supplier_query; \ No newline at end of file diff --git a/stock/doctype/serial_no/serial_no.js b/stock/doctype/serial_no/serial_no.js index 62a912670d..49e88e2826 100644 --- a/stock/doctype/serial_no/serial_no.js +++ b/stock/doctype/serial_no/serial_no.js @@ -69,4 +69,6 @@ cur_frm.fields_dict['item_code'].get_query = function(doc,cdt,cdn) { AND `tabItem`.%(key)s LIKE "%s" ORDER BY `tabItem`.`name` ASC LIMIT 50'; } -cur_frm.fields_dict.customer.get_query = erpnext.utils.customer_query; \ No newline at end of file +cur_frm.fields_dict.customer.get_query = erpnext.utils.customer_query; + +cur_frm.fields_dict.supplier.get_query = erpnext.utils.supplier_query; \ No newline at end of file diff --git a/stock/doctype/stock_entry/stock_entry.js b/stock/doctype/stock_entry/stock_entry.js index 859bd5823f..bf7582652f 100644 --- a/stock/doctype/stock_entry/stock_entry.js +++ b/stock/doctype/stock_entry/stock_entry.js @@ -231,4 +231,6 @@ cur_frm.cscript.validate_items = function(doc) { } } -cur_frm.fields_dict.customer.get_query = erpnext.utils.customer_query; \ No newline at end of file +cur_frm.fields_dict.customer.get_query = erpnext.utils.customer_query; + +cur_frm.fields_dict.supplier.get_query = erpnext.utils.supplier_query; \ No newline at end of file diff --git a/support/doctype/communication/communication.js b/support/doctype/communication/communication.js index 9995729b99..f56b7a1256 100644 --- a/support/doctype/communication/communication.js +++ b/support/doctype/communication/communication.js @@ -138,4 +138,6 @@ cur_frm.cscript.hide_dialog = function() { cur_frm.communication_list.run(); } -cur_frm.fields_dict.customer.get_query = erpnext.utils.customer_query; \ No newline at end of file +cur_frm.fields_dict.customer.get_query = erpnext.utils.customer_query; + +cur_frm.fields_dict.supplier.get_query = erpnext.utils.supplier_query; \ No newline at end of file diff --git a/utilities/doctype/address/address.js b/utilities/doctype/address/address.js index 0ace167887..034806e1fb 100644 --- a/utilities/doctype/address/address.js +++ b/utilities/doctype/address/address.js @@ -41,4 +41,6 @@ cur_frm.cscript.hide_dialog = function() { cur_frm.address_list.run(); } -cur_frm.fields_dict.customer.get_query = erpnext.utils.customer_query; \ No newline at end of file +cur_frm.fields_dict.customer.get_query = erpnext.utils.customer_query; + +cur_frm.fields_dict.supplier.get_query = erpnext.utils.supplier_query; \ No newline at end of file diff --git a/utilities/doctype/contact/contact.js b/utilities/doctype/contact/contact.js index 5c71acf4a5..43bba1a742 100644 --- a/utilities/doctype/contact/contact.js +++ b/utilities/doctype/contact/contact.js @@ -43,3 +43,5 @@ cur_frm.cscript.hide_dialog = function() { } cur_frm.fields_dict.customer.get_query = erpnext.utils.customer_query; + +cur_frm.fields_dict.supplier.get_query = erpnext.utils.supplier_query; \ No newline at end of file