CI: merge back from main
authorRM packaging bot <staff.rm@openbravo.com>
Thu, 27 Mar 2014 15:17:05 +0000
changeset 22788 30ded626418e
parent 22786 c3781ce65bea (diff)
parent 22787 ab1988a067e8 (current diff)
child 22789 deb55110426b
CI: merge back from main
src-db/database/sourcedata/AD_MODULE.xml
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/GlobalMenu.java	Thu Mar 27 15:00:39 2014 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/GlobalMenu.java	Thu Mar 27 15:17:05 2014 +0000
@@ -83,7 +83,7 @@
     String menuKey = language + tree.getId();
     if (menuOptionsByLangAndTree.get(menuKey) == null) {
       menuOptionsByLangAndTree.put(menuKey, createInitialMenuList(tree, language));
-      log.info("Generating menu took " + (System.currentTimeMillis() - t));
+      log.debug("Generating menu took " + (System.currentTimeMillis() - t));
       t = System.currentTimeMillis();
     } else {
       log.debug("Using cached menu for tree and language");
@@ -105,7 +105,7 @@
       menuOption.setParentMenuOption(menuOptionsByMenuId);
     }
 
-    log.debug("Getting a copy of globally cached menu took {} ms", System.currentTimeMillis());
+    log.debug("Getting a copy of globally cached menu took {} ms", System.currentTimeMillis() - t);
     return newOptions;
   }
 
@@ -274,7 +274,7 @@
    * Invalidates menu cache. To be invoked when the menu changes.
    */
   public void invalidateCache() {
-    log.info("Invalidating menu cache");
+    log.debug("Invalidating menu cache");
     menuOptionsByLangAndTree = new HashMap<String, List<MenuOption>>();
     cacheTimeStamp = System.currentTimeMillis();
   }
--- a/src-db/database/model/functions/MA_PRODUCTION_COST.xml	Thu Mar 27 15:00:39 2014 +0000
+++ b/src-db/database/model/functions/MA_PRODUCTION_COST.xml	Thu Mar 27 15:17:05 2014 +0000
@@ -114,8 +114,8 @@
         , M_PRODUCTIONPLAN pp
       WHERE pr.m_production_id = p_Production_ID
         AND pr.m_production_id = pp.m_production_id
-        AND pp.m_productionplan_id = pl.m_productionplan_id
-        AND pl.calculated = 'N';
+        AND pp.m_productionplan_id = pl.m_productionplan_id;
+      v_costingdate := COALESCE(v_costingdate, v_productiondate);
     ELSE
       -- Costing engine not migrated
       SELECT MAX(pr.ad_client_id), MAX(pr.ad_org_id), MAX(movementdate), MAX(movementdate), COUNT (*), MAX(pr.DOCUMENTNO)
--- a/src-db/database/sourcedata/AD_MODULE.xml	Thu Mar 27 15:00:39 2014 +0000
+++ b/src-db/database/sourcedata/AD_MODULE.xml	Thu Mar 27 15:17:05 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>
--- a/src-db/database/sourcedata/AD_TEXTINTERFACES.xml	Thu Mar 27 15:00:39 2014 +0000
+++ b/src-db/database/sourcedata/AD_TEXTINTERFACES.xml	Thu Mar 27 15:17:05 2014 +0000
@@ -17875,6 +17875,17 @@
 <!--7CFC4A52410F4B3D95DC8CB809F3B5DD-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--7CFC4A52410F4B3D95DC8CB809F3B5DD--></AD_TEXTINTERFACES>
 
