Merge pull request #179 from anandpdoshi/master

Changes in Permission Manager to exclude doctype of 'Core' module and also mark Profile as not in create
This commit is contained in:
Anand Doshi 2011-12-23 00:21:53 -08:00
commit 8d53f7635a
2 changed files with 11 additions and 1 deletions

View File

@ -0,0 +1,10 @@
import webnotes
def execute():
"""
Mark DocType Profile as 'not_in_create'
"""
webnotes.conn.sql("""
UPDATE `tabDocType`
SET in_create=1
WHERE name='Profile'
""")

View File

@ -30,7 +30,7 @@ class DocType:
WHERE ifnull(docstatus,0)=0
AND ifnull(istable,0)=0
AND ifnull(issingle,0)=0
AND `module` NOT IN ('System','Utilities','Setup Masters','Roles','Recycle Bin','Mapper','Application Internal','Development')
AND `module` NOT IN ('System','Utilities','Setup Masters','Roles','Recycle Bin','Mapper','Application Internal','Development', 'Core')
ORDER BY `name` ASC""")
rl = [''] + [a[0] for a in sql("select name from tabRole where ifnull(docstatus,0)=0")]