removed searchfield condition from get_match_cond frappe/erpnext#1457
diff --git a/erpnext/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.py b/erpnext/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.py
index f6a31a0..b8c1bd6 100644
--- a/erpnext/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.py
+++ b/erpnext/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.py
@@ -153,7 +153,7 @@
 			"dt":filters["dt"], 
 			"acc":filters["acc"], 
 			"account_type": filters['account_type'], 
-			'mcond':get_match_cond(doctype, searchfield), 
+			'mcond':get_match_cond(doctype), 
 			'txt': "%%%s%%" % txt, 
 			"start": start, 
 			"page_len": page_len
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
index 6bccd03..a24b844 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py
@@ -793,7 +793,7 @@
 				and tabAccount.company = '%(company)s' 
 				and tabAccount.%(key)s LIKE '%(txt)s'
 				%(mcond)s""" % {'company': filters['company'], 'key': searchfield, 
-			'txt': "%%%s%%" % txt, 'mcond':get_match_cond(doctype, searchfield)})
+			'txt': "%%%s%%" % txt, 'mcond':get_match_cond(doctype)})
 
 
 @frappe.whitelist()
diff --git a/erpnext/controllers/queries.py b/erpnext/controllers/queries.py
index d5ea232..9b68f12 100644
--- a/erpnext/controllers/queries.py
+++ b/erpnext/controllers/queries.py
@@ -36,7 +36,7 @@
 			case when employee_name like "%(txt)s" then 0 else 1 end, 
 			name 
 		limit %(start)s, %(page_len)s""" % {'key': searchfield, 'txt': "%%%s%%" % txt,  
-		'mcond':get_match_cond(doctype, searchfield), 'start': start, 'page_len': page_len})
+		'mcond':get_match_cond(doctype), 'start': start, 'page_len': page_len})
 
  # searches for leads which are not converted
 def lead_query(doctype, txt, searchfield, start, page_len, filters): 
@@ -53,7 +53,7 @@
 			case when company_name like "%(txt)s" then 0 else 1 end, 
 			lead_name asc 
 		limit %(start)s, %(page_len)s""" % {'key': searchfield, 'txt': "%%%s%%" % txt,  
-		'mcond':get_match_cond(doctype, searchfield), 'start': start, 'page_len': page_len})
+		'mcond':get_match_cond(doctype), 'start': start, 'page_len': page_len})
 
  # searches for customer
 def customer_query(doctype, txt, searchfield, start, page_len, filters):
@@ -76,7 +76,7 @@
 			case when customer_name like "%(txt)s" then 0 else 1 end, 
 			name, customer_name 
 		limit %(start)s, %(page_len)s""" % {'field': fields,'key': searchfield, 
-		'txt': "%%%s%%" % txt, 'mcond':get_match_cond(doctype, searchfield), 
+		'txt': "%%%s%%" % txt, 'mcond':get_match_cond(doctype), 
 		'start': start, 'page_len': page_len})
 
 # searches for supplier
@@ -98,7 +98,7 @@
 			case when supplier_name like "%(txt)s" then 0 else 1 end, 
 			name, supplier_name 
 		limit %(start)s, %(page_len)s """ % {'field': fields,'key': searchfield, 
-		'txt': "%%%s%%" % txt, 'mcond':get_match_cond(doctype, searchfield), 'start': start, 
+		'txt': "%%%s%%" % txt, 'mcond':get_match_cond(doctype), 'start': start, 
 		'page_len': page_len})
 		
 def tax_account_query(doctype, txt, searchfield, start, page_len, filters):
@@ -134,7 +134,7 @@
 			{fcond} {mcond}
 		limit %(start)s, %(page_len)s """.format(key=searchfield,
 			fcond=get_filters_cond(doctype, filters, conditions),
-			mcond=get_match_cond(doctype, searchfield)), 
+			mcond=get_match_cond(doctype)), 
 			{
 				"today": nowdate(),
 				"txt": "%%%s%%" % txt,
@@ -153,7 +153,7 @@
 			%(fcond)s  %(mcond)s  
 		limit %(start)s, %(page_len)s """ %  {'key': searchfield, 'txt': "%%%s%%" % txt, 
 		'fcond': get_filters_cond(doctype, filters, conditions), 
-		'mcond':get_match_cond(doctype, searchfield), 'start': start, 'page_len': page_len})
+		'mcond':get_match_cond(doctype), 'start': start, 'page_len': page_len})
 
 def get_project_name(doctype, txt, searchfield, start, page_len, filters):
 	cond = ''
@@ -165,7 +165,7 @@
 			and %(cond)s `tabProject`.name like "%(txt)s" %(mcond)s 
 		order by `tabProject`.name asc 
 		limit %(start)s, %(page_len)s """ % {'cond': cond,'txt': "%%%s%%" % txt, 
-		'mcond':get_match_cond(doctype, searchfield),'start': start, 'page_len': page_len})
+		'mcond':get_match_cond(doctype),'start': start, 'page_len': page_len})
 			
 def get_delivery_notes_to_be_billed(doctype, txt, searchfield, start, page_len, filters):
 	return frappe.db.sql("""select `tabDelivery Note`.name, `tabDelivery Note`.customer_name
@@ -202,7 +202,7 @@
 				order by batch_no desc 
 				limit %(start)s, %(page_len)s """ % {'item_code': filters['item_code'], 
 					'warehouse': filters['warehouse'], 'posting_date': filters['posting_date'], 
-					'txt': "%%%s%%" % txt, 'mcond':get_match_cond(doctype, searchfield), 
+					'txt': "%%%s%%" % txt, 'mcond':get_match_cond(doctype), 
 					'start': start, 'page_len': page_len})
 	else:
 		return frappe.db.sql("""select name from tabBatch 
@@ -214,5 +214,5 @@
 				order by name desc 
 				limit %(start)s, %(page_len)s""" % {'item_code': filters['item_code'], 
 				'posting_date': filters['posting_date'], 'txt': "%%%s%%" % txt, 
-				'mcond':get_match_cond(doctype, searchfield),'start': start, 
+				'mcond':get_match_cond(doctype),'start': start, 
 				'page_len': page_len})
