Merge pull request #5951 from nabinhait/patch_fix_104

[patch] Reload RFQ and timesheet before removing customer/supplier roles
This commit is contained in:
Nabin Hait 2016-08-01 16:15:47 +05:30 committed by GitHub
commit 6f84026c24

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)