clear item cache on update of certain docs

This commit is contained in:
Anand Doshi 2012-03-20 17:30:31 +05:30
parent 12b6da2614
commit 986caee03d

View File

@ -180,6 +180,11 @@ class DocType:
sql("delete from tabDocPerm where parent = %s and role = %s and ifnull(permlevel,0) = %s",(parent, role, cint(permlevel))) sql("delete from tabDocPerm where parent = %s and role = %s and ifnull(permlevel,0) = %s",(parent, role, cint(permlevel)))
sql("update tabDocType set modified = %s where name = %s",(now(), parent)) sql("update tabDocType set modified = %s where name = %s",(now(), parent))
from webnotes.utils.cache import CacheItem
CacheItem(parent).clear()
msgprint("Permissions Updated") msgprint("Permissions Updated")
# Get Fields based on DocType and Permlevel # Get Fields based on DocType and Permlevel