diff --git a/src/main/java/org/spin/base/db/WhereClauseUtil.java b/src/main/java/org/spin/base/db/WhereClauseUtil.java index 28e59021a..dc6a04962 100644 --- a/src/main/java/org/spin/base/db/WhereClauseUtil.java +++ b/src/main/java/org/spin/base/db/WhereClauseUtil.java @@ -803,7 +803,7 @@ public static String getBrowserWhereClauseFromCriteria(MBrowse browser, Criteria String rangeColumnName = columnName.substring(0, columnName.length() - "_To".length()); browseField = browseFields.get(rangeColumnName); } - if (browseField == null) { + if (browseField == null || browseField.isInfoOnly()) { return; } MViewColumn viewColumn = browseField.getAD_View_Column(); @@ -829,9 +829,9 @@ public static String getBrowserWhereClauseFromCriteria(MBrowse browser, Criteria .orElse(Condition.newBuilder().build()) ; valueTo = conditionEnd.getValue(); - operatorValue = conditionEnd.getOperatorValue(); + operatorTo = conditionEnd.getOperatorValue(); if (conditionStart.getOperatorValue() > 0 && operatorValue == Operator.VOID_VALUE) { - operatorValue = conditionStart.getOperatorValue(); + operatorTo = conditionStart.getOperatorValue(); } } diff --git a/src/main/java/org/spin/grpc/service/UserInterfaceServiceImplementation.java b/src/main/java/org/spin/grpc/service/UserInterfaceServiceImplementation.java index ee7f6b6a6..3be7f7e1b 100644 --- a/src/main/java/org/spin/grpc/service/UserInterfaceServiceImplementation.java +++ b/src/main/java/org/spin/grpc/service/UserInterfaceServiceImplementation.java @@ -2928,8 +2928,10 @@ private ListBrowserItemsResponse.Builder listBrowserItems(ListBrowserItemsReques throw new AdempiereException("@AD_Browse_ID@ @WhereClause@ @Unparseable@"); } whereClause - .append(" AND ") - .append(parsedWhereClause); + .append(" AND (") + .append(parsedWhereClause) + .append(")") + ; } // For dynamic condition