# HG changeset patch
# User Martin Taal <martin.taal@openbravo.com>
# Date 1321545937 -3600
# Node ID 3fe117772a756037b59d1a5bab9ff9db9f6006d3
# Parent  bee1528a5966a4681a86ed0c9f7129f8f8818ab1
Fixes issue 19086: Selectors in APRM manual windows does not filter when you start typing (they show all records)

diff --git a/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js b/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js
--- a/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js
+++ b/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js
@@ -655,16 +655,11 @@
 // Allow searchs (with full dataset in memory/the datasource) not distinguish
 // between accent or non-accent words
 isc.DataSource.addProperties({
-  
   // workaround for this issue:
   // http://forums.smartclient.com/showthread.php?p=75186#post75186
   // https://issues.openbravo.com/view.php?id=18841
   compareAdvancedCriteria: function(newCriterion, oldCriterion) {
-    // simple check...
-    if (newCriterion === oldCriterion) {
-      return 0;
-    }
-    return 1;
+    return -1;
   },
   
   _fieldMatchesFilter: isc.DataSource.getPrototype().fieldMatchesFilter,
