Browse Source

[fix] test

version-14
Rushabh Mehta 9 years ago
parent
commit
3a839fb433
3 changed files with 6 additions and 8 deletions
  1. +2
    -4
      frappe/core/doctype/report/test_report.py
  2. +2
    -2
      frappe/email/doctype/auto_email_report/auto_email_report.json
  3. +2
    -2
      frappe/email/doctype/auto_email_report/auto_email_report.py

+ 2
- 4
frappe/core/doctype/report/test_report.py View File

@@ -25,8 +25,7 @@ class TestReport(unittest.TestCase):
self.assertTrue('User' in [d[0] for d in data])

# test standard report with child table
user_activity_report = '''
{
user_activity_report = '''{
"add_total_row": 0,
"apply_user_permissions": 1,
"disabled": 0,
@@ -42,5 +41,4 @@ user_activity_report = '''
"ref_doctype": "User",
"report_name": "User Activity Report",
"report_type": "Report Builder"
}
'''
}'''

+ 2
- 2
frappe/email/doctype/auto_email_report/auto_email_report.json View File

@@ -2,7 +2,7 @@
"allow_copy": 0,
"allow_import": 0,
"allow_rename": 1,
"autoname": "field:report",
"autoname": "",
"beta": 0,
"creation": "2016-09-01 01:34:34.985457",
"custom": 0,
@@ -369,7 +369,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-09-01 05:21:16.487736",
"modified": "2016-09-01 05:36:00.898683",
"modified_by": "Administrator",
"module": "Email",
"name": "Auto Email Report",


+ 2
- 2
frappe/email/doctype/auto_email_report/auto_email_report.py View File

@@ -67,7 +67,7 @@ class AutoEmailReport(Document):
def get_xls(self, data):
return

def send_daily(self):
def send_daily():
'''Check reports to be sent daily'''
now = frappe.utils.now_datetime()
for report in frappe.get_all('Auto Email Report', {'enabled': 1, 'frequency': ('in', ('Daily', 'Weekly'))}):
@@ -80,7 +80,7 @@ def send_daily(self):

auto_email_report.send()

def send_monthly(self):
def send_monthly():
'''Check reports to be sent monthly'''
for report in frappe.get_all('Auto Email Report', {'enabled': 1, 'frequency': 'Monthly'}):
frappe.get_doc('Auto Email Report', report.name).send()

Loading…
Cancel
Save