details: https://code.openbravo.com/erp/devel/pi/rev/97035bb00ab3 changeset: 28700:97035bb00ab3 user: Inigo Sanchez <inigo.sanchez <at> openbravo.com> date: Mon Mar 07 11:31:44 2016 +0100 summary: Fixes issue 32396: cannot filter grid when it is grouped by a column.
Having a column grouped, if a filter was applied in a grid, it was not possible to apply it.A js error was thrown: Uncaught TypeError: this.data.willFetchData is not a function. The problem was in:"this.data.willFetchData(....))" statement which incorrectly assumed this.data to be an object and willFetchData a function within it. This is not true when in this situation where this.data is a Tree class. It has been fixed by taking into account this case by checking that "this.data" defines the function. diffstat: modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r 5b66fdb72036 -r 97035bb00ab3 modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js --- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js Fri Jul 31 12:59:08 2015 +0530 +++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js Mon Mar 07 11:31:44 2016 +0100 @@ -2036,7 +2036,7 @@ callback = function () { delete me.isFilteringExternally; }; - if (isc.isAn.Array(this.data) || this.data.willFetchData(this.convertCriteria(criteria))) { + if (isc.isAn.Array(this.data) || (this.data.willFetchData && this.data.willFetchData(this.convertCriteria(criteria)))) { // Use this flag when a filter editor submit results a datasource request // This flag will be used to prevent unneeded datasource requests, see https://issues.openbravo.com/view.php?id=29896 // this.data is an empty array in case of lazy filtering is set and no data ------------------------------------------------------------------------------ Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://makebettercode.com/inteldaal-eval _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits