details:   /erp/devel/pi/rev/2ae32d58a8c6
changeset: 10736:2ae32d58a8c6
user:      Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
date:      Thu Feb 17 11:49:02 2011 +0100
summary:   [OBUISEL] Default filter expression always applied on selectors 
picklists.

diffstat:

 
modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/SelectorDataSourceFilter.java
 |  4 +++-
 src/org/openbravo/erpCommon/info/PriceListVersionFilterExpression.java         
                                     |  2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 2a9e5df19d2b -r 2ae32d58a8c6 
modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/SelectorDataSourceFilter.java
--- 
a/modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/SelectorDataSourceFilter.java
       Thu Feb 17 11:41:35 2011 +0100
+++ 
b/modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/SelectorDataSourceFilter.java
       Thu Feb 17 11:49:02 2011 +0100
@@ -205,7 +205,9 @@
         // If the this code change, make sure you check the getWhereClause 
method of the
         // QueryBuilder. Check issue 
https://issues.openbravo.com/view.php?id=14239
 
-        if (String.class == property.getPrimitiveObjectType()) {
+        if (!property.isPrimitive()) {
+          sb.append("e." + sf.getProperty() + ".id = '" + result.toString() + 
"'");
+        } else if (String.class == property.getPrimitiveObjectType()) {
           if (textMatching == TextMatching.exact) {
             sb.append(sf.getProperty() + " = '" + result.toString() + "'");
           } else if (textMatching == TextMatching.startsWith) {
diff -r 2a9e5df19d2b -r 2ae32d58a8c6 
src/org/openbravo/erpCommon/info/PriceListVersionFilterExpression.java
--- a/src/org/openbravo/erpCommon/info/PriceListVersionFilterExpression.java    
Thu Feb 17 11:41:35 2011 +0100
+++ b/src/org/openbravo/erpCommon/info/PriceListVersionFilterExpression.java    
Thu Feb 17 11:49:02 2011 +0100
@@ -38,7 +38,7 @@
     Date date = getDate();
     PriceListVersion priceListVersion = getPriceListVersion(priceList, date);
     if (priceListVersion != null) {
-      return priceListVersion.getIdentifier();
+      return priceListVersion.getId();
     }
     return "";
   }

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to