mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 08:24:47 +00:00
report permission merge
This commit is contained in:
@@ -2,9 +2,13 @@ import webnotes
|
|||||||
def execute():
|
def execute():
|
||||||
webnotes.reload_doc("core", "doctype", "docperm")
|
webnotes.reload_doc("core", "doctype", "docperm")
|
||||||
webnotes.conn.sql("""update tabDocPerm set `report`=`write`""")
|
webnotes.conn.sql("""update tabDocPerm set `report`=`write`""")
|
||||||
|
|
||||||
|
# no report for singles
|
||||||
webnotes.conn.sql("""update tabDocPerm, tabDocType set tabDocPerm.`report`=0
|
webnotes.conn.sql("""update tabDocPerm, tabDocType set tabDocPerm.`report`=0
|
||||||
where tabDocPerm.`parent` = tabDocType.name
|
where tabDocPerm.`parent` = tabDocType.name
|
||||||
and ifnull(tabDocType.issingle,0) = 1""")
|
and ifnull(tabDocType.issingle,0) = 1""")
|
||||||
|
|
||||||
|
# no submit for not submittables
|
||||||
webnotes.conn.sql("""update tabDocPerm, tabDocType set tabDocPerm.`submit`=0
|
webnotes.conn.sql("""update tabDocPerm, tabDocType set tabDocPerm.`submit`=0
|
||||||
where tabDocPerm.`parent` = tabDocType.name
|
where tabDocPerm.`parent` = tabDocType.name
|
||||||
and ifnull(tabDocType.is_submittable,0) = 0""")
|
and ifnull(tabDocType.is_submittable,0) = 0""")
|
||||||
Reference in New Issue
Block a user