updated patch to delete auto email reports and moved patch to v13 from v12
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index 7822340..da390f5 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -708,5 +708,5 @@
erpnext.patches.v13_0.move_payroll_setting_separately_from_hr_settings #22-06-2020
erpnext.patches.v13_0.check_is_income_tax_component #22-06-2020
erpnext.patches.v12_0.add_taxjar_integration_field
-erpnext.patches.v12_0.delete_report_requested_items_to_order
+erpnext.patches.v13_0.delete_report_requested_items_to_order
erpnext.patches.v12_0.update_item_tax_template_company
diff --git a/erpnext/patches/v12_0/delete_report_requested_items_to_order.py b/erpnext/patches/v12_0/delete_report_requested_items_to_order.py
deleted file mode 100644
index 0296d47..0000000
--- a/erpnext/patches/v12_0/delete_report_requested_items_to_order.py
+++ /dev/null
@@ -1,7 +0,0 @@
-import frappe
-
-def execute():
- frappe.db.sql("""
- DELETE FROM `tabReport`
- WHERE name = 'Requested Items to Order'
- """)
\ No newline at end of file
diff --git a/erpnext/patches/v13_0/delete_report_requested_items_to_order.py b/erpnext/patches/v13_0/delete_report_requested_items_to_order.py
new file mode 100644
index 0000000..94a9fa8
--- /dev/null
+++ b/erpnext/patches/v13_0/delete_report_requested_items_to_order.py
@@ -0,0 +1,12 @@
+import frappe
+
+def execute():
+ """ Check for one or multiple Auto Email Reports and delete """
+ auto_email_reports = frappe.db.get_values("Auto Email Report", {"report": "Requested Items to Order"}, ["name"])
+ for auto_email_report in auto_email_reports:
+ frappe.delete_doc("Auto Email Report", auto_email_report[0])
+
+ frappe.db.sql("""
+ DELETE FROM `tabReport`
+ WHERE name = 'Requested Items to Order'
+ """)
\ No newline at end of file