changed args to filters in get_query
This commit is contained in:
parent
c39d13b6a7
commit
dc95c15002
@ -120,7 +120,7 @@ cur_frm.fields_dict['master_name'].get_query = function(doc) {
|
|||||||
if (doc.master_type) {
|
if (doc.master_type) {
|
||||||
return {
|
return {
|
||||||
query: "accounts.doctype.account.account.get_master_name",
|
query: "accounts.doctype.account.account.get_master_name",
|
||||||
args: { "master_type": doc.master_type }
|
filters: { "master_type": doc.master_type }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -128,6 +128,6 @@ cur_frm.fields_dict['master_name'].get_query = function(doc) {
|
|||||||
cur_frm.fields_dict['parent_account'].get_query = function(doc) {
|
cur_frm.fields_dict['parent_account'].get_query = function(doc) {
|
||||||
return {
|
return {
|
||||||
query: "accounts.doctype.account.account.get_parent_account",
|
query: "accounts.doctype.account.account.get_parent_account",
|
||||||
args: { "company": doc.company}
|
filters: { "company": doc.company}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -200,11 +200,11 @@ class DocType:
|
|||||||
|
|
||||||
return " - ".join(parts)
|
return " - ".join(parts)
|
||||||
|
|
||||||
def get_master_name(doctype, txt, searchfield, start, page_len, args):
|
def get_master_name(doctype, txt, searchfield, start, page_len, filters):
|
||||||
return webnotes.conn.sql("""select name from `tab%s` where name like '%%%s%%'""" %
|
return webnotes.conn.sql("""select name from `tab%s` where name like '%%%s%%'""" %
|
||||||
(args["master_type"], txt), as_list=1)
|
(filters["master_type"], txt), as_list=1)
|
||||||
|
|
||||||
def get_parent_account(doctype, txt, searchfield, start, page_len, args):
|
def get_parent_account(doctype, txt, searchfield, start, page_len, filters):
|
||||||
return webnotes.conn.sql("""select name from tabAccount
|
return webnotes.conn.sql("""select name from tabAccount
|
||||||
where group_or_ledger = 'Group' and docstatus != 2 and company = '%s'
|
where group_or_ledger = 'Group' and docstatus != 2 and company = '%s'
|
||||||
and name like '%%%s%%'""" % (args["company"], txt))
|
and name like '%%%s%%'""" % (filters["company"], txt))
|
||||||
|
@ -148,7 +148,7 @@ def get_valid_serial_nos(sr_nos, qty=0, item_code=''):
|
|||||||
|
|
||||||
return valid_serial_nos
|
return valid_serial_nos
|
||||||
|
|
||||||
def get_warehouse_list(doctype, txt, searchfield, start, page_len, args):
|
def get_warehouse_list(doctype, txt, searchfield, start, page_len, filters):
|
||||||
"""used in search queries"""
|
"""used in search queries"""
|
||||||
wlist = []
|
wlist = []
|
||||||
for w in webnotes.conn.sql_list("""select name from tabWarehouse
|
for w in webnotes.conn.sql_list("""select name from tabWarehouse
|
||||||
|
Loading…
Reference in New Issue
Block a user