+<!--7E459D2A2D7E44F0BD6A07E6B0AD8999--><AD_TEXTINTERFACES>
+<!--7E459D2A2D7E44F0BD6A07E6B0AD8999-->  <AD_TEXTINTERFACES_ID><![CDATA[7E459D2A2D7E44F0BD6A07E6B0AD8999]]></AD_TEXTINTERFACES_ID>
+<!--7E459D2A2D7E44F0BD6A07E6B0AD8999-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--7E459D2A2D7E44F0BD6A07E6B0AD8999-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--7E459D2A2D7E44F0BD6A07E6B0AD8999-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--7E459D2A2D7E44F0BD6A07E6B0AD8999-->  <TEXT><![CDATA[/* ************************************************************************* * The contents of this file are subject to the Openbravo Public License * Version 1.0 (the "License"), being the Mozilla Public License * Version 1.1 with a permitted attribution clause; you may not use this * file except in compliance with the License. You may obtain a copy of * the License at http://www.openbravo.com/legal/license.html * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU * All portions are Copyright (C) 2014 Openbravo SLU * All Rights Reserved. * Contributor(s): ************************************************************************* */]]></TEXT>
+<!--7E459D2A2D7E44F0BD6A07E6B0AD8999-->  <FILENAME><![CDATA[/org/openbravo/base/secureApp/PopUp_DownloadAndRefresh.html]]></FILENAME>
+<!--7E459D2A2D7E44F0BD6A07E6B0AD8999-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--7E459D2A2D7E44F0BD6A07E6B0AD8999-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--7E459D2A2D7E44F0BD6A07E6B0AD8999--></AD_TEXTINTERFACES>
+
 <!--7F033AA20821456B89F3D65729D08970--><AD_TEXTINTERFACES>
 <!--7F033AA20821456B89F3D65729D08970-->  <AD_TEXTINTERFACES_ID><![CDATA[7F033AA20821456B89F3D65729D08970]]></AD_TEXTINTERFACES_ID>
 <!--7F033AA20821456B89F3D65729D08970-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-test/org/openbravo/test/webservice/BaseWSTest.java	Thu Mar 27 15:00:39 2014 +0000
+++ b/src-test/org/openbravo/test/webservice/BaseWSTest.java	Thu Mar 27 15:17:05 2014 +0000
@@ -44,7 +44,6 @@
 import org.dom4j.Document;
 import org.dom4j.io.SAXReader;
 import org.openbravo.base.exception.OBException;
-import org.openbravo.base.provider.OBConfigFileProvider;
 import org.openbravo.base.session.OBPropertiesProvider;
 import org.openbravo.dal.xml.XMLUtil;
 import org.openbravo.test.base.BaseTest;
@@ -318,7 +317,6 @@
       return OB_URL;
     }
     Properties props = OBPropertiesProvider.getInstance().getOpenbravoProperties();
