[patch] Reload RFQ and timesheet before removing customer/supplier roles

This commit is contained in:
Nabin Hait 2016-08-01 15:30:38 +05:30
parent 1d7bd0efb8
commit 5940dc1a8e

View File

@ -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)