From f2c9fd28e87183450d0d1dd6804cb0eb9f19c7b8 Mon Sep 17 00:00:00 2001 From: Makarand Bauskar Date: Wed, 5 Jul 2017 12:07:34 +0530 Subject: [PATCH] [minor] reload auto email report doctype before settings format to xlsx (#3613) --- .../patches/v8_1/update_format_options_in_auto_email_report.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frappe/patches/v8_1/update_format_options_in_auto_email_report.py b/frappe/patches/v8_1/update_format_options_in_auto_email_report.py index 1061d18b07..04bc9c0581 100644 --- a/frappe/patches/v8_1/update_format_options_in_auto_email_report.py +++ b/frappe/patches/v8_1/update_format_options_in_auto_email_report.py @@ -7,6 +7,8 @@ import frappe def execute(): """ change the XLS option as XLSX in the auto email report """ + frappe.reload_doc("email", "doctype", "auto_email_report") + auto_email_list = frappe.get_all("Auto Email Report", filters={"format": "XLS"}) for auto_email in auto_email_list: doc = frappe.get_doc("Auto Email Report", auto_email.name)