diff --git a/frappe/email/doctype/auto_email_report/auto_email_report.json b/frappe/email/doctype/auto_email_report/auto_email_report.json index 7578ffef67..2fbde764e8 100644 --- a/frappe/email/doctype/auto_email_report/auto_email_report.json +++ b/frappe/email/doctype/auto_email_report/auto_email_report.json @@ -143,6 +143,34 @@ "set_only_once": 0, "unique": 0 }, + { + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "default": "100", + "description": "Max 500", + "fieldname": "no_of_rows", + "fieldtype": "Int", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_list_view": 0, + "label": "No of Rows", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, { "allow_on_submit": 0, "bold": 0, @@ -445,7 +473,7 @@ "issingle": 0, "istable": 0, "max_attachments": 0, - "modified": "2016-09-15 01:32:57.454880", + "modified": "2016-09-22 07:31:59.959051", "modified_by": "Administrator", "module": "Email", "name": "Auto Email Report", diff --git a/frappe/email/doctype/auto_email_report/auto_email_report.py b/frappe/email/doctype/auto_email_report/auto_email_report.py index fc6fe8d123..12ac2ba1df 100644 --- a/frappe/email/doctype/auto_email_report/auto_email_report.py +++ b/frappe/email/doctype/auto_email_report/auto_email_report.py @@ -42,7 +42,7 @@ class AutoEmailReport(Document): def get_report_content(self): '''Returns file in for the report in given format''' report = frappe.get_doc('Report', self.report) - raw = report.get_data(limit=500, user = self.user, filters = self.filters) + raw = report.get_data(limit=self.no_of_rows or 100, user = self.user, filters = self.filters) if self.format == 'HTML': return self.get_html_table(raw)