brotherton-erpnext/erpnext/patches/v4_0/reset_permissions_for_masters.py
Rushabh Mehta ee4b8bee33 Revert "[patches] removed 4.0 patches"
This reverts commit 6f7cba8d730bcc3a7ac6d7102cce0a8369419956.
2014-12-31 15:01:48 +05:30

21 lines
937 B
Python

# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
from frappe.permissions import reset_perms
def execute():
for doctype in ("About Us Settings", "Accounts Settings", "Activity Type",
"Blog Category", "Blog Settings", "Blogger", "Branch", "Brand", "Buying Settings",
"Comment", "Communication", "Company", "Contact Us Settings",
"Country", "Currency", "Currency Exchange", "Deduction Type", "Department",
"Designation", "Earning Type", "Event", "Feed", "File Data", "Fiscal Year",
"HR Settings", "Industry Type", "Leave Type", "Letter Head",
"Mode of Payment", "Module Def", "Naming Series", "POS Setting", "Print Heading",
"Report", "Role", "Selling Settings", "Stock Settings", "Supplier Type", "UOM"):
try:
reset_perms(doctype)
except:
print "Error resetting perms for", doctype
raise