diff --git a/erpnext/projects/doctype/task/task.py b/erpnext/projects/doctype/task/task.py
index 6f0ff92..0e76781 100644
--- a/erpnext/projects/doctype/task/task.py
+++ b/erpnext/projects/doctype/task/task.py
@@ -85,5 +85,5 @@
 				%(mcond)s
 			order by name 
 			limit %(start)s, %(page_len)s """ % {'key': searchfield, 
-			'txt': "%%%s%%" % txt, 'mcond':get_match_cond(doctype, searchfield),
+			'txt': "%%%s%%" % txt, 'mcond':get_match_cond(doctype),
 			'start': start, 'page_len': page_len})
\ No newline at end of file
diff --git a/erpnext/selling/doctype/sales_bom/sales_bom.py b/erpnext/selling/doctype/sales_bom/sales_bom.py
index 823b67d..fb46961 100644
--- a/erpnext/selling/doctype/sales_bom/sales_bom.py
+++ b/erpnext/selling/doctype/sales_bom/sales_bom.py
@@ -39,5 +39,5 @@
 		where is_stock_item="No" and is_sales_item="Yes"
 		and name not in (select name from `tabSales BOM`) and %s like %s
 		%s limit %s, %s""" % (searchfield, "%s", 
-		get_match_cond(doctype, searchfield),"%s", "%s"), 
+		get_match_cond(doctype),"%s", "%s"), 
 		("%%%s%%" % txt, start, page_len))
\ No newline at end of file
diff --git a/erpnext/stock/doctype/packing_slip/packing_slip.py b/erpnext/stock/doctype/packing_slip/packing_slip.py
index 03d6e41..b7b6473 100644
--- a/erpnext/stock/doctype/packing_slip/packing_slip.py
+++ b/erpnext/stock/doctype/packing_slip/packing_slip.py
@@ -171,5 +171,5 @@
 	 							and ifnull(qty, 0) > ifnull(packed_qty, 0)) 
 	 			and %s like "%s" %s 
 	 			limit  %s, %s """ % ("%s", searchfield, "%s", 
-	 			get_match_cond(doctype, searchfield), "%s", "%s"), 
+	 			get_match_cond(doctype), "%s", "%s"), 
 	 			(filters["delivery_note"], "%%%s%%" % txt, start, page_len))
\ No newline at end of file
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py
index 719f7b1..3aeb507 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.py
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.py
@@ -631,7 +631,7 @@
 				or `customer` like %%(txt)s) %s %s
 		order by name, customer, customer_name
 		limit %s""" % (doctype, searchfield, conditions, 
-		get_match_cond(doctype, searchfield), "%(start)s, %(page_len)s"), 
+		get_match_cond(doctype), "%(start)s, %(page_len)s"), 
 		{"txt": "%%%s%%" % txt, "start": start, "page_len": page_len}, 
 		as_list=True)
 	
@@ -641,7 +641,7 @@
 			and (`%s` like %%(txt)s 
 				or `supplier` like %%(txt)s) %s
 		order by name, supplier, supplier_name
-		limit %s""" % (doctype, searchfield, get_match_cond(doctype, searchfield), 
+		limit %s""" % (doctype, searchfield, get_match_cond(doctype), 
 		"%(start)s, %(page_len)s"),	{"txt": "%%%s%%" % txt, "start": 
 		start, "page_len": page_len}, as_list=True)
 		
@@ -679,7 +679,7 @@
 		's_warehouse': filters['s_warehouse'], 
 		'posting_date': filters['posting_date'], 
 		'txt': "%%%s%%" % txt, 
-		'mcond':get_match_cond(doctype, searchfield), 
+		'mcond':get_match_cond(doctype), 
 		"start": start, 
 		"page_len": page_len
 	}