-    System.out.println(OBConfigFileProvider.getInstance().getFileLocation());
     OB_URL = props.getProperty(CONTEXT_PROPERTY);
     if (StringUtils.isEmpty(OB_URL)) {
       throw new OBException(CONTEXT_PROPERTY + " is not set in Openbravo.properties");
--- a/src-wad/src/org/openbravo/wad/Tabs_data.xsql	Thu Mar 27 15:00:39 2014 +0000
+++ b/src-wad/src/org/openbravo/wad/Tabs_data.xsql	Thu Mar 27 15:17:05 2014 +0000
@@ -12,7 +12,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-2012 Openbravo SLU 
+ * All portions are Copyright (C) 2001-2014 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -69,9 +69,12 @@
 
   <SqlMethod name="selectShowWindowIn250ClassicMode" type="preparedStatement" return="boolean">
       <Sql>
-      SELECT count(*) as res FROM ad_tab t
-      WHERE ad_window_id = ? and
-            isactive = 'Y' and
+      SELECT count(*) as res 
+      FROM ad_tab t, ad_table tb
+      WHERE t.ad_window_id = ? and
+            t.isactive = 'Y' and
+            tb.ad_table_id = t.ad_table_id and
+            tb.dataorigintype = 'Table' and
       (
          (whereclause is not null and hqlwhereclause is null) OR 
          (orderbyclause is not null and hqlorderbyclause is null) OR
--- a/src-wad/src/org/openbravo/wad/WadUtility.java	Thu Mar 27 15:00:39 2014 +0000
+++ b/src-wad/src/org/openbravo/wad/WadUtility.java	Thu Mar 27 15:17:05 2014 +0000
@@ -74,6 +74,10 @@
     if (fields == null)
       return "";
 
+    int ilist = Integer.valueOf(vecCounters.elementAt(1).toString()).intValue();
+    int itable = Integer.valueOf(vecCounters.elementAt(0).toString()).intValue();
+
+    String retValue;
     if (fields.reference.equals("19") || fields.reference.equals("30")
         || fields.reference.equals("31") || fields.reference.equals("35")
         || fields.reference.equals("25") || fields.reference.equals("800011")) {
@@ -81,9 +85,6 @@
       // Maintain this old code for convenience, rest of code moved to WADControl subclasses
 
       StringBuffer texto = new StringBuffer();
-      int ilist = Integer.valueOf(vecCounters.elementAt(1).toString()).intValue();
-      int itable = Integer.valueOf(vecCounters.elementAt(0).toString()).intValue();
-
       itable++;
       EditionFieldsData[] dataSearchs = null;
       if (fields.reference.equals("30"))
@@ -150,13 +151,14 @@
       }
       vecCounters.set(0, Integer.toString(itable));
       vecCounters.set(1, Integer.toString(ilist));
-      return texto.toString();
+      retValue = texto.toString();
     } else {
       WADControl control = WadUtility.getWadControlClass(conn, fields.reference,
           fields.adReferenceValueId);
-      return control.columnIdentifier(tableName, fields, vecCounters, vecFields, vecTable,
+      retValue = control.columnIdentifier(tableName, fields, vecCounters, vecFields, vecTable,
           vecWhere, vecParameters, vecTableParameters);
     }
+    return retValue;
 
   }
 
--- a/src-wad/src/org/openbravo/wad/controls/WADControl.java	Thu Mar 27 15:00:39 2014 +0000
+++ b/src-wad/src/org/openbravo/wad/controls/WADControl.java	Thu Mar 27 15:17:05 2014 +0000
@@ -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-2010 Openbravo SLU 
+ * All portions are Copyright (C) 2001-2014 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -372,7 +372,6 @@
     if (field == null)
       return "";
     StringBuffer texto = new StringBuffer();
-    int ilist = Integer.valueOf(vecCounters.elementAt(1).toString()).intValue();
     int itable = Integer.valueOf(vecCounters.elementAt(0).toString()).intValue();
     if ("Y".equals(field.istranslated)
         && TableRelationData.existsTableColumn(conn, field.tablename + "_TRL", field.name)) {
@@ -398,6 +397,7 @@
         texto.append(WadUtility.applyFormat("(CASE WHEN tableTRL" + itable + "." + field.name
             + " IS NULL THEN TO_CHAR(" + tableName + "." + field.name + ") ELSE TO_CHAR(tableTRL"
             + itable + "." + field.name + ") END)", field.reference, sqlDateFormat));
+        vecCounters.set(0, Integer.toString(++itable));
       }
     } else {
       vecFields.addElement(WadUtility.applyFormat(
@@ -407,8 +407,7 @@
           ((tableName != null && tableName.length() != 0) ? (tableName + ".") : "") + field.name,
           field.reference, sqlDateFormat));
     }
-    vecCounters.set(0, Integer.toString(itable));
-    vecCounters.set(1, Integer.toString(ilist));
+
     return texto.toString();
   }
 
