details:   https://code.openbravo.com/erp/devel/pi/rev/1eb8d1da9bb9
changeset: 31636:1eb8d1da9bb9
user:      Inigo Sanchez <inigo.sanchez <at> openbravo.com>
date:      Fri Mar 10 10:15:36 2017 +0100
summary:   Fixed issue 35426: Adaptive filtering does not work for Table 
references.

The problem was that adaptive filtering (filter in client when all data is 
locally available) did
not work for Table references when filtering by text instead of by selecting a 
value in the drop
down list. The issue that causes this regression was not taking into account 
adaptive filtering.

This problem has been fixed by taking into account this case in 
getDisplayProperty method. Now
getDisplayProperty method manages properly when all the data are in the client 
(Adaptive filtering).

diffstat:

 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-fk-filter.js
 |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (23 lines):

diff -r 5985bdee4c4e -r 1eb8d1da9bb9 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-fk-filter.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-fk-filter.js
   Fri Mar 10 09:33:16 2017 +0100
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-fk-filter.js
   Fri Mar 10 10:15:36 2017 +0100
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2011-2016 Openbravo SLU
+ * All portions are Copyright (C) 2011-2017 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -579,7 +579,9 @@
   getDisplayProperty: function () {
     var theGrid = this.grid,
         name = this.name;
-    if (theGrid && name && theGrid.getField(name) && 
theGrid.getField(name).displayProperty) {
+    // it is used willFetchData to identified when adaptive filtering is not 
occurred.
+    // see issue https://issues.openbravo.com/view.php?id=35426
+    if (theGrid && name && theGrid.getField(name) && 
theGrid.getField(name).displayProperty && 
this.form.grid.sourceWidget.willFetchData()) {
       return name + OB.Constants.FIELDSEPARATOR + 
theGrid.getField(name).displayProperty;
     }
     return null;

------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to