details:   https://code.openbravo.com/erp/devel/pi/rev/ee2964a9b565
changeset: 28579:ee2964a9b565
user:      Carlos Aristu <carlos.aristu <at> openbravo.com>
date:      Mon Feb 08 13:04:07 2016 +0100
summary:   related to issue 32091: Covered case when window is opened with a a 
pre-filter

diffstat:

 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-grid.js
 |  11 ++++++++-
 1 files changed, 9 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r d55a1773427b -r ee2964a9b565 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-grid.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-grid.js
      Mon Feb 08 09:33:15 2016 +0100
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-grid.js
      Mon Feb 08 13:04:07 2016 +0100
@@ -185,8 +185,8 @@
       if (me.view && me.view.buttonOwnerView && me.view.buttonOwnerView.tabId) 
{
         dsRequest.params.buttonOwnerViewTabId = me.view.buttonOwnerView.tabId;
       }
-      // Add selected records (if any) when there is not criteria present in 
the request
-      if (dsRequest.originalData && !dsRequest.originalData.criteria && 
me.selectedIds.length > 0) {
+      // Add selected records (if any) when there is not criteria by id field 
present in the request
+      if (me.selectedIds.length > 0 && dsRequest.originalData && 
!me.isCriteriaWithIdField(dsRequest.originalData.criteria)) {
         isc.addProperties(dsRequest.originalData, 
me.addSelectedIDsToCriteria());
       }
       dsRequest.params[OB.Constants.IS_PICK_AND_EDIT] = true;
@@ -512,6 +512,13 @@
     this.Super('handleFilterEditorSubmit', [crit, context]);
   },
 
+  isCriteriaWithIdField: function (criteria) {
+    if (criteria && criteria.find('fieldName', 'id')) {
+      return true;
+    }
+    return false;
+  },
+
   isDataLoaded: function () {
     // When the data is being loaded, every element in the localData array is 
set with the "loading" value
     // So we just need to check the first position of the array

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to