Changed implicit filter and to or
authorMartin Taal <martin.taal@openbravo.com>
Wed, 26 Jan 2011 12:59:48 +0100
changeset 10142 db63f6c4a29b
parent 10141 27b5cc218e46
child 10143 e4c2e77c6eb5
Changed implicit filter and to or
modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewGridComponent.java
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewGridComponent.java	Wed Jan 26 12:51:16 2011 +0100
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewGridComponent.java	Wed Jan 26 12:59:48 2011 +0100
@@ -97,11 +97,12 @@
     final Entity entity = ModelProvider.getInstance().getEntityByTableId(
         (String) DalUtil.getId(tab.getTable()));
     if (entity.hasProperty(Order.PROPERTY_PROCESSED)) {
-      transactionalFilter += " and e.processed = false ";
+      transactionalFilter += " or e.processed = false ";
     }
+    transactionalFilter = " (" + transactionalFilter + ") ";
 
     if (filterClause.length() > 0) {
-      return " ((" + transactionalFilter + ") and (" + filterClause + ")) ";
+      return " (" + transactionalFilter + " and (" + filterClause + ")) ";
     }
     return transactionalFilter;
   }