mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-13 10:11:20 +00:00
[minor] [fix] opportunity form, queries, stock uom replace utility
This commit is contained in:
@@ -2,11 +2,11 @@ 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;
|
||||
cur_frm.fields_dict.customer.get_query = erpnext.queries.customer;
|
||||
cur_frm.fields_dict.supplier.get_query = erpnext.queries.supplier;
|
||||
|
||||
if(cur_frm.fields_dict.lead) {
|
||||
cur_frm.fields_dict.lead.get_query = erpnext.utils.lead_query;
|
||||
cur_frm.fields_dict.lead.get_query = erpnext.queries.lead;
|
||||
cur_frm.add_fetch('lead', 'lead_name', 'lead_name');
|
||||
}
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user