瀏覽代碼

[fix] [minor] [report] do not allow report for child tables, since child table fields can be selected in main doctype's report

version-14
Anand Doshi 12 年之前
父節點
當前提交
326d2dee43
共有 1 個檔案被更改,包括 0 行新增10 行删除
  1. +0
    -10
      webnotes/profile.py

+ 0
- 10
webnotes/profile.py 查看文件

@@ -37,17 +37,8 @@ class Profile:
self.doctype_map = {}
for r in webnotes.conn.sql("""select name, in_create, issingle, istable,
read_only, module from tabDocType""", as_dict=1):
r['child_tables'] = []
self.doctype_map[r['name']] = r
for r in webnotes.conn.sql("""select parent, options from tabDocField
where fieldtype="Table"
and parent not like "old_parent:%%"
and ifnull(docstatus,0)=0
"""):
if r[0] in self.doctype_map:
self.doctype_map[r[0]]['child_tables'].append(r[1])
def build_perm_map(self):
"""build map of permissions at level 0"""
@@ -100,7 +91,6 @@ class Profile:
if (p.get('read') or p.get('write') or p.get('create')):
if p.get('report'):
self.can_get_report.append(dt)
self.can_get_report += dtp['child_tables']
if not dtp.get('istable'):
if not dtp.get('issingle') and not dtp.get('read_only'):
self.can_search.append(dt)


Loading…
取消
儲存