brotherton-erpnext/erpnext/patches/v5_1/rename_roles.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
414 B
Python
Raw Normal View History

from __future__ import unicode_literals
2015-07-15 11:00:22 +00:00
import frappe
def execute():
2015-07-16 08:46:48 +00:00
if not frappe.db.exists("Role", "Stock User"):
frappe.rename_doc("Role", "Material User", "Stock User")
if not frappe.db.exists("Role", "Stock Manager"):
frappe.rename_doc("Role", "Material Manager", "Stock Manager")
if not frappe.db.exists("Role", "Item Manager"):
2015-07-16 08:46:48 +00:00
frappe.rename_doc("Role", "Material Master Manager", "Item Manager")