Fixes Issue 29962:Wrong storage bin can be selected in Pending Goods Receipt
authorAtul Gaware <atul.gaware@openbravo.com>
Wed, 27 May 2015 01:29:05 +0530
changeset 26828 7eae99f7fe79
parent 26827 d73cfed50b6e
child 26829 0b60872f78f5
Fixes Issue 29962:Wrong storage bin can be selected in Pending Goods Receipt
window

inpadOrgId is passed as a input parameter to filter locator in onloadfunctions
method. Session variable Locator.adorgid is set to this parameter value.
src/org/openbravo/erpCommon/ad_forms/MaterialReceiptPending.html
src/org/openbravo/erpCommon/info/Locator.java
--- a/src/org/openbravo/erpCommon/ad_forms/MaterialReceiptPending.html	Tue Jun 02 14:39:07 2015 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/MaterialReceiptPending.html	Wed May 27 01:29:05 2015 +0530
@@ -137,7 +137,7 @@
 		if(listInputs[i].id == 'M_Locator_ID'){
 			var name  = listInputs[i].name;
 			var id = name.substring(13, name.length);
-			keyArray[keyArray.length] = new keyArrayItem("ENTER", "openSearch(null, null, '../info/Locator.html', 'LOCATOR_SELECTOR', false, 'frmMain', 'inpmLocatorId"+id+"', 'inpmLocatorId_D"+id+"', document.frmMain.inpmLocatorId_D"+id+".value, 'Command', 'KEY');", "inpmLocatorId_D"+id+"", "null");
+			keyArray[keyArray.length] = new keyArrayItem("ENTER", "openSearch(null, null, '../info/Locator.html', 'LOCATOR_SELECTOR', false, 'frmMain', 'inpmLocatorId"+id+"', 'inpmLocatorId_D"+id+"', document.frmMain.inpmLocatorId_D"+id+".value, 'inpadOrgId', document.frmMain.inpadOrgId"+id+".value, 'Command', 'KEY');", "inpmLocatorId_D"+id+"", "null");
 		}
 	}
 }
--- a/src/org/openbravo/erpCommon/info/Locator.java	Tue Jun 02 14:39:07 2015 +0200
+++ b/src/org/openbravo/erpCommon/info/Locator.java	Wed May 27 01:29:05 2015 +0530
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2011 Openbravo SLU 
+ * All portions are Copyright (C) 2001-2015 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -75,7 +75,7 @@
       vars.setSessionValue("Locator.name", strName);
       vars.setSessionValue("Locator.warehousename", strWarehouse);
       String strOrg = vars.getGlobalVariable("inpadOrgId", "Locator.adorgid", "");
-
+      vars.setSessionValue("Locator.adorgid", strOrg);
       if ("".equals(strOrg) || strOrg == null) {
         if ("184".equals(windowId) || "169".equals(windowId) || "800013".equals(windowId)
             || "800014".equals(windowId)) {
@@ -105,6 +105,7 @@
       vars.setSessionValue("Locator.name", strKeyValue);
       vars.setSessionValue("Locator.warehousename", LocatorData.selectname(this, strWarehouse));
       String strOrg = vars.getStringParameter("inpadOrgId");
+      vars.setSessionValue("Locator.adorgid", strOrg);
       if ("".equals(strOrg) || strOrg == null) {
         strOrg = vars.getStringParameter("paramOrgTree");
       }