blob: d57f0def05817abc49b606164bc9a8c1cd5f6d4f [file] [log] [blame]
Rushabh Mehta3966f1d2012-02-23 12:35:32 +05301# ERPNext - web based ERP (http://erpnext.com)
2# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
3#
4# This program is free software: you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by
6# the Free Software Foundation, either version 3 of the License, or
7# (at your option) any later version.
8#
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with this program. If not, see <http://www.gnu.org/licenses/>.
16
Rushabh Mehtad0251332012-02-21 17:26:50 +053017import webnotes
18
19@webnotes.whitelist()
20def get_report_list(arg=None):
21 """return list of reports for the given module module"""
22 webnotes.response['values'] = webnotes.conn.sql("""select
23 distinct criteria_name, doc_type, parent_doc_type
24 from `tabSearch Criteria`
25 where module='%(module)s'
Rushabh Mehta12852e72012-02-29 15:11:06 +053026 and docstatus in (0, NULL)
27 and ifnull(disabled, 0) = 0
Rushabh Mehtad0251332012-02-21 17:26:50 +053028 order by criteria_name
29 limit %(limit_start)s, %(limit_page_length)s""" % webnotes.form_dict, as_dict=True)