mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-20 01:55:01 +00:00
[patch] Reload RFQ and timesheet before removing customer/supplier roles
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user