details:   https://code.openbravo.com/erp/devel/pi/rev/3b92f8d1358a
changeset: 18066:3b92f8d1358a
user:      Augusto Mauch <augusto.mauch <at> openbravo.com>
date:      Thu Sep 27 19:37:28 2012 +0200
summary:   Fixes issue 21741: Pick&Execute under some circumstances is not 
retrieving the selected record ID

The root cause of this problem is that the context information was getting 
retrieved from the header tab, instead of the tab that was selected when the 
pick a
nd execute window was selected. Another change has been done so that that same 
tab will be selected when the P&E window is closed, otherwise the record could 
not be refreshed, because the row ID saved in the window belong to the tab that 
was focused when the P&E window was opened.

diffstat:

 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js
          |  3 ++-
 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-view.js
 |  5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r ea59c08f2c51 -r 3b92f8d1358a 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js
       Thu Sep 27 19:13:09 2012 +0200
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js
       Thu Sep 27 19:37:28 2012 +0200
@@ -262,7 +262,8 @@
         if (processClass) {
           this.selectedState = this.activeView && this.activeView.viewGrid && 
this.activeView.viewGrid.getSelectedState();
           this.runningProcess = processClass.create(isc.addProperties({}, 
params, {
-            parentWindow: this
+            parentWindow: this,
+            sourceView: this.activeView
           }));
 
           this.openPopupInTab(this.runningProcess, params.windowTitle, 
(this.runningProcess.popupWidth ? this.runningProcess.popupWidth : '90%'), 
(this.runningProcess.popupHeight ? this.runningProcess.popupHeight : '90%'), 
(this.runningProcess.showMinimizeButton ? 
this.runningProcess.showMinimizeButton : false), 
(this.runningProcess.showMaximizeButton ? 
this.runningProcess.showMaximizeButton : false), true, true);
diff -r ea59c08f2c51 -r 3b92f8d1358a 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-view.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-view.js
      Thu Sep 27 19:13:09 2012 +0200
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-view.js
      Thu Sep 27 19:37:28 2012 +0200
@@ -202,6 +202,8 @@
       window.view.messageBar.setMessage(message.severity, message.text);
     }
 
+    this.sourceView.setAsActiveView();
+
     if (refresh) {
       window.refresh();
     }
@@ -317,8 +319,7 @@
   doProcess: function (btnValue) {
     var i, tmp, view = this,
         grid = view.viewGrid,
-        activeView = view.parentWindow && view.parentWindow.activeView,
-        allProperties = activeView.getContextInfo(false, true, false, true) || 
{},
+        allProperties = this.sourceView.getContextInfo(false, true, false, 
true) || {},
         selection = grid.getSelectedRecords() || [],
         len = selection.length,
         allRows = grid.data.allRows || grid.data;

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to