Fixes Issue 22627. Checks before the Organization at Document Level.
authorDavid Miguelez <david.miguelez@openbravo.com>
Wed, 30 Jan 2013 20:57:51 +0100
changeset 19526 2a17ea3bee3a
parent 19525 388afb7bcd0d
child 19527 bcabcc4c3b37
Fixes Issue 22627. Checks before the Organization at Document Level.
src/org/openbravo/erpCommon/info/Locator.java
--- a/src/org/openbravo/erpCommon/info/Locator.java	Wed Jan 30 18:02:39 2013 +0100
+++ b/src/org/openbravo/erpCommon/info/Locator.java	Wed Jan 30 20:57:51 2013 +0100
@@ -71,6 +71,12 @@
       vars.setSessionValue("Locator.warehousename", strWarehouse);
       String strOrg = vars.getGlobalVariable("inpadOrgId", "Locator.adorgid", "");
       if ("".equals(strOrg) || strOrg == null) {
+        if ("184".equals(windowId) || "169".equals(windowId) || "800013".equals(windowId)
+            || "800014".equals(windowId)) {
+          strOrg = vars.getGlobalVariable("inpadOrgId", "CreateFrom|adOrgId", "");
+        }
+      }
+      if ("".equals(strOrg) || strOrg == null) {
         strOrg = vars.getStringParameter("paramOrgTree");
       }
       printPage(response, vars, strName, strWarehouse, strOrg);