浏览代码

Load extra doctypes while building filter conditions

version-14
Nabin Hait 11 年前
父节点
当前提交
8e1a96e6de
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. +4
    -2
      webnotes/widgets/reportview.py

+ 4
- 2
webnotes/widgets/reportview.py 查看文件

@@ -169,12 +169,14 @@ def build_filter_conditions(filters, conditions):
if isinstance(f, basestring): if isinstance(f, basestring):
conditions.append(f) conditions.append(f)
else: else:
tname = ('`tab' + f[0] + '`') tname = ('`tab' + f[0] + '`')
if not tname in webnotes.local.reportview_tables: if not tname in webnotes.local.reportview_tables:
webnotes.local.reportview_tables.append(tname) webnotes.local.reportview_tables.append(tname)
if not hasattr(webnotes.local, "reportview_doctypes"):
load_doctypes()
if not hasattr(webnotes.local, "reportview_doctypes") \
or not webnotes.local.reportview_doctypes.has_key(tname):
load_doctypes()
# prepare in condition # prepare in condition
if f[2] in ['in', 'not in']: if f[2] in ['in', 'not in']:


正在加载...
取消
保存