diff --git a/base/src/org/compiere/model/GridTabVO.java b/base/src/org/compiere/model/GridTabVO.java index 70cce8dec5..53813d3e67 100644 --- a/base/src/org/compiere/model/GridTabVO.java +++ b/base/src/org/compiere/model/GridTabVO.java @@ -194,6 +194,10 @@ public class GridTabVO implements Evaluatee, Serializable //jz col=null not good for Derby if (vo.WhereClause.indexOf("=null")>0) vo.WhereClause.replaceAll("=null", " IS NULL "); + // Where Clauses should be surrounded by parenthesis - teo_sarca, BF [ 1982327 ] + if (vo.WhereClause.trim().length() > 0) { + vo.WhereClause = "("+vo.WhereClause+")"; + } vo.OrderByClause = rs.getString("OrderByClause"); if (vo.OrderByClause == null)