From 5940dc1a8ea63aeaaff600a5e1368b45d622826c Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Mon, 1 Aug 2016 15:30:38 +0530 Subject: [PATCH] [patch] Reload RFQ and timesheet before removing customer/supplier roles --- erpnext/patches/v6_20x/remove_customer_supplier_roles.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/erpnext/patches/v6_20x/remove_customer_supplier_roles.py b/erpnext/patches/v6_20x/remove_customer_supplier_roles.py index e5e3d3fc71..f4167bfa4f 100644 --- a/erpnext/patches/v6_20x/remove_customer_supplier_roles.py +++ b/erpnext/patches/v6_20x/remove_customer_supplier_roles.py @@ -2,6 +2,10 @@ from __future__ import unicode_literals import frappe def execute(): + frappe.reload_doc("buying", "doctype", "request_for_quotation_supplier") + frappe.reload_doc("buying", "doctype", "request_for_quotation") + frappe.reload_doc("projects", "doctype", "timesheet") + for role in ('Customer', 'Supplier'): frappe.db.sql('''delete from `tabUserRole` where role=%s and parent in ("Administrator", "Guest")''', role)