CI: merge back from main
authorRM packaging bot <staff.rm@openbravo.com>
Fri, 27 Jun 2014 02:06:00 +0000
changeset 23900 fd1da571f9c6
parent 23898 3a8c5c367630 (diff)
parent 23899 c5640d5a10d4 (current diff)
child 23921 74989e97593a
CI: merge back from main
src-db/database/sourcedata/AD_MODULE.xml
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/BaseKernelServlet.java	Fri Jun 27 01:30:43 2014 +0000
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/BaseKernelServlet.java	Fri Jun 27 02:06:00 2014 +0000
@@ -69,8 +69,12 @@
     if (localResponse.getRedirectTarget() != null) {
       if (!response.isCommitted()) {
         // will this always work.... not if the writer is already closed
-        response.getWriter().write(
-            "window.location.href = '" + localResponse.getRedirectTarget() + "';");
+        String referer = RequestContext.get().getRequest().getHeader("referer");
+        // if we don't get the original url, redirect to the ERP
+        if (referer == null) {
+          referer = localResponse.getRedirectTarget();
+        }
+        response.getWriter().write("window.location.href = '" + referer + "';");
         response.setHeader("Content-Type", KernelConstants.JAVASCRIPT_CONTENTTYPE);
         // prevent caching
         response.setHeader(RESPONSE_HEADER_ETAG, "" + System.currentTimeMillis());
--- a/src-db/database/sourcedata/AD_MODULE.xml	Fri Jun 27 01:30:43 2014 +0000
+++ b/src-db/database/sourcedata/AD_MODULE.xml	Fri Jun 27 02:06:00 2014 +0000
@@ -22,7 +22,7 @@
 <!--0-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--0-->  <HASREFERENCEDATA><![CDATA[Y]]></HASREFERENCEDATA>
 <!--0-->  <REFERENCEDATAINFO><![CDATA[Standard document types for orders, invoices, etc. and settings]]></REFERENCEDATAINFO>
-<!--0-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
+<!--0-->  <VERSION_LABEL><![CDATA[dev]]></VERSION_LABEL>
 <!--0-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--0-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--0--></AD_MODULE>