brotherton-erpnext/erpnext/patches/v4_0/reset_permissions_for_masters.py
Aditya Hase 6ccb6562f1 Python 3 compatibility syntax error fixes (#10519)
* Use Python 3 style print function

* Use 'Exception as e' instead of 'Exception, e'

* Unpack tuple arguments explicitly in instead of relying on auto unpacking

* Use consistent indentation

* Use 0 if stock_frozen_upto_days is None
2017-08-28 18:17:36 +05:30

21 lines
935 B
Python

# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import print_function, 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",
"Communication", "Company", "Contact Us Settings",
"Country", "Currency", "Currency Exchange", "Deduction Type", "Department",
"Designation", "Earning Type", "Event", "Feed", "File", "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