details: https://code.openbravo.com/erp/devel/pi/rev/639a31dffd9c changeset: 33049:639a31dffd9c user: Carlos Aristu <carlos.aristu <at> openbravo.com> date: Mon Nov 27 19:16:22 2017 +0100 summary: fixes bug 37399: Duplicated DS calls having the tree view shown in a sub-tab
Fix for issue #35545 was intended to force a datasource call when the fetchData does not perform it. This function has a mechanism that avoids DS calls when the grid criteria i not being changed. But when the criteria indeed changes two DS request was being fired: the one that we are forcing and the other one fired by the fetchData function. To avoid this problem we are forcing the DS call just when the grid criteria has not changed. diffstat: modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r f199514d7b6f -r 639a31dffd9c modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js --- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js Mon Nov 27 16:47:46 2017 +0100 +++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js Mon Nov 27 19:16:22 2017 +0100 @@ -1275,7 +1275,7 @@ } if (this.treeGrid && this.isShowingTree) { - if (this.treeGrid.data) { + if (this.treeGrid.data && !this.treeGrid.willFetchData(this.treeGrid.getCriteria())) { // Force to do a datasource call keeping the current criteria this.treeGrid.data.invalidateCache(); } ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits