details:   https://code.openbravo.com/erp/devel/pi/rev/1e69815c84cb
changeset: 32612:1e69815c84cb
user:      Inigo Sanchez <inigo.sanchez <at> openbravo.com>
date:      Fri Sep 01 14:15:27 2017 +0200
summary:   Related with the issue 36598: now selectors are working as expected 
in P&E

Selecting multiple records and opening the process with a selector in the 'P&E' 
it is
failing.

The problem has been fixed by take into account this case. Now when the 
selector is open
shows records in the tree of all orgs current role has access instead of 
records in the
org tree of the last selected record.

diffstat:

 
modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
 |  10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diffs (27 lines):

diff -r 708d0981673d -r 1e69815c84cb 
modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
--- 
a/modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
      Fri Sep 01 12:26:19 2017 -0400
+++ 
b/modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
      Fri Sep 01 14:15:27 2017 +0200
@@ -1204,6 +1204,14 @@
       }
     }
 
+    function multipleRecordsSelected() {
+      // Check if multiple records are selected in the parent grid
+      if (selector && selector.view && selector.view.buttonOwnerView && 
selector.view.buttonOwnerView.lastRecordSelectedCount > 1) {
+        return true;
+      }
+      return false;
+    }
+
     // on purpose not passing the third boolean param
     if (selector.form && selector.form.view && 
selector.form.view.getContextInfo) {
       // for table and table dir reference values needs to be transformed to 
classic (ex.: true -> Y)
@@ -1242,7 +1250,7 @@
     }
 
     // also add the special ORG parameter
-    if (params.inpadOrgId) {
+    if (params.inpadOrgId && !multipleRecordsSelected()) {
       params[OB.Constants.ORG_PARAMETER] = params.inpadOrgId;
     } else {
       params[OB.Constants.CALCULATE_ORGS] = true;

------------------------------------------------------------------------------
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

Reply via email to