--- a/src/org/openbravo/base/secureApp/HttpSecureAppServlet.java	Thu Mar 27 15:00:39 2014 +0000
+++ b/src/org/openbravo/base/secureApp/HttpSecureAppServlet.java	Thu Mar 27 15:17:05 2014 +0000
@@ -1,6 +1,6 @@
 /*
  ************************************************************************************
- * Copyright (C) 2001-2013 Openbravo S.L.U.
+ * Copyright (C) 2001-2014 Openbravo S.L.U.
  * Licensed under the Apache Software License version 2.0
  * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
  * Unless required by applicable law or agreed to  in writing,  software  distributed
@@ -1244,7 +1244,7 @@
         data, exportParameters, false);
   }
 
-  protected void renderJR(VariablesSecureApp variables, HttpServletResponse response,
+  private void renderJR(VariablesSecureApp variables, HttpServletResponse response,
       String strReportName, String strFileName, String strOutputType,
       HashMap<String, Object> designParameters, JRDataSource data,
       Map<Object, Object> exportParameters, boolean forceRefresh) throws ServletException {
--- a/src/org/openbravo/base/secureApp/PopUp_DownloadAndRefresh.html	Thu Mar 27 15:00:39 2014 +0000
+++ b/src/org/openbravo/base/secureApp/PopUp_DownloadAndRefresh.html	Thu Mar 27 15:17:05 2014 +0000
@@ -1,14 +1,21 @@
-<!--
- ************************************************************************************
- * Copyright (C) 2014 Openbravo S.L.U.
- * Licensed under the Apache Software License version 2.0
- * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to  in writing,  software  distributed
- * under the License is distributed  on  an  "AS IS"  BASIS,  WITHOUT  WARRANTIES  OR
- * CONDITIONS OF ANY KIND, either  express  or  implied.  See  the  License  for  the
- * specific language governing permissions and limitations under the License.
- ************************************************************************************
--->
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2014 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):
+ *************************************************************************
+ */
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
--- a/src/org/openbravo/base/secureApp/PopUp_DownloadAndRefresh.xml	Thu Mar 27 15:00:39 2014 +0000
+++ b/src/org/openbravo/base/secureApp/PopUp_DownloadAndRefresh.xml	Thu Mar 27 15:17:05 2014 +0000
@@ -1,15 +1,21 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ************************************************************************************
- * Copyright (C) 2014 Openbravo S.L.U.
- * Licensed under the Apache Software License version 2.0
- * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to  in writing,  software  distributed
- * under the License is distributed  on  an  "AS IS"  BASIS,  WITHOUT  WARRANTIES  OR
- * CONDITIONS OF ANY KIND, either  express  or  implied.  See  the  License  for  the
- * specific language governing permissions and limitations under the License.
- ************************************************************************************
--->
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2014 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):
+ *************************************************************************
+ */
 <REPORT>
 	<TEMPLATE file="PopUp_DownloadAndRefresh.html"/>
 	<PARAMETER id="paramHref" name="href" attribute="onload" replace="xx"/>
--- a/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedgerJournal.jrxml	Thu Mar 27 15:00:39 2014 +0000
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedgerJournal.jrxml	Thu Mar 27 15:17:05 2014 +0000
@@ -571,7 +571,7 @@
 				<reportElement key="line-4" style="Report_Footer" x="5" y="0" width="530" height="1"/>
 			</line>
 			<textField pattern="" isBlankWhenNull="false">
-				<reportElement key="textField-5" style="Report_Footer" x="375" y="1" width="141" height="12"/>
+				<reportElement key="textField-5" style="Report_Footer" x="353" y="1" width="141" height="12"/>
 				<box topPadding="2" leftPadding="5">
 					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
 					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
@@ -584,7 +584,7 @@
 				<textFieldExpression class="java.lang.String"><![CDATA["Page "+new java.lang.Integer(($V{PAGE_NUMBER}.intValue()) +(Integer.parseInt($P{PageNo}))-(1)).toString()+" of "]]></textFieldExpression>
 			</textField>
 			<textField evaluationTime="Report">
-				<reportElement x="518" y="1" width="15" height="12"/>
+				<reportElement x="496" y="1" width="39" height="12"/>
 				<textElement verticalAlignment="Bottom">
 					<font fontName="DejaVu Sans" size="8"/>
 				</textElement>
@@ -598,14 +598,14 @@
 				<reportElement key="line-4" style="Report_Footer" x="1" y="1" width="530" height="1"/>
 			</line>
 			<textField evaluationTime="Report">
-				<reportElement x="518" y="2" width="16" height="12"/>
+				<reportElement x="496" y="2" width="40" height="12"/>
 				<textElement verticalAlignment="Bottom">
 					<font fontName="DejaVu Sans" size="8"/>
 				</textElement>
 				<textFieldExpression class="java.lang.Integer"><![CDATA[new java.lang.Integer($V{PAGE_NUMBER})]]></textFieldExpression>
 			</textField>
 			<textField pattern="" isBlankWhenNull="false">
-				<reportElement key="textField-5" style="Report_Footer" x="375" y="2" width="141" height="12"/>
+				<reportElement key="textField-5" style="Report_Footer" x="353" y="2" width="141" height="12"/>
 				<box topPadding="2" leftPadding="5">
 					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
 					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>