diff --git a/erpnext/setup/install.py b/erpnext/setup/install.py index 0ea769163be7..3407b4377f3d 100644 --- a/erpnext/setup/install.py +++ b/erpnext/setup/install.py @@ -33,6 +33,7 @@ def after_install(): add_standard_navbar_items() add_app_name() add_non_standard_user_types() + update_roles() frappe.db.commit() @@ -237,6 +238,12 @@ def create_custom_role(data): ).insert(ignore_permissions=True) +def update_roles(): + website_user_roles = ("Customer", "Supplier") + for role in website_user_roles: + frappe.db.set_value("Role", role, "desk_access", 0) + + def create_user_type(user_type, data): if frappe.db.exists("User Type", user_type): doc = frappe.get_cached_doc("User Type", user_type)