From dc95c150026913b63a9d7dfd326ce7b28aeffa58 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 7 Feb 2013 12:08:38 +0530 Subject: [PATCH] changed args to filters in get_query --- accounts/doctype/account/account.js | 4 ++-- accounts/doctype/account/account.py | 8 ++++---- stock/utils.py | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/accounts/doctype/account/account.js b/accounts/doctype/account/account.js index 77386823e4..db50ff6ac8 100644 --- a/accounts/doctype/account/account.js +++ b/accounts/doctype/account/account.js @@ -120,7 +120,7 @@ cur_frm.fields_dict['master_name'].get_query = function(doc) { if (doc.master_type) { return { 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) { return { query: "accounts.doctype.account.account.get_parent_account", - args: { "company": doc.company} + filters: { "company": doc.company} } } diff --git a/accounts/doctype/account/account.py b/accounts/doctype/account/account.py index 0e3ace19fb..ac8339c781 100644 --- a/accounts/doctype/account/account.py +++ b/accounts/doctype/account/account.py @@ -200,11 +200,11 @@ class DocType: 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%%'""" % - (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 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)) diff --git a/stock/utils.py b/stock/utils.py index 3b98cf0683..62c2a1794f 100644 --- a/stock/utils.py +++ b/stock/utils.py @@ -148,7 +148,7 @@ def get_valid_serial_nos(sr_nos, qty=0, item_code=''): 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""" wlist = [] for w in webnotes.conn.sql_list("""select name from tabWarehouse