From be7db9ec3b34aa512a7aa77ca18de62e9085d2d5 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Wed, 5 Dec 2012 15:53:40 +0530 Subject: [PATCH] fix in IN filter of reportview --- webnotes/widgets/reportview.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webnotes/widgets/reportview.py b/webnotes/widgets/reportview.py index 3891eea4e1..636aacfff8 100644 --- a/webnotes/widgets/reportview.py +++ b/webnotes/widgets/reportview.py @@ -176,6 +176,7 @@ def build_filter_conditions(data, filters, conditions): if f[2]=='in': opts = ["'" + t.strip().replace("'", "\'") + "'" for t in f[3].split(',')] f[3] = "(" + ', '.join(opts) + ")" + conditions.append(tname + '.' + f[1] + " " + f[2] + " " + f[3]) else: if isinstance(f[3], basestring): f[3] = "'" + f[3].replace("'", "\'") + "'" @@ -183,7 +184,7 @@ def build_filter_conditions(data, filters, conditions): else: conditions.append('ifnull(' + tname + '.' + f[1] + ",0) " + f[2] \ + " " + cstr(f[3])) - + def build_match_conditions(data, conditions): """add match conditions if applicable""" match_conditions = []