[minor] [fix] opportunity form, queries, stock uom replace utility

This commit is contained in:
Anand Doshi
2013-07-18 13:26:27 +05:30
parent 4daf3dd8a8
commit 61cad5076b
7 changed files with 133 additions and 282 deletions

View File

@@ -145,20 +145,6 @@ def supplier_query(doctype, txt, searchfield, start, page_len, filters):
'txt': "%%%s%%" % txt, 'mcond':get_match_cond(doctype, searchfield), 'start': start,
'page_len': page_len})
def item_std(doctype, txt, searchfield, start, page_len, filters):
return webnotes.conn.sql("""select tabItem.name,
if(length(tabItem.item_name) > 40,
concat(substr(tabItem.item_name, 1, 40), "..."), item_name) as item_name,
if(length(tabItem.description) > 40,
concat(substr(tabItem.description, 1, 40), "..."), description) as decription
FROM tabItem
WHERE tabItem.docstatus!=2
and tabItem.%(key)s LIKE "%(txt)s"
%(mcond)s
limit %(start)s, %(page_len)s """ % {'key': searchfield, 'txt': "%%%s%%" % txt,
'mcond':get_match_cond(doctype, searchfield), 'start': start,
'page_len': page_len})
def account_query(doctype, txt, searchfield, start, page_len, filters):
conditions = []
if not filters: