Merged from PI
authorAsier Martirena <asier.martirena@openbravo.com>
Mon, 29 Aug 2016 09:04:15 +0200
changeset 30189 62ec74ab9c44
parent 30073 bec173360631 (current diff)
parent 30188 66e7cb68bdbe (diff)
child 30190 7937b0a6f8c7
Merged from PI
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_Utility.java
modules/org.openbravo.apachejdbcconnectionpool/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.apachejdbcconnectionpool/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.service.json/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.service.json/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.userinterface.smartclient/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.userinterface.smartclient/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.utility.cleanup.log/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.utility.cleanup.log/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.v3.datasets/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.v3.datasets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.v3.framework/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.v3.framework/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.v3/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.v3/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
src-db/database/sourcedata/AD_COLUMN.xml
src-db/database/sourcedata/AD_ELEMENT.xml
src-db/database/sourcedata/AD_MODULE.xml
src/org/openbravo/service/importprocess/ImportEntryManager.java
--- a/.hgsigs	Fri Aug 26 10:16:17 2016 +0200
+++ b/.hgsigs	Mon Aug 29 09:04:15 2016 +0200
@@ -196,3 +196,5 @@
 008d208ba1f60804fd852570f0cd7e985a4220da 0 iEYEABECAAYFAldQUXwACgkQCX/oGf+2qkOtLQCdEZMKf7VfsSt6iVUl59GzwNdr7C4AoK4B3pbbW23fqYd1qplclO3aGm1B
 91b0a6cc5947ea0958b3d677a3e76174fa0a045e 0 iEYEABECAAYFAldajXIACgkQCX/oGf+2qkMRiQCgread+PDPwOVh7Qu/IlmeCLDSPVQAn3cepToICm61fiNkrV+PmFen4bwd
 ac4b84085793438223d82a0024dd84d2268d0768 0 iEYEABECAAYFAld974YACgkQCX/oGf+2qkPrUgCg05BzCWexFGf76njdN2lBgPJn5uMAoIzGxA0dHD54Km07x2m9J1pgFcoW
+a98ba1097ffda83047f2824177bfd940fd9268b2 0 iEYEABECAAYFAlfAIacACgkQCX/oGf+2qkMeAwCgsAyLUenvqX0uAZTRjaUrUXZfcL0AoJg0tc+GlPLwfSGk9nCtgF8M3v5f
+159bac1903e52d4f6785d5e53405ae988c273975 0 iEYEABECAAYFAlejLbgACgkQCX/oGf+2qkOIMQCcDP51SEWDiDNBGTaEShgrqwhm7xYAoO/e+AXZ3cBSAhUb8CmIpJ0Rls82
--- a/.hgtags	Fri Aug 26 10:16:17 2016 +0200
+++ b/.hgtags	Mon Aug 29 09:04:15 2016 +0200
@@ -207,3 +207,5 @@
 208b773131650c3806cefa65b4d5df9bf1992821 3.0PR16Q1.3
 cfff3c184b53528cd71acfe21b15800db17b3436 3.0PR16Q2
 7667e8781815f8fa0bf2d3104aeb585cb2ce8681 3.0PR16Q2.1
+d40ef4d2ac507a87b46d3118841d03a6a54fec1e 3.0PR16Q2.2
+ec10d529b9bbe8caa83f2ea72b29b94bd3473cae 3.0PR16Q3
Binary file modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/CreateAccountingConfiguration.class has changed
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MESSAGE.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MESSAGE.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -96,6 +96,18 @@
 <!--12A17D39C7664BDE8B1A0F079D44591E-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
 <!--12A17D39C7664BDE8B1A0F079D44591E--></AD_MESSAGE>
 
+<!--12FBA6D054F04E6BA11C7CB00A0B70BA--><AD_MESSAGE>
+<!--12FBA6D054F04E6BA11C7CB00A0B70BA-->  <AD_MESSAGE_ID><![CDATA[12FBA6D054F04E6BA11C7CB00A0B70BA]]></AD_MESSAGE_ID>
+<!--12FBA6D054F04E6BA11C7CB00A0B70BA-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--12FBA6D054F04E6BA11C7CB00A0B70BA-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--12FBA6D054F04E6BA11C7CB00A0B70BA-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--12FBA6D054F04E6BA11C7CB00A0B70BA-->  <VALUE><![CDATA[APRM_remline_finpayschdet]]></VALUE>
+<!--12FBA6D054F04E6BA11C7CB00A0B70BA-->  <MSGTEXT><![CDATA[The invoice is already included in a Remittance.]]></MSGTEXT>
+<!--12FBA6D054F04E6BA11C7CB00A0B70BA-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--12FBA6D054F04E6BA11C7CB00A0B70BA-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--12FBA6D054F04E6BA11C7CB00A0B70BA-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
+<!--12FBA6D054F04E6BA11C7CB00A0B70BA--></AD_MESSAGE>
+
 <!--1405C086998B431D80615A4FB8EC783B--><AD_MESSAGE>
 <!--1405C086998B431D80615A4FB8EC783B-->  <AD_MESSAGE_ID><![CDATA[1405C086998B431D80615A4FB8EC783B]]></AD_MESSAGE_ID>
 <!--1405C086998B431D80615A4FB8EC783B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -1483,7 +1495,7 @@
 <!--EF56DCF572A94E6CAFE4F13948268050-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--EF56DCF572A94E6CAFE4F13948268050-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--EF56DCF572A94E6CAFE4F13948268050-->  <VALUE><![CDATA[APRM_SplitBankStatementLineConfirm]]></VALUE>
-<!--EF56DCF572A94E6CAFE4F13948268050-->  <MSGTEXT><![CDATA[Bank statement line and transaction amount does not match. Do you want to perform a partial match?]]></MSGTEXT>
+<!--EF56DCF572A94E6CAFE4F13948268050-->  <MSGTEXT><![CDATA[Bank statement line amount [%0] and transaction amount [%1] does not match. Do you want to perform a partial match?]]></MSGTEXT>
 <!--EF56DCF572A94E6CAFE4F13948268050-->  <MSGTYPE><![CDATA[I]]></MSGTYPE>
 <!--EF56DCF572A94E6CAFE4F13948268050-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--EF56DCF572A94E6CAFE4F13948268050-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -6,7 +6,7 @@
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <NAME><![CDATA[Advanced Payables and Receivables Mngmt]]></NAME>
-<!--A918E3331C404B889D69AA9BFAFB23AC-->  <VERSION><![CDATA[3.0.29717]]></VERSION>
+<!--A918E3331C404B889D69AA9BFAFB23AC-->  <VERSION><![CDATA[3.0.29935]]></VERSION>
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <DESCRIPTION><![CDATA[Managing your finances with an ERP does not have to be difficult. Enjoy a radically improved user experience that combines the power of an enterprise grade financial application with the simplicity and ease of a web 2.0 personal accounting service.]]></DESCRIPTION>
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <HELP><![CDATA[Advanced Payables and Receivables Management simplifies and automates the business processes around the management of financial accounts, from the receipt and issue of payment, to the reconciliation of those events with bank statements.
 If you would like to help shape this module you are welcome to take part in the forum discussions or register feature requests or issues in the corresponding (Forum and Bug Tracking) sections in the Advanced Payables and Receivable project in the OB Forge.]]></HELP>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -7,7 +7,7 @@
 <!--89326AE95DAD449D85DFAB2C5B1C6683-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--89326AE95DAD449D85DFAB2C5B1C6683-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--89326AE95DAD449D85DFAB2C5B1C6683-->  <AD_DEPENDENT_MODULE_ID><![CDATA[5EB4F15C80684ACA904756BDC12ADBE5]]></AD_DEPENDENT_MODULE_ID>
-<!--89326AE95DAD449D85DFAB2C5B1C6683-->  <STARTVERSION><![CDATA[2.1.29717]]></STARTVERSION>
+<!--89326AE95DAD449D85DFAB2C5B1C6683-->  <STARTVERSION><![CDATA[2.1.29935]]></STARTVERSION>
 <!--89326AE95DAD449D85DFAB2C5B1C6683-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--89326AE95DAD449D85DFAB2C5B1C6683-->  <DEPENDANT_MODULE_NAME><![CDATA[User Interface Selector]]></DEPENDANT_MODULE_NAME>
 <!--89326AE95DAD449D85DFAB2C5B1C6683-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -21,7 +21,7 @@
 <!--B97FC854C6DD41E692161585645A900F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--B97FC854C6DD41E692161585645A900F-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--B97FC854C6DD41E692161585645A900F-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--B97FC854C6DD41E692161585645A900F-->  <STARTVERSION><![CDATA[3.0.29717]]></STARTVERSION>
+<!--B97FC854C6DD41E692161585645A900F-->  <STARTVERSION><![CDATA[3.0.29935]]></STARTVERSION>
 <!--B97FC854C6DD41E692161585645A900F-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--B97FC854C6DD41E692161585645A900F-->  <DEPENDANT_MODULE_NAME><![CDATA[core]]></DEPENDANT_MODULE_NAME>
 <!--B97FC854C6DD41E692161585645A900F-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_TAB.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_TAB.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -609,7 +609,7 @@
 <!--B6049E97C1254A1092C883EA59172013-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--B6049E97C1254A1092C883EA59172013-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--B6049E97C1254A1092C883EA59172013-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
-<!--B6049E97C1254A1092C883EA59172013-->  <EM_OBUIAPP_SELECTION_TYPE><![CDATA[S]]></EM_OBUIAPP_SELECTION_TYPE>
+<!--B6049E97C1254A1092C883EA59172013-->  <EM_OBUIAPP_SELECTION_TYPE><![CDATA[M]]></EM_OBUIAPP_SELECTION_TYPE>
 <!--B6049E97C1254A1092C883EA59172013--></AD_TAB>
 
 <!--B82C02920AA84E8DB57D553185BD2F06--><AD_TAB>
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/CreateAccountingConfiguration.java	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/CreateAccountingConfiguration.java	Mon Aug 29 09:04:15 2016 +0200
@@ -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) 2010-2015 Openbravo SLU
+ * All portions are Copyright (C) 2010-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  *************************************************************************
@@ -55,7 +55,7 @@
   @Override
   protected ModuleScriptExecutionLimits getModuleScriptExecutionLimits() {
     return new ModuleScriptExecutionLimits("A918E3331C404B889D69AA9BFAFB23AC", null, 
-        new OpenbravoVersion(3,0,19579));
+        new OpenbravoVersion(3,0,29718));
   }
 
   void createAcctSchemaTables(ConnectionProvider cp) throws Exception {
@@ -64,7 +64,8 @@
     // Tables to be added hardcoded due to problem when executing module script. The tables
     // sometimes do not exist yet
     String tables[] = { "4D8C3B3C31D1410DA046140C9F024D17", "B1B7075C46934F0A9FD4C4D0F1457B42",
-        "D1A97202E832470285C9B1EB026D54E2", "D4C23A17190649E7B78F55A05AF3438C", "30721072789F410E9606D2235CB2A226"};
+        "D1A97202E832470285C9B1EB026D54E2", "D4C23A17190649E7B78F55A05AF3438C",
+        "30721072789F410E9606D2235CB2A226", "D022B92163074E5E82449C8E0B5AFDF6" };
     for (int i = 0; i < data.length; i++) {
       for (int j = 0; j < tables.length; j++) {
         boolean exist = CreateAccountingConfigurationData.selectTables(cp, data[i].cAcctschemaId,
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/FindTransactionsToMatchActionHandler.java	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/FindTransactionsToMatchActionHandler.java	Mon Aug 29 09:04:15 2016 +0200
@@ -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) 2014 Openbravo SLU
+ * All portions are Copyright (C) 2014-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -19,6 +19,8 @@
 
 package org.openbravo.advpaymentmngt.actionHandler;
 
+import java.util.ArrayList;
+import java.util.List;
 import java.util.Map;
 
 import org.codehaus.jettison.json.JSONArray;
@@ -29,7 +31,6 @@
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.model.financialmgmt.payment.FIN_BankStatementLine;
-import org.openbravo.model.financialmgmt.payment.FIN_FinaccTransaction;
 import org.openbravo.model.financialmgmt.payment.FIN_FinancialAccount;
 import org.openbravo.model.financialmgmt.payment.FIN_Reconciliation;
 import org.openbravo.service.db.DbUtility;
@@ -53,7 +54,10 @@
 
       if (selection.length() > 0) {
         final String strBankLineId = params.getString("bankStatementLineId");
-        final String strSelectedTransactionId = selection.getJSONObject(0).getString("id");
+        final List<String> selectedTransactionIds = new ArrayList<String>();
+        for (int i = 0; i < selection.length(); i++) {
+          selectedTransactionIds.add(selection.getJSONObject(i).getString("id"));
+        }
 
         final FIN_FinancialAccount account = OBDal.getInstance().get(FIN_FinancialAccount.class,
             jsonData.getString("inpfinFinancialAccountId"));
@@ -61,10 +65,8 @@
             "N");
         final FIN_BankStatementLine bankStatementLine = OBDal.getInstance().get(
             FIN_BankStatementLine.class, strBankLineId);
-        final FIN_FinaccTransaction transaction = OBDal.getInstance().get(
-            FIN_FinaccTransaction.class, strSelectedTransactionId);
-        APRM_MatchingUtility.matchBankStatementLine(bankStatementLine, transaction, reconciliation,
-            null, true);
+        APRM_MatchingUtility.matchBankStatementLine(bankStatementLine,
+            selectedTransactionIds, reconciliation, null, true);
 
       } else {
         final JSONArray actions = APRM_MatchingUtility.createMessageInProcessView(
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/ModifyPaymentPlanActionHandler.java	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/ModifyPaymentPlanActionHandler.java	Mon Aug 29 09:04:15 2016 +0200
@@ -120,7 +120,16 @@
       OBDal.getInstance().rollbackAndClose();
       log4j.error("Exception! " + e);
       String constraint = e.getConstraintName();
-      constraint = constraint.substring(constraint.lastIndexOf(".") + 1, constraint.length());
+      if (StringUtils.isNotEmpty(constraint)) {
+        constraint = constraint.substring(constraint.lastIndexOf(".") + 1, constraint.length());
+      } else {
+        constraint = e.getSQLException().getNextException().getMessage();
+        constraint = constraint.substring(constraint.lastIndexOf("constraint") + 12,
+            constraint.lastIndexOf("on table") - 2);
+        if (!constraint.startsWith("APRM")) {
+          constraint = "APRM" + constraint.substring(constraint.indexOf("_"));
+        }
+      }
       try {
         return addMessage(jsonRequest, "@" + constraint + "@", "error");
       } catch (Exception ex) {
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/APRM_MatchingUtility.java	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/APRM_MatchingUtility.java	Mon Aug 29 09:04:15 2016 +0200
@@ -203,6 +203,48 @@
   }
 
   /**
+   * Improved version of
+   * {@link APRM_MatchingUtility#matchBankStatementLine(FIN_BankStatementLine, FIN_FinaccTransaction, FIN_Reconciliation, String, boolean)}
+   * which can handle a list of transactions for the same bank statement line.
+   * 
+   * The Bank statement line will be automatically split (and linked) as many times as transactions
+   * are selected.
+   * 
+   * Session is cleared after every 100 transaction.
+   * 
+   * @return the number of matched transactions
+   * 
+   */
+  public static int matchBankStatementLine(final FIN_BankStatementLine _bankStatementLine,
+      final List<String> transactionIds, final FIN_Reconciliation reconciliation,
+      final String matchLevel, boolean throwException) {
+    int counter = 0;
+    try {
+      OBContext.setAdminMode(true);
+      FIN_BankStatementLine bankStatementLine = _bankStatementLine;
+      for (String transactionId : transactionIds) {
+        if (bankStatementLine == null) {
+          break;
+        }
+        FIN_FinaccTransaction transaction = OBDal.getInstance().get(FIN_FinaccTransaction.class,
+            transactionId);
+        bankStatementLine = matchBankStatementLineToTrx(bankStatementLine, transaction,
+            reconciliation, null, true);
+        // Clear session every 100 transactions
+        if (++counter % 100 == 0) {
+          OBDal.getInstance().getSession().flush();
+          OBDal.getInstance().getSession().clear();
+        }
+      }
+
+    } finally {
+      OBContext.restorePreviousMode();
+    }
+
+    return counter;
+  }
+
+  /**
    * Match a bank statement line with a financial account transaction. If the bank statement has
    * associated a transaction, it is first unmatched and then matched against the given transaction.
    * 
@@ -210,15 +252,37 @@
    * automatically split the bank statement line in two (see
    * {@link #splitBankStatementLine(FIN_Reconciliation, FIN_BankStatementLine, FIN_FinaccTransaction)}
    * 
+   * @return If success, the method automatically flushes and returns true. In case of exceptions,
+   *         the method will either throw the exception or return false. This behavior is controlled
+   *         by the throwException boolean parameter
    * 
-   * @return If success, the method automatically flushes. In case of exceptions, the method will
-   *         either throw the exception or return false. This behavior is controlled by the
-   *         throwException boolean parameter
    * 
    */
   public static boolean matchBankStatementLine(final FIN_BankStatementLine _bankStatementLine,
       final FIN_FinaccTransaction transaction, final FIN_Reconciliation reconciliation,
       final String matchLevel, boolean throwException) {
+    matchBankStatementLineToTrx(_bankStatementLine, transaction, reconciliation, matchLevel,
+        throwException);
+    return true;
+  }
+
+  /**
+   * Match a bank statement line with a financial account transaction. If the bank statement has
+   * associated a transaction, it is first unmatched and then matched against the given transaction.
+   * 
+   * If the bank statement line amount is different from the transaction amount, the process will
+   * automatically split the bank statement line in two (see
+   * {@link #splitBankStatementLine(FIN_Reconciliation, FIN_BankStatementLine, FIN_FinaccTransaction)}
+   * 
+   * 
+   * @return This method returns a either Bank Statement Line received from splitBankStatementLine
+   *         for pending amount or null value
+   * 
+   */
+  private static FIN_BankStatementLine matchBankStatementLineToTrx(
+      final FIN_BankStatementLine _bankStatementLine, final FIN_FinaccTransaction transaction,
+      final FIN_Reconciliation reconciliation, final String matchLevel, boolean throwException) {
+    FIN_BankStatementLine clonedBSL = null;
     try {
       OBContext.setAdminMode(true);
       FIN_BankStatementLine bankStatementLine = getLockedBSL(_bankStatementLine.getId());
@@ -231,7 +295,7 @@
         }
 
         // Split if necessary (bank line amount != transaction amount)
-        splitBankStatementLine(reconciliation, bankStatementLine, transaction);
+        clonedBSL = splitBankStatementLine(reconciliation, bankStatementLine, transaction);
 
         // Match the transaction
         bankStatementLine.setFinancialAccountTransaction(transaction);
@@ -247,20 +311,19 @@
         OBDal.getInstance().save(transaction);
         OBDal.getInstance().save(bankStatementLine);
         OBDal.getInstance().flush();
+
+        return clonedBSL;
       }
     } catch (Exception e) {
       log4j.error("Error during matchBankStatementLine, performing a rollback");
       OBDal.getInstance().rollbackAndClose();
       if (throwException) {
         throw new OBException(e.getMessage());
-      } else {
-        return false;
       }
     } finally {
       OBContext.restorePreviousMode();
     }
-
-    return true;
+    return null;
   }
 
   private static String getMatchedDocument(FIN_FinaccTransaction transaction) {
@@ -678,12 +741,15 @@
   /**
    * Split the given bank statement line only when it does not match with the amount of the given
    * transaction. It will create a clone of the given bank statement line with the difference
-   * amount. The original bank statement line amounts will be set equal to the amounts in the
+   * amount. The original bank statement line amounts will be set equal to the amount in the
    * transaction
    * 
+   * @return Clone Bank Statement Line for pending amount left after matching transaction with the
+   *         bank statement line, or null if no split was done
    */
-  private static void splitBankStatementLine(final FIN_Reconciliation reconciliation,
-      final FIN_BankStatementLine bankStatementLine, final FIN_FinaccTransaction transaction) {
+  private static FIN_BankStatementLine splitBankStatementLine(
+      final FIN_Reconciliation reconciliation, final FIN_BankStatementLine bankStatementLine,
+      final FIN_FinaccTransaction transaction) {
     try {
       OBContext.setAdminMode(true);
       if (reconciliation == null || bankStatementLine == null || transaction == null) {
@@ -746,18 +812,19 @@
         // Set bankstatement line amounts with the matched transaction amounts
         bankStatementLine.setCramount(transaction.getDepositAmount());
         bankStatementLine.setDramount(transaction.getPaymentAmount());
+        // Save
+        OBDal.getInstance().save(clonedBSLine);
+        OBDal.getInstance().save(bankStatementLine);
+        OBDal.getInstance().flush();
 
         bs.setProcessed(true);
-
-        // Save
         OBDal.getInstance().save(bs);
-        OBDal.getInstance().save(clonedBSLine);
-        OBDal.getInstance().save(bankStatementLine);
+        return clonedBSLine;
       }
-
     } finally {
       OBContext.restorePreviousMode();
     }
+    return null;
   }
 
   /**
--- a/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-addTransaction.js	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-addTransaction.js	Mon Aug 29 09:04:15 2016 +0200
@@ -62,7 +62,7 @@
         // Continue with the match
         actionHandlerCall();
       } else {
-        isc.confirm(OB.I18N.getLabel('APRM_SplitBankStatementLineConfirm'), execute);
+        isc.confirm(OB.I18N.getLabel('APRM_SplitBankStatementLineConfirm', [OB.Utilities.Number.JSToOBMasked(blineAmt, OB.Format.defaultNumericMask, OB.Format.defaultDecimalSymbol, OB.Format.defaultGroupingSymbol, OB.Format.defaultGroupingSize), OB.Utilities.Number.JSToOBMasked(trxAmt, OB.Format.defaultNumericMask, OB.Format.defaultDecimalSymbol, OB.Format.defaultGroupingSymbol, OB.Format.defaultGroupingSize)]), execute);
       }
     } else {
       // Continue with the match
--- a/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-findTransaction.js	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-findTransaction.js	Mon Aug 29 09:04:15 2016 +0200
@@ -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) 2014-2015 Openbravo SLU
+ * All portions are Copyright (C) 2014-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -31,23 +31,26 @@
   };
 
   if (view && typeof view.getContextInfo === 'function' && view.callerField && view.callerField.view && typeof view.callerField.view.getContextInfo === 'function') {
-    var trxSelection = view.getContextInfo().findtransactiontomatch._selection;
+    var i, trxSelection = view.getContextInfo().findtransactiontomatch._selection;
 
     if (trxSelection && trxSelection[0]) {
-      var trxDepositAmt = trxSelection[0].depositAmount,
-          trxPaymentAmt = trxSelection[0].paymentAmount,
+      var totalTrxAmt = 0,
           blineAmt = view.callerField.record.amount,
-          trxAmt = trxDepositAmt - trxPaymentAmt,
           hideSplitConfirmation = OB.PropertyStore.get('APRM_MATCHSTATEMENT_HIDE_PARTIALMATCH_POPUP', view.windowId);
-
-      if (trxAmt !== blineAmt) {
+      for (i = 0; i < trxSelection.length; i++) {
+        var trxDepositAmt = trxSelection[i].depositAmount,
+            trxPaymentAmt = trxSelection[i].paymentAmount,
+            trxAmt = trxDepositAmt - trxPaymentAmt;
+        totalTrxAmt = totalTrxAmt + trxAmt;
+      }
+      if (totalTrxAmt !== blineAmt) {
         // Split required
         if (hideSplitConfirmation === 'Y') {
           // Continue with the match
           actionHandlerCall();
         } else {
           if (isc.isA.emptyObject(OB.TestRegistry.registry)) {
-            isc.confirm(OB.I18N.getLabel('APRM_SplitBankStatementLineConfirm'), execute);
+            isc.confirm(OB.I18N.getLabel('APRM_SplitBankStatementLineConfirm', [OB.Utilities.Number.JSToOBMasked(blineAmt, OB.Format.defaultNumericMask, OB.Format.defaultDecimalSymbol, OB.Format.defaultGroupingSymbol, OB.Format.defaultGroupingSize), OB.Utilities.Number.JSToOBMasked(totalTrxAmt, OB.Format.defaultNumericMask, OB.Format.defaultDecimalSymbol, OB.Format.defaultGroupingSymbol, OB.Format.defaultGroupingSize)]), execute);
           } else {
             execute(true);
           }
--- a/modules/org.openbravo.apachejdbcconnectionpool/src-db/database/sourcedata/AD_MODULE.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.apachejdbcconnectionpool/src-db/database/sourcedata/AD_MODULE.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -6,7 +6,7 @@
 <!--8A098711BB324335A19833286BDB093D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--8A098711BB324335A19833286BDB093D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--8A098711BB324335A19833286BDB093D-->  <NAME><![CDATA[Apache External Connection Pool]]></NAME>
-<!--8A098711BB324335A19833286BDB093D-->  <VERSION><![CDATA[1.0.29717]]></VERSION>
+<!--8A098711BB324335A19833286BDB093D-->  <VERSION><![CDATA[1.0.29935]]></VERSION>
 <!--8A098711BB324335A19833286BDB093D-->  <DESCRIPTION><![CDATA[Apache External Connection Pool]]></DESCRIPTION>
 <!--8A098711BB324335A19833286BDB093D-->  <HELP><![CDATA[This module implements the Apache JDBC Connection Pool (http://wiki.openbravo.com/wiki/Modules:Apache_JDBC_Connection_Pool).]]></HELP>
 <!--8A098711BB324335A19833286BDB093D-->  <TYPE><![CDATA[M]]></TYPE>
--- a/modules/org.openbravo.apachejdbcconnectionpool/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.apachejdbcconnectionpool/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -7,7 +7,7 @@
 <!--1467C397BC5F4999A5606F39CD6FF8A4-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--1467C397BC5F4999A5606F39CD6FF8A4-->  <AD_MODULE_ID><![CDATA[8A098711BB324335A19833286BDB093D]]></AD_MODULE_ID>
 <!--1467C397BC5F4999A5606F39CD6FF8A4-->  <AD_DEPENDENT_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_DEPENDENT_MODULE_ID>
-<!--1467C397BC5F4999A5606F39CD6FF8A4-->  <STARTVERSION><![CDATA[2.1.29717]]></STARTVERSION>
+<!--1467C397BC5F4999A5606F39CD6FF8A4-->  <STARTVERSION><![CDATA[2.1.29935]]></STARTVERSION>
 <!--1467C397BC5F4999A5606F39CD6FF8A4-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--1467C397BC5F4999A5606F39CD6FF8A4-->  <DEPENDANT_MODULE_NAME><![CDATA[Openbravo 3.0 Framework]]></DEPENDANT_MODULE_NAME>
 <!--1467C397BC5F4999A5606F39CD6FF8A4-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.apachejdbcconnectionpool/src/org/openbravo/apachejdbcconnectionpool/ConnectionInitializerInterceptor.java	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.apachejdbcconnectionpool/src/org/openbravo/apachejdbcconnectionpool/ConnectionInitializerInterceptor.java	Mon Aug 29 09:04:15 2016 +0200
@@ -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) 2014-2015 Openbravo SLU
+ * All portions are Copyright (C) 2014-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -51,7 +51,7 @@
       HashMap<Object, Object> attributes = con.getAttributes();
       Boolean connectionInitialized = (Boolean) attributes.get("OB_INITIALIZED");
       if (connectionInitialized == null || connectionInitialized == false) {
-        SessionInfo.setDBSessionInfo(con.getConnection(), rbdms);
+        SessionInfo.initDB(con.getConnection(), rbdms);
         PreparedStatement pstmt = null;
         try {
           final Properties props = OBPropertiesProvider.getInstance().getOpenbravoProperties();
--- a/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -6,7 +6,7 @@
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <NAME><![CDATA[JBoss Weld]]></NAME>
-<!--C70732EA90A14EC0916078B85CC33D2D-->  <VERSION><![CDATA[1.1.29717]]></VERSION>
+<!--C70732EA90A14EC0916078B85CC33D2D-->  <VERSION><![CDATA[1.1.29935]]></VERSION>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <DESCRIPTION><![CDATA[JBoss Weld]]></DESCRIPTION>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <HELP><![CDATA[Provides the JBoss Weld framework: Java Contexts and Dependency Injection for the Java EE platform (CDI). For more information see http://seamframework.org/Weld]]></HELP>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <URL><![CDATA[http://forge.openbravo.com/projects/weld]]></URL>
--- a/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -7,7 +7,7 @@
 <!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <AD_MODULE_ID><![CDATA[C70732EA90A14EC0916078B85CC33D2D]]></AD_MODULE_ID>
 <!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <STARTVERSION><![CDATA[3.0.29717]]></STARTVERSION>
+<!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <STARTVERSION><![CDATA[3.0.29935]]></STARTVERSION>
 <!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <DEPENDANT_MODULE_NAME><![CDATA[Core]]></DEPENDANT_MODULE_NAME>
 <!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_COLUMN.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_COLUMN.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -7879,8 +7879,8 @@
 <!--93DDA487C86244A28FB80B6F09E74385-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--93DDA487C86244A28FB80B6F09E74385-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--93DDA487C86244A28FB80B6F09E74385-->  <NAME><![CDATA[IsLazyFiltering]]></NAME>
-<!--93DDA487C86244A28FB80B6F09E74385-->  <DESCRIPTION><![CDATA[If it is set, the grid won't perform a filter and/or a sorting action until a button be pressed.]]></DESCRIPTION>
-<!--93DDA487C86244A28FB80B6F09E74385-->  <HELP><![CDATA[If it is set, the grid won't perform a filter and/or a sorting action until the 'Apply Filters' button be pressed.]]></HELP>
+<!--93DDA487C86244A28FB80B6F09E74385-->  <DESCRIPTION><![CDATA[If it is set, the grid won't perform a filter and/or a sorting action until the 'Apply Filters' button be pressed. In the same way, the summary functions present in the grid won't be recalculated until this button be pressed.]]></DESCRIPTION>
+<!--93DDA487C86244A28FB80B6F09E74385-->  <HELP><![CDATA[If it is set, the grid won't perform a filter and/or a sorting action until the 'Apply Filters' button be pressed. In the same way, the summary functions present in the grid won't be recalculated until this button be pressed.]]></HELP>
 <!--93DDA487C86244A28FB80B6F09E74385-->  <COLUMNNAME><![CDATA[IsLazyFiltering]]></COLUMNNAME>
 <!--93DDA487C86244A28FB80B6F09E74385-->  <AD_TABLE_ID><![CDATA[5D50320222DD4865ADFD50364C84291D]]></AD_TABLE_ID>
 <!--93DDA487C86244A28FB80B6F09E74385-->  <AD_REFERENCE_ID><![CDATA[20]]></AD_REFERENCE_ID>
@@ -11576,8 +11576,8 @@
 <!--FEEFB3DC943940A08FE7DCF663BFF90F-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--FEEFB3DC943940A08FE7DCF663BFF90F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FEEFB3DC943940A08FE7DCF663BFF90F-->  <NAME><![CDATA[IsLazyFiltering]]></NAME>
-<!--FEEFB3DC943940A08FE7DCF663BFF90F-->  <DESCRIPTION><![CDATA[If it is set, the grid won't perform a filter and/or a sorting action until a button be pressed.]]></DESCRIPTION>
-<!--FEEFB3DC943940A08FE7DCF663BFF90F-->  <HELP><![CDATA[If it is set, the grid won't perform a filter and/or a sorting action until the 'Apply Filters' button be pressed.]]></HELP>
+<!--FEEFB3DC943940A08FE7DCF663BFF90F-->  <DESCRIPTION><![CDATA[If it is set, the grid won't perform a filter and/or a sorting action until the 'Apply Filters' button be pressed. In the same way, the summary functions present in the grid won't be recalculated until this button be pressed.]]></DESCRIPTION>
+<!--FEEFB3DC943940A08FE7DCF663BFF90F-->  <HELP><![CDATA[If it is set, the grid won't perform a filter and/or a sorting action until the 'Apply Filters' button be pressed. In the same way, the summary functions present in the grid won't be recalculated until this button be pressed.]]></HELP>
 <!--FEEFB3DC943940A08FE7DCF663BFF90F-->  <COLUMNNAME><![CDATA[IsLazyFiltering]]></COLUMNNAME>
 <!--FEEFB3DC943940A08FE7DCF663BFF90F-->  <AD_TABLE_ID><![CDATA[8A16662B37184121A1EDAA89890E160C]]></AD_TABLE_ID>
 <!--FEEFB3DC943940A08FE7DCF663BFF90F-->  <AD_REFERENCE_ID><![CDATA[17]]></AD_REFERENCE_ID>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_ELEMENT.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_ELEMENT.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -88,8 +88,8 @@
 <!--10922048465547F48765035389E22977-->  <COLUMNNAME><![CDATA[IsLazyFiltering]]></COLUMNNAME>
 <!--10922048465547F48765035389E22977-->  <NAME><![CDATA[Lazy Filtering on Grid]]></NAME>
 <!--10922048465547F48765035389E22977-->  <PRINTNAME><![CDATA[Lazy Filtering on Grid]]></PRINTNAME>
-<!--10922048465547F48765035389E22977-->  <DESCRIPTION><![CDATA[If it is set, the grid won't perform a filter and/or a sorting action until a button be pressed.]]></DESCRIPTION>
-<!--10922048465547F48765035389E22977-->  <HELP><![CDATA[If it is set, the grid won't perform a filter and/or a sorting action until the 'Apply Filters' button be pressed.]]></HELP>
+<!--10922048465547F48765035389E22977-->  <DESCRIPTION><![CDATA[If it is set, the grid won't perform a filter and/or a sorting action until the 'Apply Filters' button be pressed. In the same way, the summary functions present in the grid won't be recalculated until this button be pressed.]]></DESCRIPTION>
+<!--10922048465547F48765035389E22977-->  <HELP><![CDATA[If it is set, the grid won't perform a filter and/or a sorting action until the 'Apply Filters' button be pressed. In the same way, the summary functions present in the grid won't be recalculated until this button be pressed.]]></HELP>
 <!--10922048465547F48765035389E22977-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
 <!--10922048465547F48765035389E22977-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--10922048465547F48765035389E22977--></AD_ELEMENT>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_FIELD.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_FIELD.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -6369,8 +6369,8 @@
 <!--B222E0B3174A43D0935CCDD7520C37EF-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--B222E0B3174A43D0935CCDD7520C37EF-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--B222E0B3174A43D0935CCDD7520C37EF-->  <NAME><![CDATA[Lazy Filtering on Grid]]></NAME>
-<!--B222E0B3174A43D0935CCDD7520C37EF-->  <DESCRIPTION><![CDATA[If it is set, the grid won't perform a filter and/or a sorting action until a button be pressed.]]></DESCRIPTION>
-<!--B222E0B3174A43D0935CCDD7520C37EF-->  <HELP><![CDATA[If it is set, the grid won't perform a filter and/or a sorting action until the 'Apply Filters' button be pressed.]]></HELP>
+<!--B222E0B3174A43D0935CCDD7520C37EF-->  <DESCRIPTION><![CDATA[If it is set, the grid won't perform a filter and/or a sorting action until the 'Apply Filters' button be pressed. In the same way, the summary functions present in the grid won't be recalculated until this button be pressed.]]></DESCRIPTION>
+<!--B222E0B3174A43D0935CCDD7520C37EF-->  <HELP><![CDATA[If it is set, the grid won't perform a filter and/or a sorting action until the 'Apply Filters' button be pressed. In the same way, the summary functions present in the grid won't be recalculated until this button be pressed.]]></HELP>
 <!--B222E0B3174A43D0935CCDD7520C37EF-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
 <!--B222E0B3174A43D0935CCDD7520C37EF-->  <AD_TAB_ID><![CDATA[13FE911F7F684A47801DF55525BAD4A1]]></AD_TAB_ID>
 <!--B222E0B3174A43D0935CCDD7520C37EF-->  <AD_COLUMN_ID><![CDATA[93DDA487C86244A28FB80B6F09E74385]]></AD_COLUMN_ID>
@@ -6397,8 +6397,8 @@
 <!--B46E1D7D67054980830418FDA0F571BF-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--B46E1D7D67054980830418FDA0F571BF-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--B46E1D7D67054980830418FDA0F571BF-->  <NAME><![CDATA[Lazy Filtering on Grid]]></NAME>
-<!--B46E1D7D67054980830418FDA0F571BF-->  <DESCRIPTION><![CDATA[If it is set, the grid won't perform a filter and/or a sorting action until a button be pressed.]]></DESCRIPTION>
-<!--B46E1D7D67054980830418FDA0F571BF-->  <HELP><![CDATA[If it is set, the grid won't perform a filter and/or a sorting action until the 'Apply Filters' button be pressed.]]></HELP>
+<!--B46E1D7D67054980830418FDA0F571BF-->  <DESCRIPTION><![CDATA[If it is set, the grid won't perform a filter and/or a sorting action until the 'Apply Filters' button be pressed. In the same way, the summary functions present in the grid won't be recalculated until this button be pressed.]]></DESCRIPTION>
+<!--B46E1D7D67054980830418FDA0F571BF-->  <HELP><![CDATA[If it is set, the grid won't perform a filter and/or a sorting action until the 'Apply Filters' button be pressed. In the same way, the summary functions present in the grid won't be recalculated until this button be pressed.]]></HELP>
 <!--B46E1D7D67054980830418FDA0F571BF-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
 <!--B46E1D7D67054980830418FDA0F571BF-->  <AD_TAB_ID><![CDATA[49B33DC2EDFD45A48EECE139AD5E9AC9]]></AD_TAB_ID>
 <!--B46E1D7D67054980830418FDA0F571BF-->  <AD_COLUMN_ID><![CDATA[FEEFB3DC943940A08FE7DCF663BFF90F]]></AD_COLUMN_ID>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -6,7 +6,7 @@
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <NAME><![CDATA[User Interface Application]]></NAME>
-<!--9BA0836A3CD74EE4AB48753A47211BCC-->  <VERSION><![CDATA[2.1.29717]]></VERSION>
+<!--9BA0836A3CD74EE4AB48753A47211BCC-->  <VERSION><![CDATA[2.1.29935]]></VERSION>
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <DESCRIPTION><![CDATA[Provides the main application components for the openbravo user interface]]></DESCRIPTION>
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <HELP><![CDATA[Provides the main application components for the openbravo user interface. The main layout incorporates a navigation bar and a main view area.]]></HELP>
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <URL><![CDATA[http://forge.openbravo.com/projects/clientapplication]]></URL>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -7,7 +7,7 @@
 <!--15D7CE8D95D043189162DBABA54A1F61-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--15D7CE8D95D043189162DBABA54A1F61-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
 <!--15D7CE8D95D043189162DBABA54A1F61-->  <AD_DEPENDENT_MODULE_ID><![CDATA[A44B9BA75C354D8FB2E3F7D6EB6BFDC4]]></AD_DEPENDENT_MODULE_ID>
-<!--15D7CE8D95D043189162DBABA54A1F61-->  <STARTVERSION><![CDATA[2.1.29717]]></STARTVERSION>
+<!--15D7CE8D95D043189162DBABA54A1F61-->  <STARTVERSION><![CDATA[2.1.29935]]></STARTVERSION>
 <!--15D7CE8D95D043189162DBABA54A1F61-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--15D7CE8D95D043189162DBABA54A1F61-->  <DEPENDANT_MODULE_NAME><![CDATA[JSON Datasource]]></DEPENDANT_MODULE_NAME>
 <!--15D7CE8D95D043189162DBABA54A1F61-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -21,7 +21,7 @@
 <!--60A170212F36499D83B8AD38D01F46B3-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--60A170212F36499D83B8AD38D01F46B3-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
 <!--60A170212F36499D83B8AD38D01F46B3-->  <AD_DEPENDENT_MODULE_ID><![CDATA[4B828F4D03264080AA1D2057B13F613C]]></AD_DEPENDENT_MODULE_ID>
-<!--60A170212F36499D83B8AD38D01F46B3-->  <STARTVERSION><![CDATA[2.1.29717]]></STARTVERSION>
+<!--60A170212F36499D83B8AD38D01F46B3-->  <STARTVERSION><![CDATA[2.1.29935]]></STARTVERSION>
 <!--60A170212F36499D83B8AD38D01F46B3-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--60A170212F36499D83B8AD38D01F46B3-->  <DEPENDANT_MODULE_NAME><![CDATA[User Interface Client Kernel]]></DEPENDANT_MODULE_NAME>
 <!--60A170212F36499D83B8AD38D01F46B3-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -35,7 +35,7 @@
 <!--824D60CB352E4099B1D8C903CA139DAE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--824D60CB352E4099B1D8C903CA139DAE-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
 <!--824D60CB352E4099B1D8C903CA139DAE-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--824D60CB352E4099B1D8C903CA139DAE-->  <STARTVERSION><![CDATA[3.0.29717]]></STARTVERSION>
+<!--824D60CB352E4099B1D8C903CA139DAE-->  <STARTVERSION><![CDATA[3.0.29935]]></STARTVERSION>
 <!--824D60CB352E4099B1D8C903CA139DAE-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--824D60CB352E4099B1D8C903CA139DAE-->  <DEPENDANT_MODULE_NAME><![CDATA[core]]></DEPENDANT_MODULE_NAME>
 <!--824D60CB352E4099B1D8C903CA139DAE-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -49,7 +49,7 @@
 <!--E8FD820AFE3D4FE08C02FC47769026AD-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--E8FD820AFE3D4FE08C02FC47769026AD-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
 <!--E8FD820AFE3D4FE08C02FC47769026AD-->  <AD_DEPENDENT_MODULE_ID><![CDATA[EC356CEE3D46416CA1EBEEB9AB82EDB9]]></AD_DEPENDENT_MODULE_ID>
-<!--E8FD820AFE3D4FE08C02FC47769026AD-->  <STARTVERSION><![CDATA[8.1.29717]]></STARTVERSION>
+<!--E8FD820AFE3D4FE08C02FC47769026AD-->  <STARTVERSION><![CDATA[8.1.29935]]></STARTVERSION>
 <!--E8FD820AFE3D4FE08C02FC47769026AD-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--E8FD820AFE3D4FE08C02FC47769026AD-->  <DEPENDANT_MODULE_NAME><![CDATA[Smartclient]]></DEPENDANT_MODULE_NAME>
 <!--E8FD820AFE3D4FE08C02FC47769026AD-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/UpdateInvariantCharacteristicsHandler.java	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/UpdateInvariantCharacteristicsHandler.java	Mon Aug 29 09:04:15 2016 +0200
@@ -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) 2013-2014 Openbravo SLU
+ * All portions are Copyright (C) 2013-2016 Openbravo SLU
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -56,6 +56,7 @@
 public class UpdateInvariantCharacteristicsHandler extends BaseActionHandler {
   final static private Logger log = LoggerFactory
       .getLogger(UpdateInvariantCharacteristicsHandler.class);
+  private static final String NO_SUBSET = "-1";
 
   @Override
   protected JSONObject execute(Map<String, Object> parameters, String content) {
@@ -115,6 +116,12 @@
           }
           productChar.put("valueMap", productCharValuesValueMap);
           productCharArray.put(productChar);
+          if (characteristic.getCharacteristicSubset() != null) {
+            productChar
+                .put("productCharSubsetId", characteristic.getCharacteristicSubset().getId());
+          } else {
+            productChar.put("productCharSubsetId", NO_SUBSET);
+          }
         }
         response.put("productCharList", productCharArray);
         response.put("productId", productId);
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form-notes.js	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form-notes.js	Mon Aug 29 09:04:15 2016 +0200
@@ -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) 2011-2015 Openbravo SLU
+ * All portions are Copyright (C) 2011-2016 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s): Valery Lezhebokov.
  ************************************************************************
@@ -292,8 +292,9 @@
           return this.Super('change', arguments);
         },
         isDisabled: function () {
+          var windowId = view.standardWindow ? view.standardWindow.windowId : null;
           this.Super('isDisabled', arguments);
-          if (OB.PropertyStore.get("DisableNotesForReadOnlyTabs", this.windowId) === 'Y' && view.readOnly === true) {
+          if (OB.PropertyStore.get("DisableNotesForReadOnlyTabs", windowId) === 'Y' && view.readOnly === true) {
             this.readOnly = true;
             this.canEdit = false;
           }
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-grid.js	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-grid.js	Mon Aug 29 09:04:15 2016 +0200
@@ -708,10 +708,14 @@
       this.showSortArrow = isc.ListGrid.BOTH;
       this.sorterDefaults = {
         click: function () {
-          var grid = this.parentElement;
+          var grid = this.parentElement,
+              alreadySorted;
           if (!this._iconEnabled) {
             return;
           }
+          if (grid.summaryFunctionsHaveChanged && !grid.showGridSummary) {
+            grid.setShowGridSummary(true);
+          }
           if (grid.filterHasChanged || grid.filterClauseJustRemoved) {
             // the filter clause can only be removed once
             delete grid.filterClauseJustRemoved;
@@ -721,15 +725,31 @@
             delete grid.filterHasChanged;
             delete grid.sortingHasChanged;
             delete grid._filteringAndSortingManually;
+            delete grid.summaryFunctionsHaveChanged;
           } else if (!isc.isA.ResultSet(grid.data) || grid.serverDataNotLoaded) {
             // The initial data has not been loaded yet, refreshGrid
             // refreshGrid applies also the current sorting
             grid.refreshGrid();
             delete grid.sortingHasChanged;
             delete grid.serverDataNotLoaded;
+            delete grid.summaryFunctionsHaveChanged;
           } else if (grid.sortingHasChanged) {
-            grid.setSort(grid.savedSortSpecifiers, true);
+            if (grid.summaryFunctionsHaveChanged) {
+              alreadySorted = grid.isSortApplied();
+              grid.setSort(grid.savedSortSpecifiers, true);
+              if (!grid.savedSortSpecifiers) {
+                grid.recalculateGridSummary();
+              } else if (alreadySorted) {
+                grid.data.resort();
+              }
+            } else {
+              grid.setSort(grid.savedSortSpecifiers, true);
+            }
             delete grid.sortingHasChanged;
+            delete grid.summaryFunctionsHaveChanged;
+          } else if (grid.summaryFunctionsHaveChanged) {
+            grid.recalculateGridSummary();
+            delete grid.summaryFunctionsHaveChanged;
           }
           if (grid && grid.sorter) {
             grid.sorter.disable();
@@ -755,6 +775,29 @@
     this.Super('initWidget', arguments);
   },
 
+  isSortApplied: function () {
+    var i, gridSortSpecifiers, gridDataSortSpecifiers;
+
+    if (!this.data || !this.data.getSort) {
+      return false;
+    }
+
+    gridSortSpecifiers = this.getSort() || [];
+    gridDataSortSpecifiers = this.data.getSort() || [];
+
+    if (gridSortSpecifiers.length !== gridDataSortSpecifiers.length) {
+      return false;
+    }
+
+    for (i = 0; i < gridSortSpecifiers.length; i++) {
+      if (gridSortSpecifiers[i].property !== gridDataSortSpecifiers[i].property || gridSortSpecifiers[i].direction !== gridDataSortSpecifiers[i].direction) {
+        return false;
+      }
+    }
+
+    return true;
+  },
+
   clearFilter: function (keepFilterClause, noPerformAction) {
     var i = 0,
         fld, length, groupState, forceRefresh;
@@ -846,6 +889,69 @@
     return ret;
   },
 
+  // overwritten to prevent undesired requests having summary functions and lazy filtering enabled
+  // creates (or updates) and returns the summaryRow autoChild
+  // not called directly -- call 'setShowGridSummary' instead
+  getSummaryRow: function () {
+    if (this.lazyFiltering && this.summaryRow) {
+      if (this.getSummaryRowDataSource && this.completeFields) {
+        this.summaryRow.setDataSource(this.getSummaryRowDataSource(), this.completeFields.duplicate());
+      }
+      if (this.summaryFunctionsHaveChanged) {
+        return this.summaryRow;
+      }
+      this.summaryFunctionsHaveChanged = true;
+      if (this.sorter) {
+        this.sorter.enable();
+      }
+      return this.summaryRow;
+    }
+    if (this.summaryRow && this.isParentGridFetchingData()) {
+      // return the summaryRow if the grid is child of another grid whose data is being fetched
+      // this prevents unneeded datasource requests by not calling the Super 'getSummaryRow' function
+      return this.summaryRow;
+    }
+    return this.Super('getSummaryRow');
+  },
+
+  isParentGridFetchingData: function () {
+    if (this.view && this.view.parentView && this.view.parentView.viewGrid) {
+      return this.view.parentView.viewGrid.isFetchingData();
+    }
+    return false;
+  },
+
+  // puts the grid in a state pending of recalculate summaries
+  markForCalculateSummaries: function () {
+    if (!this.lazyFiltering) {
+      return;
+    }
+    if (this.showGridSummary) {
+      this.setShowGridSummary(false);
+      if (!this.hasSummaryFunctions()) {
+        // the grid does not have any summary function
+        // not mark it as pending for recalculation
+        return;
+      }
+    }
+    if (!this.summaryFunctionsHaveChanged) {
+      this.summaryFunctionsHaveChanged = true;
+      if (this.sorter) {
+        this.sorter.enable();
+      }
+    }
+  },
+
+  hasSummaryFunctions: function () {
+    var i, fields = this.getFields() || [];
+    for (i = 0; i < fields.length; i++) {
+      if (fields[i].summaryFunction) {
+        return true;
+      }
+    }
+    return false;
+  },
+
   // show or hide the filter button
   filterEditorSubmit: function (criteria) {
     this.checkShowFilterFunnelIcon(criteria);
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js	Mon Aug 29 09:04:15 2016 +0200
@@ -637,6 +637,10 @@
     if (this.isGrouped) {
       this.regroup();
     }
+    if (this.lazyFiltering) {
+      this.markForCalculateSummaries();
+      return;
+    }
     if (!clear) {
       if (!this.showGridSummary) {
         this.setShowGridSummary(true);
@@ -2978,6 +2982,7 @@
     }
 
     if (this.lazyFiltering && !isc.isA.ResultSet(this.data)) {
+      this.markForCalculateSummaries();
       OB.Utilities.createResultSetManually(this);
     }
 
@@ -3770,6 +3775,7 @@
     }
 
     this.view.messageBar.hide();
+    this.markForCalculateSummaries();
 
     delete this._showingEditor;
     return ret;
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js	Mon Aug 29 09:04:15 2016 +0200
@@ -1484,6 +1484,7 @@
     this.viewForm.recordIdInForm = OB.Utilities.getTemporaryId();
 
     if (!this.isShowingForm) {
+      this.viewGrid.markForCalculateSummaries();
       this.switchFormGridVisibility();
     }
 
@@ -2299,6 +2300,7 @@
           selection = currentGrid.getSelection().duplicate();
           // deselect the current records
           currentGrid.deselectAllRecords();
+          view.viewGrid.markForCalculateSummaries();
 
           if (selection.length > 1) {
             deleteData = {};
--- a/modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -6,7 +6,7 @@
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <NAME><![CDATA[HTML Widget]]></NAME>
-<!--D393BE6F22BB44B7B728259B34FC795A-->  <VERSION><![CDATA[1.0.29717]]></VERSION>
+<!--D393BE6F22BB44B7B728259B34FC795A-->  <VERSION><![CDATA[1.0.29935]]></VERSION>
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <DESCRIPTION><![CDATA[Provides the HTML Widget superclass that allows to create widget classes that embed the html code.]]></DESCRIPTION>
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <HELP><![CDATA[With this module you can define your own widget classes just setting up your own html code or the html code provided by third parties.]]></HELP>
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <URL><![CDATA[http://forge.openbravo.com/projects/htmlwidget]]></URL>
--- a/modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -7,7 +7,7 @@
 <!--DCE798FBC5B648F7A3C81A6941720A57-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--DCE798FBC5B648F7A3C81A6941720A57-->  <AD_MODULE_ID><![CDATA[D393BE6F22BB44B7B728259B34FC795A]]></AD_MODULE_ID>
 <!--DCE798FBC5B648F7A3C81A6941720A57-->  <AD_DEPENDENT_MODULE_ID><![CDATA[2758CD25B2704AF6BBAD10365FC82C06]]></AD_DEPENDENT_MODULE_ID>
-<!--DCE798FBC5B648F7A3C81A6941720A57-->  <STARTVERSION><![CDATA[2.1.29717]]></STARTVERSION>
+<!--DCE798FBC5B648F7A3C81A6941720A57-->  <STARTVERSION><![CDATA[2.1.29935]]></STARTVERSION>
 <!--DCE798FBC5B648F7A3C81A6941720A57-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--DCE798FBC5B648F7A3C81A6941720A57-->  <DEPENDANT_MODULE_NAME><![CDATA[My Openbravo Tab]]></DEPENDANT_MODULE_NAME>
 <!--DCE798FBC5B648F7A3C81A6941720A57-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -6,7 +6,7 @@
 <!--4B828F4D03264080AA1D2057B13F613C-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--4B828F4D03264080AA1D2057B13F613C-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--4B828F4D03264080AA1D2057B13F613C-->  <NAME><![CDATA[User Interface Client Kernel]]></NAME>
-<!--4B828F4D03264080AA1D2057B13F613C-->  <VERSION><![CDATA[2.1.29717]]></VERSION>
+<!--4B828F4D03264080AA1D2057B13F613C-->  <VERSION><![CDATA[2.1.29935]]></VERSION>
 <!--4B828F4D03264080AA1D2057B13F613C-->  <DESCRIPTION><![CDATA[Provides framework functionality for the Openbravo User Interface]]></DESCRIPTION>
 <!--4B828F4D03264080AA1D2057B13F613C-->  <HELP><![CDATA[The user interface client kernel is a generation framework for generating client (browser) components used in Openbravo. Its components are mainly used by other modules to provide customizable and extendable user interfaces.]]></HELP>
 <!--4B828F4D03264080AA1D2057B13F613C-->  <URL><![CDATA[http://forge.openbravo.com/projects/openbravoclientkernel]]></URL>
--- a/modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -7,7 +7,7 @@
 <!--26B041893E844A53AFA58BC326C4F0D7-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--26B041893E844A53AFA58BC326C4F0D7-->  <AD_MODULE_ID><![CDATA[4B828F4D03264080AA1D2057B13F613C]]></AD_MODULE_ID>
 <!--26B041893E844A53AFA58BC326C4F0D7-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--26B041893E844A53AFA58BC326C4F0D7-->  <STARTVERSION><![CDATA[3.0.29717]]></STARTVERSION>
+<!--26B041893E844A53AFA58BC326C4F0D7-->  <STARTVERSION><![CDATA[3.0.29935]]></STARTVERSION>
 <!--26B041893E844A53AFA58BC326C4F0D7-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--26B041893E844A53AFA58BC326C4F0D7-->  <DEPENDANT_MODULE_NAME><![CDATA[core]]></DEPENDANT_MODULE_NAME>
 <!--26B041893E844A53AFA58BC326C4F0D7-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -21,7 +21,7 @@
 <!--3AB045DA35ED4CA58EF7EB5BF04CDE3F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--3AB045DA35ED4CA58EF7EB5BF04CDE3F-->  <AD_MODULE_ID><![CDATA[4B828F4D03264080AA1D2057B13F613C]]></AD_MODULE_ID>
 <!--3AB045DA35ED4CA58EF7EB5BF04CDE3F-->  <AD_DEPENDENT_MODULE_ID><![CDATA[C70732EA90A14EC0916078B85CC33D2D]]></AD_DEPENDENT_MODULE_ID>
-<!--3AB045DA35ED4CA58EF7EB5BF04CDE3F-->  <STARTVERSION><![CDATA[1.1.29717]]></STARTVERSION>
+<!--3AB045DA35ED4CA58EF7EB5BF04CDE3F-->  <STARTVERSION><![CDATA[1.1.29935]]></STARTVERSION>
 <!--3AB045DA35ED4CA58EF7EB5BF04CDE3F-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--3AB045DA35ED4CA58EF7EB5BF04CDE3F-->  <DEPENDANT_MODULE_NAME><![CDATA[JBoss Weld]]></DEPENDANT_MODULE_NAME>
 <!--3AB045DA35ED4CA58EF7EB5BF04CDE3F-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -35,7 +35,7 @@
 <!--D7BA4BB0844942C58DC46B9E23CF8E67-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--D7BA4BB0844942C58DC46B9E23CF8E67-->  <AD_MODULE_ID><![CDATA[4B828F4D03264080AA1D2057B13F613C]]></AD_MODULE_ID>
 <!--D7BA4BB0844942C58DC46B9E23CF8E67-->  <AD_DEPENDENT_MODULE_ID><![CDATA[F8D1B3ECB3474E8DA5C216473C840DF1]]></AD_DEPENDENT_MODULE_ID>
-<!--D7BA4BB0844942C58DC46B9E23CF8E67-->  <STARTVERSION><![CDATA[2.0.29717]]></STARTVERSION>
+<!--D7BA4BB0844942C58DC46B9E23CF8E67-->  <STARTVERSION><![CDATA[2.0.29935]]></STARTVERSION>
 <!--D7BA4BB0844942C58DC46B9E23CF8E67-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--D7BA4BB0844942C58DC46B9E23CF8E67-->  <DEPENDANT_MODULE_NAME><![CDATA[JSON REST Webservice]]></DEPENDANT_MODULE_NAME>
 <!--D7BA4BB0844942C58DC46B9E23CF8E67-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -6,7 +6,7 @@
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <NAME><![CDATA[Workspace & Widgets]]></NAME>
-<!--2758CD25B2704AF6BBAD10365FC82C06-->  <VERSION><![CDATA[2.1.29717]]></VERSION>
+<!--2758CD25B2704AF6BBAD10365FC82C06-->  <VERSION><![CDATA[2.1.29935]]></VERSION>
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <DESCRIPTION><![CDATA[Workspace & Widgets]]></DESCRIPTION>
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <HELP><![CDATA[Provides the infrastructure of workspace tab (formerly My Openbravo)]]></HELP>
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <URL><![CDATA[http://forge.openbravo.com/projects/myopenbravo]]></URL>
--- a/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -7,7 +7,7 @@
 <!--15F51F03882F444CAB6593B4566DC929-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--15F51F03882F444CAB6593B4566DC929-->  <AD_MODULE_ID><![CDATA[2758CD25B2704AF6BBAD10365FC82C06]]></AD_MODULE_ID>
 <!--15F51F03882F444CAB6593B4566DC929-->  <AD_DEPENDENT_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_DEPENDENT_MODULE_ID>
-<!--15F51F03882F444CAB6593B4566DC929-->  <STARTVERSION><![CDATA[2.1.29717]]></STARTVERSION>
+<!--15F51F03882F444CAB6593B4566DC929-->  <STARTVERSION><![CDATA[2.1.29935]]></STARTVERSION>
 <!--15F51F03882F444CAB6593B4566DC929-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--15F51F03882F444CAB6593B4566DC929-->  <DEPENDANT_MODULE_NAME><![CDATA[User Interface Application]]></DEPENDANT_MODULE_NAME>
 <!--15F51F03882F444CAB6593B4566DC929-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -21,7 +21,7 @@
 <!--E71B28FC949D481D9F59C17D01E46EF9-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--E71B28FC949D481D9F59C17D01E46EF9-->  <AD_MODULE_ID><![CDATA[2758CD25B2704AF6BBAD10365FC82C06]]></AD_MODULE_ID>
 <!--E71B28FC949D481D9F59C17D01E46EF9-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--E71B28FC949D481D9F59C17D01E46EF9-->  <STARTVERSION><![CDATA[3.0.29717]]></STARTVERSION>
+<!--E71B28FC949D481D9F59C17D01E46EF9-->  <STARTVERSION><![CDATA[3.0.29935]]></STARTVERSION>
 <!--E71B28FC949D481D9F59C17D01E46EF9-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--E71B28FC949D481D9F59C17D01E46EF9-->  <DEPENDANT_MODULE_NAME><![CDATA[Core]]></DEPENDANT_MODULE_NAME>
 <!--E71B28FC949D481D9F59C17D01E46EF9-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -6,7 +6,7 @@
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <NAME><![CDATA[Query/List Widget]]></NAME>
-<!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <VERSION><![CDATA[1.0.29717]]></VERSION>
+<!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <VERSION><![CDATA[1.0.29935]]></VERSION>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <DESCRIPTION><![CDATA[Provides the Query/List superclass widget that allows to create widget classes that prints a grid of data based on a query.]]></DESCRIPTION>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <HELP><![CDATA[With this module you can define your own widget classes that just with simple Application Dictionary shows a grid of data based on a HQL Query.]]></HELP>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <URL><![CDATA[http://forge.openbravo.com/projects/querylistwidget]]></URL>
--- a/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -7,7 +7,7 @@
 <!--26558497C31140BFAB067BA4BC47D799-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--26558497C31140BFAB067BA4BC47D799-->  <AD_MODULE_ID><![CDATA[0A060B2AF1974E8EAA8DB61388E9AECC]]></AD_MODULE_ID>
 <!--26558497C31140BFAB067BA4BC47D799-->  <AD_DEPENDENT_MODULE_ID><![CDATA[2758CD25B2704AF6BBAD10365FC82C06]]></AD_DEPENDENT_MODULE_ID>
-<!--26558497C31140BFAB067BA4BC47D799-->  <STARTVERSION><![CDATA[2.1.29717]]></STARTVERSION>
+<!--26558497C31140BFAB067BA4BC47D799-->  <STARTVERSION><![CDATA[2.1.29935]]></STARTVERSION>
 <!--26558497C31140BFAB067BA4BC47D799-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--26558497C31140BFAB067BA4BC47D799-->  <DEPENDANT_MODULE_NAME><![CDATA[My Openbravo Tab]]></DEPENDANT_MODULE_NAME>
 <!--26558497C31140BFAB067BA4BC47D799-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -6,7 +6,7 @@
 <!--FF8080812D842086012D844F3CC0003E-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--FF8080812D842086012D844F3CC0003E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF8080812D842086012D844F3CC0003E-->  <NAME><![CDATA[Widgets Collection]]></NAME>
-<!--FF8080812D842086012D844F3CC0003E-->  <VERSION><![CDATA[0.0.29717]]></VERSION>
+<!--FF8080812D842086012D844F3CC0003E-->  <VERSION><![CDATA[0.0.29935]]></VERSION>
 <!--FF8080812D842086012D844F3CC0003E-->  <DESCRIPTION><![CDATA[Collection of Workspace Widgets]]></DESCRIPTION>
 <!--FF8080812D842086012D844F3CC0003E-->  <HELP><![CDATA[Collection of Workspace Widgets]]></HELP>
 <!--FF8080812D842086012D844F3CC0003E-->  <URL><![CDATA[http://forge.openbravo.com/projects/widgetscollection]]></URL>
--- a/modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -7,7 +7,7 @@
 <!--FF8080812D842086012D845002070046-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF8080812D842086012D845002070046-->  <AD_MODULE_ID><![CDATA[FF8080812D842086012D844F3CC0003E]]></AD_MODULE_ID>
 <!--FF8080812D842086012D845002070046-->  <AD_DEPENDENT_MODULE_ID><![CDATA[2758CD25B2704AF6BBAD10365FC82C06]]></AD_DEPENDENT_MODULE_ID>
-<!--FF8080812D842086012D845002070046-->  <STARTVERSION><![CDATA[2.1.29717]]></STARTVERSION>
+<!--FF8080812D842086012D845002070046-->  <STARTVERSION><![CDATA[2.1.29935]]></STARTVERSION>
 <!--FF8080812D842086012D845002070046-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--FF8080812D842086012D845002070046-->  <DEPENDANT_MODULE_NAME><![CDATA[Workspace & Widgets]]></DEPENDANT_MODULE_NAME>
 <!--FF8080812D842086012D845002070046-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -6,7 +6,7 @@
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <NAME><![CDATA[Payment Report]]></NAME>
-<!--2A5EE903D7974AC298C0504FBC4501A7-->  <VERSION><![CDATA[3.0.29717]]></VERSION>
+<!--2A5EE903D7974AC298C0504FBC4501A7-->  <VERSION><![CDATA[3.0.29935]]></VERSION>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <DESCRIPTION><![CDATA[Payment Report]]></DESCRIPTION>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <URL><![CDATA[http://forge.openbravo.com/projects/paymentreport]]></URL>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <TYPE><![CDATA[M]]></TYPE>
--- a/modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -7,7 +7,7 @@
 <!--A3B449C4D5FE4D688CC58236FE33B802-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--A3B449C4D5FE4D688CC58236FE33B802-->  <AD_MODULE_ID><![CDATA[2A5EE903D7974AC298C0504FBC4501A7]]></AD_MODULE_ID>
 <!--A3B449C4D5FE4D688CC58236FE33B802-->  <AD_DEPENDENT_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_DEPENDENT_MODULE_ID>
-<!--A3B449C4D5FE4D688CC58236FE33B802-->  <STARTVERSION><![CDATA[3.0.29717]]></STARTVERSION>
+<!--A3B449C4D5FE4D688CC58236FE33B802-->  <STARTVERSION><![CDATA[3.0.29935]]></STARTVERSION>
 <!--A3B449C4D5FE4D688CC58236FE33B802-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--A3B449C4D5FE4D688CC58236FE33B802-->  <DEPENDANT_MODULE_NAME><![CDATA[Advanced Payables and Receivables Mngmt]]></DEPENDANT_MODULE_NAME>
 <!--A3B449C4D5FE4D688CC58236FE33B802-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -6,7 +6,7 @@
 <!--3A3A943684D64DEF9EC39F588A656848-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--3A3A943684D64DEF9EC39F588A656848-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--3A3A943684D64DEF9EC39F588A656848-->  <NAME><![CDATA[Orders Awaiting Delivery]]></NAME>
-<!--3A3A943684D64DEF9EC39F588A656848-->  <VERSION><![CDATA[1.1.29717]]></VERSION>
+<!--3A3A943684D64DEF9EC39F588A656848-->  <VERSION><![CDATA[1.1.29935]]></VERSION>
 <!--3A3A943684D64DEF9EC39F588A656848-->  <DESCRIPTION><![CDATA[Report displaying sales orders not shipped.]]></DESCRIPTION>
 <!--3A3A943684D64DEF9EC39F588A656848-->  <URL><![CDATA[http://forge.openbravo.com/projects/ordersawaitingdlivery]]></URL>
 <!--3A3A943684D64DEF9EC39F588A656848-->  <TYPE><![CDATA[M]]></TYPE>
--- a/modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -7,7 +7,7 @@
 <!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <AD_MODULE_ID><![CDATA[3A3A943684D64DEF9EC39F588A656848]]></AD_MODULE_ID>
 <!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <STARTVERSION><![CDATA[3.0.29717]]></STARTVERSION>
+<!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <STARTVERSION><![CDATA[3.0.29935]]></STARTVERSION>
 <!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <DEPENDANT_MODULE_NAME><![CDATA[core]]></DEPENDANT_MODULE_NAME>
 <!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -6,7 +6,7 @@
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <NAME><![CDATA[JSON Datasource]]></NAME>
-<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <VERSION><![CDATA[2.1.29717]]></VERSION>
+<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <VERSION><![CDATA[2.1.29935]]></VERSION>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <DESCRIPTION><![CDATA[Provides data source CRUD functionality using JSON as the data format]]></DESCRIPTION>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <HELP><![CDATA[This module implements the datasource concept. Datasources play a central role in Smartclient applications. The datasource module automatically creates a datasource for each Openbravo entity. In addition custom data source implementations can be defined.]]></HELP>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <URL><![CDATA[http://forge.openbravo.com/projects/datasourceservice]]></URL>
--- a/modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -7,7 +7,7 @@
 <!--0BA071C783CC4984AC9C03BB7CAA87C7-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--0BA071C783CC4984AC9C03BB7CAA87C7-->  <AD_MODULE_ID><![CDATA[A44B9BA75C354D8FB2E3F7D6EB6BFDC4]]></AD_MODULE_ID>
 <!--0BA071C783CC4984AC9C03BB7CAA87C7-->  <AD_DEPENDENT_MODULE_ID><![CDATA[C70732EA90A14EC0916078B85CC33D2D]]></AD_DEPENDENT_MODULE_ID>
-<!--0BA071C783CC4984AC9C03BB7CAA87C7-->  <STARTVERSION><![CDATA[1.1.29717]]></STARTVERSION>
+<!--0BA071C783CC4984AC9C03BB7CAA87C7-->  <STARTVERSION><![CDATA[1.1.29935]]></STARTVERSION>
 <!--0BA071C783CC4984AC9C03BB7CAA87C7-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--0BA071C783CC4984AC9C03BB7CAA87C7-->  <DEPENDANT_MODULE_NAME><![CDATA[JBoss Weld]]></DEPENDANT_MODULE_NAME>
 <!--0BA071C783CC4984AC9C03BB7CAA87C7-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -21,7 +21,7 @@
 <!--3E531F0CD0A54130996F5AF3B6A2D01B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--3E531F0CD0A54130996F5AF3B6A2D01B-->  <AD_MODULE_ID><![CDATA[A44B9BA75C354D8FB2E3F7D6EB6BFDC4]]></AD_MODULE_ID>
 <!--3E531F0CD0A54130996F5AF3B6A2D01B-->  <AD_DEPENDENT_MODULE_ID><![CDATA[F8D1B3ECB3474E8DA5C216473C840DF1]]></AD_DEPENDENT_MODULE_ID>
-<!--3E531F0CD0A54130996F5AF3B6A2D01B-->  <STARTVERSION><![CDATA[2.0.29717]]></STARTVERSION>
+<!--3E531F0CD0A54130996F5AF3B6A2D01B-->  <STARTVERSION><![CDATA[2.0.29935]]></STARTVERSION>
 <!--3E531F0CD0A54130996F5AF3B6A2D01B-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--3E531F0CD0A54130996F5AF3B6A2D01B-->  <DEPENDANT_MODULE_NAME><![CDATA[JSON REST Webservice]]></DEPENDANT_MODULE_NAME>
 <!--3E531F0CD0A54130996F5AF3B6A2D01B-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -35,7 +35,7 @@
 <!--4FCE95802A854F7E8623AFF7C33D13EE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--4FCE95802A854F7E8623AFF7C33D13EE-->  <AD_MODULE_ID><![CDATA[A44B9BA75C354D8FB2E3F7D6EB6BFDC4]]></AD_MODULE_ID>
 <!--4FCE95802A854F7E8623AFF7C33D13EE-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--4FCE95802A854F7E8623AFF7C33D13EE-->  <STARTVERSION><![CDATA[3.0.29717]]></STARTVERSION>
+<!--4FCE95802A854F7E8623AFF7C33D13EE-->  <STARTVERSION><![CDATA[3.0.29935]]></STARTVERSION>
 <!--4FCE95802A854F7E8623AFF7C33D13EE-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--4FCE95802A854F7E8623AFF7C33D13EE-->  <DEPENDANT_MODULE_NAME><![CDATA[core]]></DEPENDANT_MODULE_NAME>
 <!--4FCE95802A854F7E8623AFF7C33D13EE-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -49,7 +49,7 @@
 <!--54AF8B39C55E4E7496902893ECD82786-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--54AF8B39C55E4E7496902893ECD82786-->  <AD_MODULE_ID><![CDATA[A44B9BA75C354D8FB2E3F7D6EB6BFDC4]]></AD_MODULE_ID>
 <!--54AF8B39C55E4E7496902893ECD82786-->  <AD_DEPENDENT_MODULE_ID><![CDATA[4B828F4D03264080AA1D2057B13F613C]]></AD_DEPENDENT_MODULE_ID>
-<!--54AF8B39C55E4E7496902893ECD82786-->  <STARTVERSION><![CDATA[2.1.29717]]></STARTVERSION>
+<!--54AF8B39C55E4E7496902893ECD82786-->  <STARTVERSION><![CDATA[2.1.29935]]></STARTVERSION>
 <!--54AF8B39C55E4E7496902893ECD82786-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--54AF8B39C55E4E7496902893ECD82786-->  <DEPENDANT_MODULE_NAME><![CDATA[User Interface Client Kernel]]></DEPENDANT_MODULE_NAME>
 <!--54AF8B39C55E4E7496902893ECD82786-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -63,7 +63,7 @@
 <!--D03C56D8A4E14F45A5466350E05C631F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--D03C56D8A4E14F45A5466350E05C631F-->  <AD_MODULE_ID><![CDATA[A44B9BA75C354D8FB2E3F7D6EB6BFDC4]]></AD_MODULE_ID>
 <!--D03C56D8A4E14F45A5466350E05C631F-->  <AD_DEPENDENT_MODULE_ID><![CDATA[EC356CEE3D46416CA1EBEEB9AB82EDB9]]></AD_DEPENDENT_MODULE_ID>
-<!--D03C56D8A4E14F45A5466350E05C631F-->  <STARTVERSION><![CDATA[8.1.29717]]></STARTVERSION>
+<!--D03C56D8A4E14F45A5466350E05C631F-->  <STARTVERSION><![CDATA[8.1.29935]]></STARTVERSION>
 <!--D03C56D8A4E14F45A5466350E05C631F-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--D03C56D8A4E14F45A5466350E05C631F-->  <DEPENDANT_MODULE_NAME><![CDATA[Smartclient]]></DEPENDANT_MODULE_NAME>
 <!--D03C56D8A4E14F45A5466350E05C631F-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/ADTreeDatasourceService.java	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/ADTreeDatasourceService.java	Mon Aug 29 09:04:15 2016 +0200
@@ -205,6 +205,9 @@
     Tree tree = (Tree) datasourceParameters.get("tree");
 
     JSONArray responseData = new JSONArray();
+    if (tree == null) {
+      return responseData;
+    }
     Entity entity = ModelProvider.getInstance().getEntityByTableId(tree.getTable().getId());
     final DataToJsonConverter toJsonConverter = OBProvider.getInstance().get(
         DataToJsonConverter.class);
--- a/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/AccountTreeDatasourceService.java	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/AccountTreeDatasourceService.java	Mon Aug 29 09:04:15 2016 +0200
@@ -47,7 +47,7 @@
   protected Map<String, Object> getDatasourceSpecificParams(Map<String, String> parameters) {
     Map<String, Object> datasourceParams = new HashMap<String, Object>();
     String accountTreeId = parameters.get(FINANCIALMGMTELEMENT_ID);
-    if (accountTreeId == null) {
+    if (accountTreeId == null || "null".equals(accountTreeId)) {
       return datasourceParams;
     }
     Element element = OBDal.getInstance().get(Element.class, accountTreeId);
--- a/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DataSourceServiceProvider.java	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DataSourceServiceProvider.java	Mon Aug 29 09:04:15 2016 +0200
@@ -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) 2009-2014 Openbravo SLU 
+ * All portions are Copyright (C) 2009-2016 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -106,21 +106,19 @@
   }
 
   private DataSource getDataSourceFromDataSourceName(String dataSourceName) {
-    DataSource dataSource = null;
     final OBCriteria<DataSource> obCriteria = OBDal.getInstance().createCriteria(DataSource.class);
     obCriteria.add(Restrictions.eq(DataSource.PROPERTY_NAME, dataSourceName));
-    if (!obCriteria.list().isEmpty()) {
-      dataSource = obCriteria.list().get(0);
-    }
-    return dataSource;
+    // obserds_datasource.name has unique constraint
+    return (DataSource) obCriteria.uniqueResult();
   }
 
   private DataSource getDataSourceFromTableName(String tableName) {
     DataSource dataSource = null;
     final OBCriteria<Table> qTable = OBDal.getInstance().createCriteria(Table.class);
     qTable.add(Restrictions.eq(Table.PROPERTY_NAME, tableName));
-    if (!qTable.list().isEmpty()) {
-      Table table = qTable.list().get(0);
+    // ad_table.name is unique
+    Table table = (Table) qTable.uniqueResult();
+    if (table != null) {
       if (ApplicationConstants.DATASOURCEBASEDTABLE.equals(table.getDataOriginType())) {
         // If the table is based on a manual datasource, return that particular datasource
         dataSource = table.getObserdsDatasource();
--- a/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DataSourceServlet.java	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DataSourceServlet.java	Mon Aug 29 09:04:15 2016 +0200
@@ -56,7 +56,6 @@
 import org.openbravo.base.model.Property;
 import org.openbravo.base.model.domaintype.EnumerateDomainType;
 import org.openbravo.base.secureApp.VariablesSecureApp;
-import org.openbravo.base.session.OBPropertiesProvider;
 import org.openbravo.base.weld.WeldUtils;
 import org.openbravo.client.application.Parameter;
 import org.openbravo.client.application.Process;
@@ -914,8 +913,7 @@
     // setting session info
     // Reset Session Info in DB manually as it was set in the service but actual information is not
     // available till now.
-    SessionInfo.setDBSessionInfo(OBDal.getInstance().getConnection(), OBPropertiesProvider
-        .getInstance().getOpenbravoProperties().getProperty("bbdd.rdbms"));
+    SessionInfo.setDBSessionInfo(OBDal.getInstance().getConnection());
   }
 
   private boolean checkSetParameters(HttpServletRequest request, HttpServletResponse response,
--- a/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DataSourceUtils.java	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DataSourceUtils.java	Mon Aug 29 09:04:15 2016 +0200
@@ -18,16 +18,28 @@
  */
 package org.openbravo.service.datasource;
 
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
 import java.util.Set;
 
 import org.apache.commons.lang.StringUtils;
+import org.codehaus.jettison.json.JSONArray;
+import org.codehaus.jettison.json.JSONException;
+import org.codehaus.jettison.json.JSONObject;
 import org.openbravo.dal.core.OBContext;
+import org.openbravo.service.json.JsonUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * This class contains utility methods for dataSource related classes
  * 
  */
 public class DataSourceUtils {
+
+  private static final Logger log = LoggerFactory.getLogger(DataSourceUtils.class);
+
   /**
    * Returns a comma separated list of organization ids to filter the HQL. If an organization id is
    * provided its natural tree is returned. If no organization is provided or the given value is
@@ -62,4 +74,42 @@
     }
     return orgPart.toString();
   }
+
+  /**
+   * Extracts the criteria from a request parameter map and returns the number of selected records
+   * according to that criteria.
+   */
+  public static int getNumberOfSelectedRecords(Map<String, String> parameters) {
+    List<String> selectedRecords = new ArrayList<String>();
+    boolean hasCriteria = parameters.containsKey("criteria");
+    if (hasCriteria) {
+      try {
+        selectedRecords = getSelectedRecordsFromCriteria(JsonUtils.buildCriteria(parameters));
+      } catch (JSONException jsonex) {
+        log.error("Error retrieving number of selected records", jsonex);
+      }
+    }
+    return selectedRecords.size();
+  }
+
+  /**
+   * Returns a list of selected record IDs from a criteria included in the JSONObject received as
+   * parameter.
+   */
+  public static List<String> getSelectedRecordsFromCriteria(JSONObject buildCriteria)
+      throws JSONException {
+    List<String> selectedRecords = new ArrayList<String>();
+    JSONArray criteriaArray = buildCriteria.getJSONArray("criteria");
+    for (int i = 0; i < criteriaArray.length(); i++) {
+      JSONObject criteria = criteriaArray.getJSONObject(i);
+      if (criteria.has("fieldName") && criteria.getString("fieldName").equals("id")
+          && criteria.has("value")) {
+        String value = criteria.getString("value");
+        for (String recordId : value.split(",")) {
+          selectedRecords.add(recordId.trim());
+        }
+      }
+    }
+    return selectedRecords;
+  }
 }
--- a/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/ReadOnlyDataSourceService.java	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/ReadOnlyDataSourceService.java	Mon Aug 29 09:04:15 2016 +0200
@@ -18,7 +18,6 @@
  */
 package org.openbravo.service.datasource;
 
-import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.List;
@@ -46,10 +45,8 @@
  */
 public abstract class ReadOnlyDataSourceService extends DefaultDataSourceService {
   private static final Logger log = LoggerFactory.getLogger(ReadOnlyDataSourceService.class);
-  private static final int DATA_PAGE_SIZE = 100;
   private static final int MAX_PAGE_SIZE_INCREASE = 3;
   private static final String NEW_END_ROW = "_newEndRow";
-  private static final String IS_PICK_AND_EDIT = "_isPickAndEdit";
 
   /*
    * (non-Javadoc)
@@ -142,7 +139,7 @@
     if (tableId != null) {
       entity = ModelProvider.getInstance().getEntityByTableId(tableId);
     }
-    final String isPickAndEditParam = parameters.get(IS_PICK_AND_EDIT);
+    final String isPickAndEditParam = parameters.get(JsonConstants.IS_PICK_AND_EDIT);
     final boolean isPickAndEdit = isPickAndEditParam != null ? Boolean.valueOf(isPickAndEditParam)
         : Boolean.FALSE;
     final List<Map<String, Object>> data;
@@ -162,8 +159,8 @@
       int endRow) {
     List<Map<String, Object>> data;
     int pageSizeIncreaseCount = 0;
-    int selectedRecords = getNumberOfSelectedRecords(parameters);
-    if (selectedRecords > DATA_PAGE_SIZE) {
+    int selectedRecords = DataSourceUtils.getNumberOfSelectedRecords(parameters);
+    if (selectedRecords > JsonConstants.PAE_DATA_PAGE_SIZE) {
       data = getData(parameters, startRow, selectedRecords);
       parameters.put(NEW_END_ROW, Integer.toString(selectedRecords));
     } else {
@@ -185,36 +182,6 @@
     return data;
   }
 
-  private int getNumberOfSelectedRecords(Map<String, String> parameters) {
-    List<String> selectedRecords = new ArrayList<String>();
-    boolean hasCriteria = parameters.containsKey("criteria");
-    if (hasCriteria) {
-      try {
-        selectedRecords = getSelectedRecordsFromCriteria(JsonUtils.buildCriteria(parameters));
-      } catch (JSONException jsonex) {
-        log.error("Error retrieving number of selected records", jsonex);
-      }
-    }
-    return selectedRecords.size();
-  }
-
-  private List<String> getSelectedRecordsFromCriteria(JSONObject buildCriteria)
-      throws JSONException {
-    List<String> selectedRecords = new ArrayList<String>();
-    JSONArray criteriaArray = buildCriteria.getJSONArray("criteria");
-    for (int i = 0; i < criteriaArray.length(); i++) {
-      JSONObject criteria = criteriaArray.getJSONObject(i);
-      if (criteria.has("fieldName") && criteria.getString("fieldName").equals("id")
-          && criteria.has("value")) {
-        String value = criteria.getString("value");
-        for (String recordId : value.split(",")) {
-          selectedRecords.add(recordId.trim());
-        }
-      }
-    }
-    return selectedRecords;
-  }
-
   private boolean isLastRecordSelected(List<Map<String, Object>> data) {
     if (data.size() == 0) {
       return false;
--- a/modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -6,7 +6,7 @@
 <!--FF8080813129ADA401312CA1222A0005-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--FF8080813129ADA401312CA1222A0005-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF8080813129ADA401312CA1222A0005-->  <NAME><![CDATA[Integration with Google APIs]]></NAME>
-<!--FF8080813129ADA401312CA1222A0005-->  <VERSION><![CDATA[0.1.29717]]></VERSION>
+<!--FF8080813129ADA401312CA1222A0005-->  <VERSION><![CDATA[0.1.29935]]></VERSION>
 <!--FF8080813129ADA401312CA1222A0005-->  <DESCRIPTION><![CDATA[Integration with Google APIs]]></DESCRIPTION>
 <!--FF8080813129ADA401312CA1222A0005-->  <TYPE><![CDATA[M]]></TYPE>
 <!--FF8080813129ADA401312CA1222A0005-->  <LICENSE><![CDATA[Licensed under the Openbravo Public License Version 1.1.
--- a/modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -7,7 +7,7 @@
 <!--FF8080813141B198013141BA0F7D0012-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF8080813141B198013141BA0F7D0012-->  <AD_MODULE_ID><![CDATA[FF8080813129ADA401312CA1222A0005]]></AD_MODULE_ID>
 <!--FF8080813141B198013141BA0F7D0012-->  <AD_DEPENDENT_MODULE_ID><![CDATA[FF8080813141B198013141B86DD70003]]></AD_DEPENDENT_MODULE_ID>
-<!--FF8080813141B198013141BA0F7D0012-->  <STARTVERSION><![CDATA[0.1.29717]]></STARTVERSION>
+<!--FF8080813141B198013141BA0F7D0012-->  <STARTVERSION><![CDATA[0.1.29935]]></STARTVERSION>
 <!--FF8080813141B198013141BA0F7D0012-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--FF8080813141B198013141BA0F7D0012-->  <DEPENDANT_MODULE_NAME><![CDATA[OpenID Service Integration]]></DEPENDANT_MODULE_NAME>
 <!--FF8080813141B198013141BA0F7D0012-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -21,7 +21,7 @@
 <!--FF8080813151AEE1013151C4ACE6001B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF8080813151AEE1013151C4ACE6001B-->  <AD_MODULE_ID><![CDATA[FF8080813129ADA401312CA1222A0005]]></AD_MODULE_ID>
 <!--FF8080813151AEE1013151C4ACE6001B-->  <AD_DEPENDENT_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_DEPENDENT_MODULE_ID>
-<!--FF8080813151AEE1013151C4ACE6001B-->  <STARTVERSION><![CDATA[2.1.29717]]></STARTVERSION>
+<!--FF8080813151AEE1013151C4ACE6001B-->  <STARTVERSION><![CDATA[2.1.29935]]></STARTVERSION>
 <!--FF8080813151AEE1013151C4ACE6001B-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--FF8080813151AEE1013151C4ACE6001B-->  <DEPENDANT_MODULE_NAME><![CDATA[Openbravo 3.0 Framework]]></DEPENDANT_MODULE_NAME>
 <!--FF8080813151AEE1013151C4ACE6001B-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -6,7 +6,7 @@
 <!--FF8080813141B198013141B86DD70003-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--FF8080813141B198013141B86DD70003-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF8080813141B198013141B86DD70003-->  <NAME><![CDATA[OpenID Service Integration]]></NAME>
-<!--FF8080813141B198013141B86DD70003-->  <VERSION><![CDATA[0.1.29717]]></VERSION>
+<!--FF8080813141B198013141B86DD70003-->  <VERSION><![CDATA[0.1.29935]]></VERSION>
 <!--FF8080813141B198013141B86DD70003-->  <DESCRIPTION><![CDATA[OpenID Service Integration]]></DESCRIPTION>
 <!--FF8080813141B198013141B86DD70003-->  <TYPE><![CDATA[M]]></TYPE>
 <!--FF8080813141B198013141B86DD70003-->  <LICENSE><![CDATA[Licensed under the Openbravo Public License Version 1.1.
--- a/modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -7,7 +7,7 @@
 <!--FF8080813141B198013141B8B21B0006-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF8080813141B198013141B8B21B0006-->  <AD_MODULE_ID><![CDATA[FF8080813141B198013141B86DD70003]]></AD_MODULE_ID>
 <!--FF8080813141B198013141B8B21B0006-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--FF8080813141B198013141B8B21B0006-->  <STARTVERSION><![CDATA[3.0.29717]]></STARTVERSION>
+<!--FF8080813141B198013141B8B21B0006-->  <STARTVERSION><![CDATA[3.0.29935]]></STARTVERSION>
 <!--FF8080813141B198013141B8B21B0006-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--FF8080813141B198013141B8B21B0006-->  <DEPENDANT_MODULE_NAME><![CDATA[Core]]></DEPENDANT_MODULE_NAME>
 <!--FF8080813141B198013141B8B21B0006-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.service.json/src-db/database/sourcedata/AD_MODULE.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.service.json/src-db/database/sourcedata/AD_MODULE.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -6,7 +6,7 @@
 <!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <NAME><![CDATA[JSON REST Webservice]]></NAME>
-<!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <VERSION><![CDATA[2.0.29717]]></VERSION>
+<!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <VERSION><![CDATA[2.0.29935]]></VERSION>
 <!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <DESCRIPTION><![CDATA[Provides a JSON REST webservice for CRUD service requests]]></DESCRIPTION>
 <!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <HELP><![CDATA[Provides a JSON REST webservice for CRUD service requests. Both the servlet implementation (receiving HTTP REST requests in JSON) as the backend processing are provided.]]></HELP>
 <!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <URL><![CDATA[http://forge.openbravo.com/projects/openbravojsonrest]]></URL>
--- a/modules/org.openbravo.service.json/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.service.json/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -7,7 +7,7 @@
 <!--9E3E7B42DB16405FB794496D309D7044-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--9E3E7B42DB16405FB794496D309D7044-->  <AD_MODULE_ID><![CDATA[F8D1B3ECB3474E8DA5C216473C840DF1]]></AD_MODULE_ID>
 <!--9E3E7B42DB16405FB794496D309D7044-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--9E3E7B42DB16405FB794496D309D7044-->  <STARTVERSION><![CDATA[3.0.29717]]></STARTVERSION>
+<!--9E3E7B42DB16405FB794496D309D7044-->  <STARTVERSION><![CDATA[3.0.29935]]></STARTVERSION>
 <!--9E3E7B42DB16405FB794496D309D7044-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--9E3E7B42DB16405FB794496D309D7044-->  <DEPENDANT_MODULE_NAME><![CDATA[core]]></DEPENDANT_MODULE_NAME>
 <!--9E3E7B42DB16405FB794496D309D7044-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java	Mon Aug 29 09:04:15 2016 +0200
@@ -52,6 +52,7 @@
 import org.openbravo.erpCommon.utility.OBMessageUtils;
 import org.openbravo.model.ad.system.Client;
 import org.openbravo.model.common.enterprise.Organization;
+import org.openbravo.service.datasource.DataSourceUtils;
 import org.openbravo.service.db.DbUtility;
 import org.openbravo.service.json.JsonToDataConverter.JsonConversionError;
 import org.openbravo.userinterface.selector.Selector;
@@ -148,8 +149,24 @@
           bobs.add(bob);
         }
       } else {
+        // Retrieve parameter to identify if the fetch request comes from a Pick And Edit window
+        String isPickAndEditParam = parameters.get(JsonConstants.IS_PICK_AND_EDIT);
+        final boolean isPickAndEdit = StringUtils.isNotEmpty(isPickAndEditParam) ? Boolean
+            .valueOf(isPickAndEditParam) : Boolean.FALSE;
+
         final String startRowStr = parameters.get(JsonConstants.STARTROW_PARAMETER);
-        final String endRowStr = parameters.get(JsonConstants.ENDROW_PARAMETER);
+        final String endRowStr;
+        if (isPickAndEdit) {
+          endRowStr = getEndRowForSelectedRecords(parameters, startRowStr);
+          if (endRowStr != null
+              && !endRowStr.equals(parameters.get(JsonConstants.ENDROW_PARAMETER))) {
+            parameters.put(JsonConstants.ENDROW_PARAMETER, endRowStr);
+            log.debug("The amount of selected records is higher than the page size, "
+                + "setting page size equal to the amount of selected records: " + endRowStr);
+          }
+        } else {
+          endRowStr = parameters.get(JsonConstants.ENDROW_PARAMETER);
+        }
 
         boolean preventCountOperation = !parameters.containsKey(JsonConstants.NOCOUNT_PARAMETER)
             || "true".equals(parameters.get(JsonConstants.NOCOUNT_PARAMETER));
@@ -228,6 +245,17 @@
           long t = System.currentTimeMillis();
           bobs = queryService.list();
           log.debug("query time:" + (System.currentTimeMillis() - t));
+
+          // If the request is done from a P&E window, then we should adapt the page size to include
+          // all selected records into the response
+          if (isPickAndEdit && shouldIncreasePageSize(parameters, bobs, startRowStr, endRowStr)) {
+            String newEndRow = Integer.toString(Integer.parseInt(endRowStr)
+                + JsonConstants.PAE_DATA_PAGE_SIZE);
+            parameters.put(JsonConstants.ENDROW_PARAMETER, newEndRow);
+            log.debug("The amount of selected records is higher than the page size, increasing page size to "
+                + newEndRow);
+            return fetch(parameters, filterOnReadableOrganizations);
+          }
         }
 
         bobs = bobFetchTransformation(bobs, parameters);
@@ -284,6 +312,48 @@
     }
   }
 
+  private String getEndRowForSelectedRecords(Map<String, String> parameters, String startRowStr) {
+    String endRowStr = parameters.get(JsonConstants.ENDROW_PARAMETER);
+    if (startRowStr == null || endRowStr == null) {
+      return endRowStr;
+    }
+    int startRow = Integer.parseInt(startRowStr);
+    int endRow = Integer.parseInt(endRowStr);
+    int selectedRecords = DataSourceUtils.getNumberOfSelectedRecords(parameters);
+    if (startRow == 0 && endRow != -1 && selectedRecords > JsonConstants.PAE_DATA_PAGE_SIZE) {
+      return Integer.toString(selectedRecords);
+    }
+    return endRowStr;
+  }
+
+  private boolean shouldIncreasePageSize(Map<String, String> parameters, List<BaseOBObject> bobs,
+      String startRowStr, String endRowStr) {
+    if (startRowStr == null || endRowStr == null) {
+      return false;
+    }
+    int startRow = Integer.parseInt(startRowStr);
+    int endRow = Integer.parseInt(endRowStr);
+    if (startRow == 0 && endRow != -1 && bobs.size() > endRow
+        && endRow <= JsonConstants.PAE_MAX_PAGE_SIZE) {
+      return isLastRecordSelected(bobs);
+    }
+    return false;
+  }
+
+  private boolean isLastRecordSelected(List<BaseOBObject> bobs) {
+    if (bobs.size() == 0) {
+      return false;
+    }
+    Boolean b = Boolean.FALSE;
+    try {
+      BaseOBObject bob = bobs.get(bobs.size() - 1);
+      b = (Boolean) bob.get("obSelected");
+    } catch (Exception ex) {
+      // Error retrieving obSelected property, do nothing: record not selected
+    }
+    return b.booleanValue();
+  }
+
   public void fetch(Map<String, String> parameters, QueryResultWriter writer) {
     long t = System.currentTimeMillis();
 
@@ -674,8 +744,8 @@
    * Returns the value for a FK property, in case the entity of the row is the referencedEntity for
    * that FK, it returns the row id.
    */
-  private Object getFKValue(JSONObject row, String propertyName,
-      String referencedEntityName) throws JSONException {
+  private Object getFKValue(JSONObject row, String propertyName, String referencedEntityName)
+      throws JSONException {
     Object value = null;
     if (row.has(propertyName)) {
       value = row.get(propertyName);
@@ -844,8 +914,7 @@
         final List<BaseOBObject> refreshedBobs = new ArrayList<BaseOBObject>();
         for (BaseOBObject bob : bobs) {
           // forcing fetch from DB
-          BaseOBObject refreshedBob = OBDal.getInstance().get(bob.getEntityName(),
-              bob.getId());
+          BaseOBObject refreshedBob = OBDal.getInstance().get(bob.getEntityName(), bob.getId());
 
           // if object has computed columns refresh from the database too
           if (refreshedBob.getEntity().hasComputedColumns()) {
--- a/modules/org.openbravo.service.json/src/org/openbravo/service/json/JsonConstants.java	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.service.json/src/org/openbravo/service/json/JsonConstants.java	Mon Aug 29 09:04:15 2016 +0200
@@ -123,6 +123,7 @@
   public static final String QUERY_PARAM_TRANSACTIONAL_RANGE = "@transactionalRange@";
 
   public static final String IS_WS_CALL = "_isWsCall";
+  public static final String IS_PICK_AND_EDIT = "_isPickAndEdit";
   public static final String WHERE_AND_FILTER_CLAUSE = "whereAndFilterClause";
   public static final String TABLE_ID = "tableId";
   public static final String WHERE_CLAUSE_HAS_BEEN_CHECKED = "whereClauseHasBeenChecked";
@@ -132,4 +133,7 @@
   public static final String UNDEFINED = "undefined";
   public static final String NULL = "null";
   public static final String FIELD_SEPARATOR = "$";
+
+  public static final int PAE_DATA_PAGE_SIZE = 100;
+  public static final int PAE_MAX_PAGE_SIZE = 300;
 }
--- a/modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODULE.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODULE.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -6,7 +6,7 @@
 <!--5EB4F15C80684ACA904756BDC12ADBE5-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--5EB4F15C80684ACA904756BDC12ADBE5-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--5EB4F15C80684ACA904756BDC12ADBE5-->  <NAME><![CDATA[User Interface Selector]]></NAME>
-<!--5EB4F15C80684ACA904756BDC12ADBE5-->  <VERSION><![CDATA[2.1.29717]]></VERSION>
+<!--5EB4F15C80684ACA904756BDC12ADBE5-->  <VERSION><![CDATA[2.1.29935]]></VERSION>
 <!--5EB4F15C80684ACA904756BDC12ADBE5-->  <DESCRIPTION><![CDATA[Provides a selector with a suggestion box and popup grid window]]></DESCRIPTION>
 <!--5EB4F15C80684ACA904756BDC12ADBE5-->  <HELP><![CDATA[The Openbravo selector provides new selector functionality which is used inside of existing Openbravo forms. The selector is mainly used for supporting foreign key references in the user interface. The selector combines both suggestion box behavior with a popup grid.]]></HELP>
 <!--5EB4F15C80684ACA904756BDC12ADBE5-->  <URL><![CDATA[http://forge.openbravo.com/projects/selector]]></URL>
--- a/modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -7,7 +7,7 @@
 <!--38825CAED43941D38CA0C78DB04FCFA0-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--38825CAED43941D38CA0C78DB04FCFA0-->  <AD_MODULE_ID><![CDATA[5EB4F15C80684ACA904756BDC12ADBE5]]></AD_MODULE_ID>
 <!--38825CAED43941D38CA0C78DB04FCFA0-->  <AD_DEPENDENT_MODULE_ID><![CDATA[EC356CEE3D46416CA1EBEEB9AB82EDB9]]></AD_DEPENDENT_MODULE_ID>
-<!--38825CAED43941D38CA0C78DB04FCFA0-->  <STARTVERSION><![CDATA[8.1.29717]]></STARTVERSION>
+<!--38825CAED43941D38CA0C78DB04FCFA0-->  <STARTVERSION><![CDATA[8.1.29935]]></STARTVERSION>
 <!--38825CAED43941D38CA0C78DB04FCFA0-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--38825CAED43941D38CA0C78DB04FCFA0-->  <DEPENDANT_MODULE_NAME><![CDATA[Smartclient]]></DEPENDANT_MODULE_NAME>
 <!--38825CAED43941D38CA0C78DB04FCFA0-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -21,7 +21,7 @@
 <!--6DDE7B1A70174242AF82B5022FB89279-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--6DDE7B1A70174242AF82B5022FB89279-->  <AD_MODULE_ID><![CDATA[5EB4F15C80684ACA904756BDC12ADBE5]]></AD_MODULE_ID>
 <!--6DDE7B1A70174242AF82B5022FB89279-->  <AD_DEPENDENT_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_DEPENDENT_MODULE_ID>
-<!--6DDE7B1A70174242AF82B5022FB89279-->  <STARTVERSION><![CDATA[2.1.29717]]></STARTVERSION>
+<!--6DDE7B1A70174242AF82B5022FB89279-->  <STARTVERSION><![CDATA[2.1.29935]]></STARTVERSION>
 <!--6DDE7B1A70174242AF82B5022FB89279-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--6DDE7B1A70174242AF82B5022FB89279-->  <DEPENDANT_MODULE_NAME><![CDATA[User Interface Application]]></DEPENDANT_MODULE_NAME>
 <!--6DDE7B1A70174242AF82B5022FB89279-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -35,7 +35,7 @@
 <!--94F9CD2CB5EF4467A67475C786C984A7-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--94F9CD2CB5EF4467A67475C786C984A7-->  <AD_MODULE_ID><![CDATA[5EB4F15C80684ACA904756BDC12ADBE5]]></AD_MODULE_ID>
 <!--94F9CD2CB5EF4467A67475C786C984A7-->  <AD_DEPENDENT_MODULE_ID><![CDATA[4B828F4D03264080AA1D2057B13F613C]]></AD_DEPENDENT_MODULE_ID>
-<!--94F9CD2CB5EF4467A67475C786C984A7-->  <STARTVERSION><![CDATA[2.1.29717]]></STARTVERSION>
+<!--94F9CD2CB5EF4467A67475C786C984A7-->  <STARTVERSION><![CDATA[2.1.29935]]></STARTVERSION>
 <!--94F9CD2CB5EF4467A67475C786C984A7-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--94F9CD2CB5EF4467A67475C786C984A7-->  <DEPENDANT_MODULE_NAME><![CDATA[User Interface Client Kernel]]></DEPENDANT_MODULE_NAME>
 <!--94F9CD2CB5EF4467A67475C786C984A7-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -49,7 +49,7 @@
 <!--BCCB5A08EC0446DE8BCE191C6BC607A4-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--BCCB5A08EC0446DE8BCE191C6BC607A4-->  <AD_MODULE_ID><![CDATA[5EB4F15C80684ACA904756BDC12ADBE5]]></AD_MODULE_ID>
 <!--BCCB5A08EC0446DE8BCE191C6BC607A4-->  <AD_DEPENDENT_MODULE_ID><![CDATA[C70732EA90A14EC0916078B85CC33D2D]]></AD_DEPENDENT_MODULE_ID>
-<!--BCCB5A08EC0446DE8BCE191C6BC607A4-->  <STARTVERSION><![CDATA[1.1.29717]]></STARTVERSION>
+<!--BCCB5A08EC0446DE8BCE191C6BC607A4-->  <STARTVERSION><![CDATA[1.1.29935]]></STARTVERSION>
 <!--BCCB5A08EC0446DE8BCE191C6BC607A4-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--BCCB5A08EC0446DE8BCE191C6BC607A4-->  <DEPENDANT_MODULE_NAME><![CDATA[JBoss Weld]]></DEPENDANT_MODULE_NAME>
 <!--BCCB5A08EC0446DE8BCE191C6BC607A4-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -63,7 +63,7 @@
 <!--C8DAC574B88649D08C9468521B343F12-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--C8DAC574B88649D08C9468521B343F12-->  <AD_MODULE_ID><![CDATA[5EB4F15C80684ACA904756BDC12ADBE5]]></AD_MODULE_ID>
 <!--C8DAC574B88649D08C9468521B343F12-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--C8DAC574B88649D08C9468521B343F12-->  <STARTVERSION><![CDATA[3.0.29717]]></STARTVERSION>
+<!--C8DAC574B88649D08C9468521B343F12-->  <STARTVERSION><![CDATA[3.0.29935]]></STARTVERSION>
 <!--C8DAC574B88649D08C9468521B343F12-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--C8DAC574B88649D08C9468521B343F12-->  <DEPENDANT_MODULE_NAME><![CDATA[core]]></DEPENDANT_MODULE_NAME>
 <!--C8DAC574B88649D08C9468521B343F12-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -77,7 +77,7 @@
 <!--F14EB17946BE4724A46F80CB1A47EC70-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--F14EB17946BE4724A46F80CB1A47EC70-->  <AD_MODULE_ID><![CDATA[5EB4F15C80684ACA904756BDC12ADBE5]]></AD_MODULE_ID>
 <!--F14EB17946BE4724A46F80CB1A47EC70-->  <AD_DEPENDENT_MODULE_ID><![CDATA[A44B9BA75C354D8FB2E3F7D6EB6BFDC4]]></AD_DEPENDENT_MODULE_ID>
-<!--F14EB17946BE4724A46F80CB1A47EC70-->  <STARTVERSION><![CDATA[2.1.29717]]></STARTVERSION>
+<!--F14EB17946BE4724A46F80CB1A47EC70-->  <STARTVERSION><![CDATA[2.1.29935]]></STARTVERSION>
 <!--F14EB17946BE4724A46F80CB1A47EC70-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--F14EB17946BE4724A46F80CB1A47EC70-->  <DEPENDANT_MODULE_NAME><![CDATA[JSON Datasource]]></DEPENDANT_MODULE_NAME>
 <!--F14EB17946BE4724A46F80CB1A47EC70-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/SelectorDataSourceFilter.java	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/SelectorDataSourceFilter.java	Mon Aug 29 09:04:15 2016 +0200
@@ -97,14 +97,12 @@
 
       String processId = parameters.get(SelectorConstants.DS_REQUEST_PROCESS_DEFINITION_ID);
       if (!StringUtils.isEmpty(processId)) {
-        OBCriteria<Parameter> qParam = OBDal.getInstance().createCriteria(Parameter.class);
-        qParam.add(Restrictions.eq(Parameter.PROPERTY_ID,
-            parameters.get(SelectorConstants.DS_REQUEST_SELECTOR_FIELD_ID)));
-        Parameter param = qParam.list().get(0);
-        Validation validation = qParam.list().get(0).getValidation();
+        Parameter param = OBDal.getInstance().get(Parameter.class,
+            parameters.get(SelectorConstants.DS_REQUEST_SELECTOR_FIELD_ID));
+        Validation validation = param.getValidation();
         if (validation != null) {
           if (validation.getType().equals("HQL_JS")) {
-            String validationCode = qParam.list().get(0).getValidation().getValidationCode();
+            String validationCode = validation.getValidationCode();
             String validationHQL = applyFilterExpression(validationCode, sel, parameters, request);
 
             if (!StringUtils.isEmpty(validationHQL)) {
@@ -311,7 +309,8 @@
       OBCriteria<SelectorField> sfc, HttpServletRequest request, String hqlFilterClause) {
 
     String currentWhere = "";
-    if (sfc.count() == 0) {
+    List<SelectorField> selectorFields = sfc.list();
+    if (selectorFields.size() == 0) {
       return;
     }
 
@@ -336,7 +335,7 @@
 
     Entity entity = ModelProvider.getInstance().getEntityByTableId(sel.getTable().getId());
 
-    for (SelectorField sf : sfc.list()) {
+    for (SelectorField sf : selectorFields) {
       // skip selector fields which do not have a property defined (needed for selector definitions
       // using a custom query
       if (sf.getProperty() == null) {
--- a/modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/SelectorDefaultFilterActionHandler.java	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/SelectorDefaultFilterActionHandler.java	Mon Aug 29 09:04:15 2016 +0200
@@ -19,6 +19,7 @@
 package org.openbravo.userinterface.selector;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 import javax.enterprise.context.ApplicationScoped;
@@ -87,7 +88,8 @@
       obc.add(Restrictions.eq(SelectorField.PROPERTY_OBUISELSELECTOR, sel));
       obc.add(Restrictions.isNotNull(SelectorField.PROPERTY_DEFAULTEXPRESSION));
 
-      if (obc.count() == 0) {
+      List<SelectorField> selFields = obc.list();
+      if (selFields.size() == 0) {
         return result;
       }
 
@@ -103,7 +105,7 @@
           && "true".equals(params.get(SelectorConstants.DS_REQUEST_IS_FILTER_BY_ID_SUPPORTED));
       Object exprResult = null;
       JSONArray idFilters = new JSONArray();
-      for (SelectorField f : obc.list()) {
+      for (SelectorField f : selFields) {
         try {
           exprResult = engine.eval(f.getDefaultExpression());
           Object bobId = null;
--- a/modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -6,7 +6,7 @@
 <!--96998CBC42744B3DBEE28AC8095C9335-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--96998CBC42744B3DBEE28AC8095C9335-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--96998CBC42744B3DBEE28AC8095C9335-->  <NAME><![CDATA[2.50 to 3.00 Compatibility Skin]]></NAME>
-<!--96998CBC42744B3DBEE28AC8095C9335-->  <VERSION><![CDATA[2.0.29717]]></VERSION>
+<!--96998CBC42744B3DBEE28AC8095C9335-->  <VERSION><![CDATA[2.0.29935]]></VERSION>
 <!--96998CBC42744B3DBEE28AC8095C9335-->  <DESCRIPTION><![CDATA[Skin module to proper visualization of classic windows inside the MDI interface]]></DESCRIPTION>
 <!--96998CBC42744B3DBEE28AC8095C9335-->  <HELP><![CDATA[With this skin module the classic windows styles will display in a way more coherent with the new 3.00 styles]]></HELP>
 <!--96998CBC42744B3DBEE28AC8095C9335-->  <URL><![CDATA[www.openbravo.com]]></URL>
--- a/modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -7,7 +7,7 @@
 <!--39BF75AD9AB3453698BF5DE29E727AA9-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--39BF75AD9AB3453698BF5DE29E727AA9-->  <AD_MODULE_ID><![CDATA[96998CBC42744B3DBEE28AC8095C9335]]></AD_MODULE_ID>
 <!--39BF75AD9AB3453698BF5DE29E727AA9-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--39BF75AD9AB3453698BF5DE29E727AA9-->  <STARTVERSION><![CDATA[3.0.29717]]></STARTVERSION>
+<!--39BF75AD9AB3453698BF5DE29E727AA9-->  <STARTVERSION><![CDATA[3.0.29935]]></STARTVERSION>
 <!--39BF75AD9AB3453698BF5DE29E727AA9-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--39BF75AD9AB3453698BF5DE29E727AA9-->  <DEPENDANT_MODULE_NAME><![CDATA[core]]></DEPENDANT_MODULE_NAME>
 <!--39BF75AD9AB3453698BF5DE29E727AA9-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.userinterface.smartclient/src-db/database/sourcedata/AD_MODULE.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.userinterface.smartclient/src-db/database/sourcedata/AD_MODULE.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -6,7 +6,7 @@
 <!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <NAME><![CDATA[Smartclient]]></NAME>
-<!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <VERSION><![CDATA[8.1.29717]]></VERSION>
+<!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <VERSION><![CDATA[8.1.29935]]></VERSION>
 <!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <DESCRIPTION><![CDATA[SmartClient libraries for use within Openbravo]]></DESCRIPTION>
 <!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <HELP><![CDATA[This module contains the SmartClient libraries for usage by other modules. It also contains some simple test pages to validate that SmartClient is working correctly. Also contains generic Openbravo SmartClient components]]></HELP>
 <!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <URL><![CDATA[http://forge.openbravo.com/projects/obsmartclient]]></URL>
--- a/modules/org.openbravo.userinterface.smartclient/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.userinterface.smartclient/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -7,7 +7,7 @@
 <!--086331E18477496B8AC74D2CFEBD1307-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--086331E18477496B8AC74D2CFEBD1307-->  <AD_MODULE_ID><![CDATA[EC356CEE3D46416CA1EBEEB9AB82EDB9]]></AD_MODULE_ID>
 <!--086331E18477496B8AC74D2CFEBD1307-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--086331E18477496B8AC74D2CFEBD1307-->  <STARTVERSION><![CDATA[3.0.29717]]></STARTVERSION>
+<!--086331E18477496B8AC74D2CFEBD1307-->  <STARTVERSION><![CDATA[3.0.29935]]></STARTVERSION>
 <!--086331E18477496B8AC74D2CFEBD1307-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--086331E18477496B8AC74D2CFEBD1307-->  <DEPENDANT_MODULE_NAME><![CDATA[core]]></DEPENDANT_MODULE_NAME>
 <!--086331E18477496B8AC74D2CFEBD1307-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -21,7 +21,7 @@
 <!--DC5D4EF450244482BD2B458DAA496333-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--DC5D4EF450244482BD2B458DAA496333-->  <AD_MODULE_ID><![CDATA[EC356CEE3D46416CA1EBEEB9AB82EDB9]]></AD_MODULE_ID>
 <!--DC5D4EF450244482BD2B458DAA496333-->  <AD_DEPENDENT_MODULE_ID><![CDATA[4B828F4D03264080AA1D2057B13F613C]]></AD_DEPENDENT_MODULE_ID>
-<!--DC5D4EF450244482BD2B458DAA496333-->  <STARTVERSION><![CDATA[2.1.29717]]></STARTVERSION>
+<!--DC5D4EF450244482BD2B458DAA496333-->  <STARTVERSION><![CDATA[2.1.29935]]></STARTVERSION>
 <!--DC5D4EF450244482BD2B458DAA496333-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--DC5D4EF450244482BD2B458DAA496333-->  <DEPENDANT_MODULE_NAME><![CDATA[User Interface Client Kernel]]></DEPENDANT_MODULE_NAME>
 <!--DC5D4EF450244482BD2B458DAA496333-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -35,7 +35,7 @@
 <!--F2AF15C0AF5540E393D96BE506E20648-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--F2AF15C0AF5540E393D96BE506E20648-->  <AD_MODULE_ID><![CDATA[EC356CEE3D46416CA1EBEEB9AB82EDB9]]></AD_MODULE_ID>
 <!--F2AF15C0AF5540E393D96BE506E20648-->  <AD_DEPENDENT_MODULE_ID><![CDATA[C70732EA90A14EC0916078B85CC33D2D]]></AD_DEPENDENT_MODULE_ID>
-<!--F2AF15C0AF5540E393D96BE506E20648-->  <STARTVERSION><![CDATA[1.1.29717]]></STARTVERSION>
+<!--F2AF15C0AF5540E393D96BE506E20648-->  <STARTVERSION><![CDATA[1.1.29935]]></STARTVERSION>
 <!--F2AF15C0AF5540E393D96BE506E20648-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--F2AF15C0AF5540E393D96BE506E20648-->  <DEPENDANT_MODULE_NAME><![CDATA[JBoss Weld]]></DEPENDANT_MODULE_NAME>
 <!--F2AF15C0AF5540E393D96BE506E20648-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.utility.cleanup.log/src-db/database/sourcedata/AD_MODULE.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.utility.cleanup.log/src-db/database/sourcedata/AD_MODULE.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -6,7 +6,7 @@
 <!--8A34B301DC524EA3A07513DF9F42CC90-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--8A34B301DC524EA3A07513DF9F42CC90-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--8A34B301DC524EA3A07513DF9F42CC90-->  <NAME><![CDATA[Log Clean Up Utility]]></NAME>
-<!--8A34B301DC524EA3A07513DF9F42CC90-->  <VERSION><![CDATA[1.0.29717]]></VERSION>
+<!--8A34B301DC524EA3A07513DF9F42CC90-->  <VERSION><![CDATA[1.0.29935]]></VERSION>
 <!--8A34B301DC524EA3A07513DF9F42CC90-->  <DESCRIPTION><![CDATA[Log Clean Up Utility]]></DESCRIPTION>
 <!--8A34B301DC524EA3A07513DF9F42CC90-->  <HELP><![CDATA[Utility to periodically cleanup log tables]]></HELP>
 <!--8A34B301DC524EA3A07513DF9F42CC90-->  <URL><![CDATA[http://centralrepository.openbravo.com/heartbeat-server/org.openbravo.forge.ui/ForgeProjectDetail?projectId=7DC25E3B7ADE426CAD71E7804B95C1BF]]></URL>
--- a/modules/org.openbravo.utility.cleanup.log/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.utility.cleanup.log/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -7,7 +7,7 @@
 <!--86EBD30DEB8045508185B457896C9F6D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--86EBD30DEB8045508185B457896C9F6D-->  <AD_MODULE_ID><![CDATA[8A34B301DC524EA3A07513DF9F42CC90]]></AD_MODULE_ID>
 <!--86EBD30DEB8045508185B457896C9F6D-->  <AD_DEPENDENT_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_DEPENDENT_MODULE_ID>
-<!--86EBD30DEB8045508185B457896C9F6D-->  <STARTVERSION><![CDATA[2.1.29717]]></STARTVERSION>
+<!--86EBD30DEB8045508185B457896C9F6D-->  <STARTVERSION><![CDATA[2.1.29935]]></STARTVERSION>
 <!--86EBD30DEB8045508185B457896C9F6D-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--86EBD30DEB8045508185B457896C9F6D-->  <DEPENDANT_MODULE_NAME><![CDATA[Openbravo 3.0 Framework]]></DEPENDANT_MODULE_NAME>
 <!--86EBD30DEB8045508185B457896C9F6D-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.v3.datasets/src-db/database/sourcedata/AD_MODULE.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.v3.datasets/src-db/database/sourcedata/AD_MODULE.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -6,7 +6,7 @@
 <!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <NAME><![CDATA[Standard Roles]]></NAME>
-<!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <VERSION><![CDATA[3.0.29717]]></VERSION>
+<!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <VERSION><![CDATA[3.0.29935]]></VERSION>
 <!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <DESCRIPTION><![CDATA[Pre-configured collection of standard ERP roles]]></DESCRIPTION>
 <!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <HELP><![CDATA[This dataset contains the following roles with their access to corresponding Openbravo entities - windows, reports, actions.
 * Employee - Any person of the enterprise
--- a/modules/org.openbravo.v3.datasets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.v3.datasets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -7,7 +7,7 @@
 <!--148A000EE9A04A3CA653B1296A00B8E6-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--148A000EE9A04A3CA653B1296A00B8E6-->  <AD_MODULE_ID><![CDATA[883B5872CA0548F9AF2BBBE7D2DDFA61]]></AD_MODULE_ID>
 <!--148A000EE9A04A3CA653B1296A00B8E6-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--148A000EE9A04A3CA653B1296A00B8E6-->  <STARTVERSION><![CDATA[3.0.29717]]></STARTVERSION>
+<!--148A000EE9A04A3CA653B1296A00B8E6-->  <STARTVERSION><![CDATA[3.0.29935]]></STARTVERSION>
 <!--148A000EE9A04A3CA653B1296A00B8E6-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--148A000EE9A04A3CA653B1296A00B8E6-->  <DEPENDANT_MODULE_NAME><![CDATA[core]]></DEPENDANT_MODULE_NAME>
 <!--148A000EE9A04A3CA653B1296A00B8E6-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -21,7 +21,7 @@
 <!--30F966407A6F4E15965821BAEE34D25B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--30F966407A6F4E15965821BAEE34D25B-->  <AD_MODULE_ID><![CDATA[883B5872CA0548F9AF2BBBE7D2DDFA61]]></AD_MODULE_ID>
 <!--30F966407A6F4E15965821BAEE34D25B-->  <AD_DEPENDENT_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_DEPENDENT_MODULE_ID>
-<!--30F966407A6F4E15965821BAEE34D25B-->  <STARTVERSION><![CDATA[3.0.29717]]></STARTVERSION>
+<!--30F966407A6F4E15965821BAEE34D25B-->  <STARTVERSION><![CDATA[3.0.29935]]></STARTVERSION>
 <!--30F966407A6F4E15965821BAEE34D25B-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--30F966407A6F4E15965821BAEE34D25B-->  <DEPENDANT_MODULE_NAME><![CDATA[Advanced Payables and Receivables Mngmt]]></DEPENDANT_MODULE_NAME>
 <!--30F966407A6F4E15965821BAEE34D25B-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -35,7 +35,7 @@
 <!--F93CE30003B24F8F8886510B0065EECC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--F93CE30003B24F8F8886510B0065EECC-->  <AD_MODULE_ID><![CDATA[883B5872CA0548F9AF2BBBE7D2DDFA61]]></AD_MODULE_ID>
 <!--F93CE30003B24F8F8886510B0065EECC-->  <AD_DEPENDENT_MODULE_ID><![CDATA[3A3A943684D64DEF9EC39F588A656848]]></AD_DEPENDENT_MODULE_ID>
-<!--F93CE30003B24F8F8886510B0065EECC-->  <STARTVERSION><![CDATA[1.1.29717]]></STARTVERSION>
+<!--F93CE30003B24F8F8886510B0065EECC-->  <STARTVERSION><![CDATA[1.1.29935]]></STARTVERSION>
 <!--F93CE30003B24F8F8886510B0065EECC-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--F93CE30003B24F8F8886510B0065EECC-->  <DEPENDANT_MODULE_NAME><![CDATA[Orders Awaiting Delivery]]></DEPENDANT_MODULE_NAME>
 <!--F93CE30003B24F8F8886510B0065EECC-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.v3.framework/src-db/database/sourcedata/AD_MODULE.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.v3.framework/src-db/database/sourcedata/AD_MODULE.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -6,7 +6,7 @@
 <!--7E48CDD73B7E493A8BED4F7253E7C989-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--7E48CDD73B7E493A8BED4F7253E7C989-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--7E48CDD73B7E493A8BED4F7253E7C989-->  <NAME><![CDATA[Openbravo 3.0 Framework]]></NAME>
-<!--7E48CDD73B7E493A8BED4F7253E7C989-->  <VERSION><![CDATA[2.1.29717]]></VERSION>
+<!--7E48CDD73B7E493A8BED4F7253E7C989-->  <VERSION><![CDATA[2.1.29935]]></VERSION>
 <!--7E48CDD73B7E493A8BED4F7253E7C989-->  <DESCRIPTION><![CDATA[Openbravo 3.0 Framework]]></DESCRIPTION>
 <!--7E48CDD73B7E493A8BED4F7253E7C989-->  <HELP><![CDATA[Contains all the components required to run the Openbravo 3.0 framework]]></HELP>
 <!--7E48CDD73B7E493A8BED4F7253E7C989-->  <URL><![CDATA[http://forge.openbravo.com/projects/openbravov30framework]]></URL>
--- a/modules/org.openbravo.v3.framework/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.v3.framework/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -7,7 +7,7 @@
 <!--01E1BCCEC9114DE0960538DF34E30E6F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--01E1BCCEC9114DE0960538DF34E30E6F-->  <AD_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_MODULE_ID>
 <!--01E1BCCEC9114DE0960538DF34E30E6F-->  <AD_DEPENDENT_MODULE_ID><![CDATA[2758CD25B2704AF6BBAD10365FC82C06]]></AD_DEPENDENT_MODULE_ID>
-<!--01E1BCCEC9114DE0960538DF34E30E6F-->  <STARTVERSION><![CDATA[2.1.29717]]></STARTVERSION>
+<!--01E1BCCEC9114DE0960538DF34E30E6F-->  <STARTVERSION><![CDATA[2.1.29935]]></STARTVERSION>
 <!--01E1BCCEC9114DE0960538DF34E30E6F-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--01E1BCCEC9114DE0960538DF34E30E6F-->  <DEPENDANT_MODULE_NAME><![CDATA[My Openbravo Tab]]></DEPENDANT_MODULE_NAME>
 <!--01E1BCCEC9114DE0960538DF34E30E6F-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -21,7 +21,7 @@
 <!--025B181F63CA47B48A920F6983242390-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--025B181F63CA47B48A920F6983242390-->  <AD_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_MODULE_ID>
 <!--025B181F63CA47B48A920F6983242390-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--025B181F63CA47B48A920F6983242390-->  <STARTVERSION><![CDATA[3.0.29717]]></STARTVERSION>
+<!--025B181F63CA47B48A920F6983242390-->  <STARTVERSION><![CDATA[3.0.29935]]></STARTVERSION>
 <!--025B181F63CA47B48A920F6983242390-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--025B181F63CA47B48A920F6983242390-->  <DEPENDANT_MODULE_NAME><![CDATA[core]]></DEPENDANT_MODULE_NAME>
 <!--025B181F63CA47B48A920F6983242390-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -35,7 +35,7 @@
 <!--054B4FEAF919478AA3FF27098A46D1D6-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--054B4FEAF919478AA3FF27098A46D1D6-->  <AD_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_MODULE_ID>
 <!--054B4FEAF919478AA3FF27098A46D1D6-->  <AD_DEPENDENT_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_DEPENDENT_MODULE_ID>
-<!--054B4FEAF919478AA3FF27098A46D1D6-->  <STARTVERSION><![CDATA[2.1.29717]]></STARTVERSION>
+<!--054B4FEAF919478AA3FF27098A46D1D6-->  <STARTVERSION><![CDATA[2.1.29935]]></STARTVERSION>
 <!--054B4FEAF919478AA3FF27098A46D1D6-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--054B4FEAF919478AA3FF27098A46D1D6-->  <DEPENDANT_MODULE_NAME><![CDATA[User Interface Application]]></DEPENDANT_MODULE_NAME>
 <!--054B4FEAF919478AA3FF27098A46D1D6-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -49,7 +49,7 @@
 <!--1FA6BAA6DC3A4434A6E62A0D1319A9D7-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--1FA6BAA6DC3A4434A6E62A0D1319A9D7-->  <AD_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_MODULE_ID>
 <!--1FA6BAA6DC3A4434A6E62A0D1319A9D7-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0A060B2AF1974E8EAA8DB61388E9AECC]]></AD_DEPENDENT_MODULE_ID>
-<!--1FA6BAA6DC3A4434A6E62A0D1319A9D7-->  <STARTVERSION><![CDATA[1.0.29717]]></STARTVERSION>
+<!--1FA6BAA6DC3A4434A6E62A0D1319A9D7-->  <STARTVERSION><![CDATA[1.0.29935]]></STARTVERSION>
 <!--1FA6BAA6DC3A4434A6E62A0D1319A9D7-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--1FA6BAA6DC3A4434A6E62A0D1319A9D7-->  <DEPENDANT_MODULE_NAME><![CDATA[Query/List Widget]]></DEPENDANT_MODULE_NAME>
 <!--1FA6BAA6DC3A4434A6E62A0D1319A9D7-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -63,7 +63,7 @@
 <!--224754C3EF674C93B0D468F47BAAB824-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--224754C3EF674C93B0D468F47BAAB824-->  <AD_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_MODULE_ID>
 <!--224754C3EF674C93B0D468F47BAAB824-->  <AD_DEPENDENT_MODULE_ID><![CDATA[5EB4F15C80684ACA904756BDC12ADBE5]]></AD_DEPENDENT_MODULE_ID>
-<!--224754C3EF674C93B0D468F47BAAB824-->  <STARTVERSION><![CDATA[2.1.29717]]></STARTVERSION>
+<!--224754C3EF674C93B0D468F47BAAB824-->  <STARTVERSION><![CDATA[2.1.29935]]></STARTVERSION>
 <!--224754C3EF674C93B0D468F47BAAB824-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--224754C3EF674C93B0D468F47BAAB824-->  <DEPENDANT_MODULE_NAME><![CDATA[User Interface Selector]]></DEPENDANT_MODULE_NAME>
 <!--224754C3EF674C93B0D468F47BAAB824-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -77,7 +77,7 @@
 <!--5B72D24032DD4879A950194139D961B6-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--5B72D24032DD4879A950194139D961B6-->  <AD_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_MODULE_ID>
 <!--5B72D24032DD4879A950194139D961B6-->  <AD_DEPENDENT_MODULE_ID><![CDATA[A44B9BA75C354D8FB2E3F7D6EB6BFDC4]]></AD_DEPENDENT_MODULE_ID>
-<!--5B72D24032DD4879A950194139D961B6-->  <STARTVERSION><![CDATA[2.1.29717]]></STARTVERSION>
+<!--5B72D24032DD4879A950194139D961B6-->  <STARTVERSION><![CDATA[2.1.29935]]></STARTVERSION>
 <!--5B72D24032DD4879A950194139D961B6-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--5B72D24032DD4879A950194139D961B6-->  <DEPENDANT_MODULE_NAME><![CDATA[JSON Datasource]]></DEPENDANT_MODULE_NAME>
 <!--5B72D24032DD4879A950194139D961B6-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -91,7 +91,7 @@
 <!--8730CA6A4224439D82E0DD31B3806E36-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--8730CA6A4224439D82E0DD31B3806E36-->  <AD_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_MODULE_ID>
 <!--8730CA6A4224439D82E0DD31B3806E36-->  <AD_DEPENDENT_MODULE_ID><![CDATA[D393BE6F22BB44B7B728259B34FC795A]]></AD_DEPENDENT_MODULE_ID>
-<!--8730CA6A4224439D82E0DD31B3806E36-->  <STARTVERSION><![CDATA[1.0.29717]]></STARTVERSION>
+<!--8730CA6A4224439D82E0DD31B3806E36-->  <STARTVERSION><![CDATA[1.0.29935]]></STARTVERSION>
 <!--8730CA6A4224439D82E0DD31B3806E36-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--8730CA6A4224439D82E0DD31B3806E36-->  <DEPENDANT_MODULE_NAME><![CDATA[HTML Widget]]></DEPENDANT_MODULE_NAME>
 <!--8730CA6A4224439D82E0DD31B3806E36-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -105,7 +105,7 @@
 <!--98C47FF058F8413B8A2B26036061446E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--98C47FF058F8413B8A2B26036061446E-->  <AD_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_MODULE_ID>
 <!--98C47FF058F8413B8A2B26036061446E-->  <AD_DEPENDENT_MODULE_ID><![CDATA[EC356CEE3D46416CA1EBEEB9AB82EDB9]]></AD_DEPENDENT_MODULE_ID>
-<!--98C47FF058F8413B8A2B26036061446E-->  <STARTVERSION><![CDATA[8.1.29717]]></STARTVERSION>
+<!--98C47FF058F8413B8A2B26036061446E-->  <STARTVERSION><![CDATA[8.1.29935]]></STARTVERSION>
 <!--98C47FF058F8413B8A2B26036061446E-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--98C47FF058F8413B8A2B26036061446E-->  <DEPENDANT_MODULE_NAME><![CDATA[Smartclient]]></DEPENDANT_MODULE_NAME>
 <!--98C47FF058F8413B8A2B26036061446E-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -119,7 +119,7 @@
 <!--A6D7BA917B3B4DEABD7CA1BA00B01E8A-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--A6D7BA917B3B4DEABD7CA1BA00B01E8A-->  <AD_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_MODULE_ID>
 <!--A6D7BA917B3B4DEABD7CA1BA00B01E8A-->  <AD_DEPENDENT_MODULE_ID><![CDATA[96998CBC42744B3DBEE28AC8095C9335]]></AD_DEPENDENT_MODULE_ID>
-<!--A6D7BA917B3B4DEABD7CA1BA00B01E8A-->  <STARTVERSION><![CDATA[2.0.29717]]></STARTVERSION>
+<!--A6D7BA917B3B4DEABD7CA1BA00B01E8A-->  <STARTVERSION><![CDATA[2.0.29935]]></STARTVERSION>
 <!--A6D7BA917B3B4DEABD7CA1BA00B01E8A-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--A6D7BA917B3B4DEABD7CA1BA00B01E8A-->  <DEPENDANT_MODULE_NAME><![CDATA[2.50 to 3.00 Compatibility Skin]]></DEPENDANT_MODULE_NAME>
 <!--A6D7BA917B3B4DEABD7CA1BA00B01E8A-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -133,7 +133,7 @@
 <!--A9CB99330AF34944877F889DD8A0AB3C-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--A9CB99330AF34944877F889DD8A0AB3C-->  <AD_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_MODULE_ID>
 <!--A9CB99330AF34944877F889DD8A0AB3C-->  <AD_DEPENDENT_MODULE_ID><![CDATA[4B828F4D03264080AA1D2057B13F613C]]></AD_DEPENDENT_MODULE_ID>
-<!--A9CB99330AF34944877F889DD8A0AB3C-->  <STARTVERSION><![CDATA[2.1.29717]]></STARTVERSION>
+<!--A9CB99330AF34944877F889DD8A0AB3C-->  <STARTVERSION><![CDATA[2.1.29935]]></STARTVERSION>
 <!--A9CB99330AF34944877F889DD8A0AB3C-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--A9CB99330AF34944877F889DD8A0AB3C-->  <DEPENDANT_MODULE_NAME><![CDATA[User Interface Client Kernel]]></DEPENDANT_MODULE_NAME>
 <!--A9CB99330AF34944877F889DD8A0AB3C-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -147,7 +147,7 @@
 <!--E72A053A403C4A98A189C105B850ADB0-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--E72A053A403C4A98A189C105B850ADB0-->  <AD_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_MODULE_ID>
 <!--E72A053A403C4A98A189C105B850ADB0-->  <AD_DEPENDENT_MODULE_ID><![CDATA[C70732EA90A14EC0916078B85CC33D2D]]></AD_DEPENDENT_MODULE_ID>
-<!--E72A053A403C4A98A189C105B850ADB0-->  <STARTVERSION><![CDATA[1.1.29717]]></STARTVERSION>
+<!--E72A053A403C4A98A189C105B850ADB0-->  <STARTVERSION><![CDATA[1.1.29935]]></STARTVERSION>
 <!--E72A053A403C4A98A189C105B850ADB0-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--E72A053A403C4A98A189C105B850ADB0-->  <DEPENDANT_MODULE_NAME><![CDATA[JBoss Weld]]></DEPENDANT_MODULE_NAME>
 <!--E72A053A403C4A98A189C105B850ADB0-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -161,7 +161,7 @@
 <!--F62443FC17DA4C0E84FBCA9F2E5B68C0-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--F62443FC17DA4C0E84FBCA9F2E5B68C0-->  <AD_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_MODULE_ID>
 <!--F62443FC17DA4C0E84FBCA9F2E5B68C0-->  <AD_DEPENDENT_MODULE_ID><![CDATA[F8D1B3ECB3474E8DA5C216473C840DF1]]></AD_DEPENDENT_MODULE_ID>
-<!--F62443FC17DA4C0E84FBCA9F2E5B68C0-->  <STARTVERSION><![CDATA[2.0.29717]]></STARTVERSION>
+<!--F62443FC17DA4C0E84FBCA9F2E5B68C0-->  <STARTVERSION><![CDATA[2.0.29935]]></STARTVERSION>
 <!--F62443FC17DA4C0E84FBCA9F2E5B68C0-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--F62443FC17DA4C0E84FBCA9F2E5B68C0-->  <DEPENDANT_MODULE_NAME><![CDATA[JSON REST Webservice]]></DEPENDANT_MODULE_NAME>
 <!--F62443FC17DA4C0E84FBCA9F2E5B68C0-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.v3/src-db/database/sourcedata/AD_MODULE.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.v3/src-db/database/sourcedata/AD_MODULE.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -6,7 +6,7 @@
 <!--0138E7A89B5E4DC3932462252801FFBC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--0138E7A89B5E4DC3932462252801FFBC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--0138E7A89B5E4DC3932462252801FFBC-->  <NAME><![CDATA[Openbravo 3.0]]></NAME>
-<!--0138E7A89B5E4DC3932462252801FFBC-->  <VERSION><![CDATA[3.0.29717]]></VERSION>
+<!--0138E7A89B5E4DC3932462252801FFBC-->  <VERSION><![CDATA[3.0.29935]]></VERSION>
 <!--0138E7A89B5E4DC3932462252801FFBC-->  <DESCRIPTION><![CDATA[Openbravo 3.0 distribution template]]></DESCRIPTION>
 <!--0138E7A89B5E4DC3932462252801FFBC-->  <HELP><![CDATA[Openbravo 3.0 is a collection (distribution) of modules. This template is a container of all the modules and configuration changes that compose Openbravo 3.0.]]></HELP>
 <!--0138E7A89B5E4DC3932462252801FFBC-->  <URL><![CDATA[http://forge.openbravo.com/projects/vthree]]></URL>
--- a/modules/org.openbravo.v3/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/modules/org.openbravo.v3/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -7,7 +7,7 @@
 <!--48D556894CE54CF998DC97882E904CBD-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--48D556894CE54CF998DC97882E904CBD-->  <AD_MODULE_ID><![CDATA[0138E7A89B5E4DC3932462252801FFBC]]></AD_MODULE_ID>
 <!--48D556894CE54CF998DC97882E904CBD-->  <AD_DEPENDENT_MODULE_ID><![CDATA[8A098711BB324335A19833286BDB093D]]></AD_DEPENDENT_MODULE_ID>
-<!--48D556894CE54CF998DC97882E904CBD-->  <STARTVERSION><![CDATA[1.0.29717]]></STARTVERSION>
+<!--48D556894CE54CF998DC97882E904CBD-->  <STARTVERSION><![CDATA[1.0.29935]]></STARTVERSION>
 <!--48D556894CE54CF998DC97882E904CBD-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--48D556894CE54CF998DC97882E904CBD-->  <DEPENDANT_MODULE_NAME><![CDATA[Apache External Connection Pool]]></DEPENDANT_MODULE_NAME>
 <!--48D556894CE54CF998DC97882E904CBD-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -21,7 +21,7 @@
 <!--4D11E3A70650475381139522373CD191-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--4D11E3A70650475381139522373CD191-->  <AD_MODULE_ID><![CDATA[0138E7A89B5E4DC3932462252801FFBC]]></AD_MODULE_ID>
 <!--4D11E3A70650475381139522373CD191-->  <AD_DEPENDENT_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_DEPENDENT_MODULE_ID>
-<!--4D11E3A70650475381139522373CD191-->  <STARTVERSION><![CDATA[2.1.29717]]></STARTVERSION>
+<!--4D11E3A70650475381139522373CD191-->  <STARTVERSION><![CDATA[2.1.29935]]></STARTVERSION>
 <!--4D11E3A70650475381139522373CD191-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--4D11E3A70650475381139522373CD191-->  <DEPENDANT_MODULE_NAME><![CDATA[Openbravo 3.0 Framework]]></DEPENDANT_MODULE_NAME>
 <!--4D11E3A70650475381139522373CD191-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -35,7 +35,7 @@
 <!--52CE523C40634C47A99C6EBBD9C3125C-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--52CE523C40634C47A99C6EBBD9C3125C-->  <AD_MODULE_ID><![CDATA[0138E7A89B5E4DC3932462252801FFBC]]></AD_MODULE_ID>
 <!--52CE523C40634C47A99C6EBBD9C3125C-->  <AD_DEPENDENT_MODULE_ID><![CDATA[2A5EE903D7974AC298C0504FBC4501A7]]></AD_DEPENDENT_MODULE_ID>
-<!--52CE523C40634C47A99C6EBBD9C3125C-->  <STARTVERSION><![CDATA[3.0.29717]]></STARTVERSION>
+<!--52CE523C40634C47A99C6EBBD9C3125C-->  <STARTVERSION><![CDATA[3.0.29935]]></STARTVERSION>
 <!--52CE523C40634C47A99C6EBBD9C3125C-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--52CE523C40634C47A99C6EBBD9C3125C-->  <DEPENDANT_MODULE_NAME><![CDATA[Payment Report]]></DEPENDANT_MODULE_NAME>
 <!--52CE523C40634C47A99C6EBBD9C3125C-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -49,7 +49,7 @@
 <!--60834727BB114764ACEF019F40A34562-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--60834727BB114764ACEF019F40A34562-->  <AD_MODULE_ID><![CDATA[0138E7A89B5E4DC3932462252801FFBC]]></AD_MODULE_ID>
 <!--60834727BB114764ACEF019F40A34562-->  <AD_DEPENDENT_MODULE_ID><![CDATA[3A3A943684D64DEF9EC39F588A656848]]></AD_DEPENDENT_MODULE_ID>
-<!--60834727BB114764ACEF019F40A34562-->  <STARTVERSION><![CDATA[1.1.29717]]></STARTVERSION>
+<!--60834727BB114764ACEF019F40A34562-->  <STARTVERSION><![CDATA[1.1.29935]]></STARTVERSION>
 <!--60834727BB114764ACEF019F40A34562-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--60834727BB114764ACEF019F40A34562-->  <DEPENDANT_MODULE_NAME><![CDATA[Orders Awaiting Delivery]]></DEPENDANT_MODULE_NAME>
 <!--60834727BB114764ACEF019F40A34562-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -63,7 +63,7 @@
 <!--8418885E97D643138B6D907671351E3D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--8418885E97D643138B6D907671351E3D-->  <AD_MODULE_ID><![CDATA[0138E7A89B5E4DC3932462252801FFBC]]></AD_MODULE_ID>
 <!--8418885E97D643138B6D907671351E3D-->  <AD_DEPENDENT_MODULE_ID><![CDATA[883B5872CA0548F9AF2BBBE7D2DDFA61]]></AD_DEPENDENT_MODULE_ID>
-<!--8418885E97D643138B6D907671351E3D-->  <STARTVERSION><![CDATA[3.0.29717]]></STARTVERSION>
+<!--8418885E97D643138B6D907671351E3D-->  <STARTVERSION><![CDATA[3.0.29935]]></STARTVERSION>
 <!--8418885E97D643138B6D907671351E3D-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--8418885E97D643138B6D907671351E3D-->  <DEPENDANT_MODULE_NAME><![CDATA[Standard Roles]]></DEPENDANT_MODULE_NAME>
 <!--8418885E97D643138B6D907671351E3D-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -77,7 +77,7 @@
 <!--A32F3279B3374FC0A6CFEA2368BB7053-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--A32F3279B3374FC0A6CFEA2368BB7053-->  <AD_MODULE_ID><![CDATA[0138E7A89B5E4DC3932462252801FFBC]]></AD_MODULE_ID>
 <!--A32F3279B3374FC0A6CFEA2368BB7053-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--A32F3279B3374FC0A6CFEA2368BB7053-->  <STARTVERSION><![CDATA[3.0.29717]]></STARTVERSION>
+<!--A32F3279B3374FC0A6CFEA2368BB7053-->  <STARTVERSION><![CDATA[3.0.29935]]></STARTVERSION>
 <!--A32F3279B3374FC0A6CFEA2368BB7053-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--A32F3279B3374FC0A6CFEA2368BB7053-->  <DEPENDANT_MODULE_NAME><![CDATA[Core]]></DEPENDANT_MODULE_NAME>
 <!--A32F3279B3374FC0A6CFEA2368BB7053-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MINOR]]></DEPENDENCY_ENFORCEMENT>
@@ -91,7 +91,7 @@
 <!--ED06CE9F2AFD4092871D9E9494AF42DD-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--ED06CE9F2AFD4092871D9E9494AF42DD-->  <AD_MODULE_ID><![CDATA[0138E7A89B5E4DC3932462252801FFBC]]></AD_MODULE_ID>
 <!--ED06CE9F2AFD4092871D9E9494AF42DD-->  <AD_DEPENDENT_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_DEPENDENT_MODULE_ID>
-<!--ED06CE9F2AFD4092871D9E9494AF42DD-->  <STARTVERSION><![CDATA[3.0.29717]]></STARTVERSION>
+<!--ED06CE9F2AFD4092871D9E9494AF42DD-->  <STARTVERSION><![CDATA[3.0.29935]]></STARTVERSION>
 <!--ED06CE9F2AFD4092871D9E9494AF42DD-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--ED06CE9F2AFD4092871D9E9494AF42DD-->  <DEPENDANT_MODULE_NAME><![CDATA[Advanced Payables and Receivables Mngmt]]></DEPENDANT_MODULE_NAME>
 <!--ED06CE9F2AFD4092871D9E9494AF42DD-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -105,7 +105,7 @@
 <!--FEF6E40F244A4061B7C62CB755663712-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FEF6E40F244A4061B7C62CB755663712-->  <AD_MODULE_ID><![CDATA[0138E7A89B5E4DC3932462252801FFBC]]></AD_MODULE_ID>
 <!--FEF6E40F244A4061B7C62CB755663712-->  <AD_DEPENDENT_MODULE_ID><![CDATA[8A34B301DC524EA3A07513DF9F42CC90]]></AD_DEPENDENT_MODULE_ID>
-<!--FEF6E40F244A4061B7C62CB755663712-->  <STARTVERSION><![CDATA[1.0.29717]]></STARTVERSION>
+<!--FEF6E40F244A4061B7C62CB755663712-->  <STARTVERSION><![CDATA[1.0.29935]]></STARTVERSION>
 <!--FEF6E40F244A4061B7C62CB755663712-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--FEF6E40F244A4061B7C62CB755663712-->  <DEPENDANT_MODULE_NAME><![CDATA[Log Clean Up Utility]]></DEPENDANT_MODULE_NAME>
 <!--FEF6E40F244A4061B7C62CB755663712-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -119,7 +119,7 @@
 <!--FF8080813189932B013189B45B59003A-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF8080813189932B013189B45B59003A-->  <AD_MODULE_ID><![CDATA[0138E7A89B5E4DC3932462252801FFBC]]></AD_MODULE_ID>
 <!--FF8080813189932B013189B45B59003A-->  <AD_DEPENDENT_MODULE_ID><![CDATA[FF8080813141B198013141B86DD70003]]></AD_DEPENDENT_MODULE_ID>
-<!--FF8080813189932B013189B45B59003A-->  <STARTVERSION><![CDATA[0.1.29717]]></STARTVERSION>
+<!--FF8080813189932B013189B45B59003A-->  <STARTVERSION><![CDATA[0.1.29935]]></STARTVERSION>
 <!--FF8080813189932B013189B45B59003A-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--FF8080813189932B013189B45B59003A-->  <DEPENDANT_MODULE_NAME><![CDATA[OpenID Service Integration]]></DEPENDANT_MODULE_NAME>
 <!--FF8080813189932B013189B45B59003A-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -133,7 +133,7 @@
 <!--FF8080813189932B013189B4C00F003D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF8080813189932B013189B4C00F003D-->  <AD_MODULE_ID><![CDATA[0138E7A89B5E4DC3932462252801FFBC]]></AD_MODULE_ID>
 <!--FF8080813189932B013189B4C00F003D-->  <AD_DEPENDENT_MODULE_ID><![CDATA[FF8080813129ADA401312CA1222A0005]]></AD_DEPENDENT_MODULE_ID>
-<!--FF8080813189932B013189B4C00F003D-->  <STARTVERSION><![CDATA[0.1.29717]]></STARTVERSION>
+<!--FF8080813189932B013189B4C00F003D-->  <STARTVERSION><![CDATA[0.1.29935]]></STARTVERSION>
 <!--FF8080813189932B013189B4C00F003D-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--FF8080813189932B013189B4C00F003D-->  <DEPENDANT_MODULE_NAME><![CDATA[Integration with Google APIs]]></DEPENDANT_MODULE_NAME>
 <!--FF8080813189932B013189B4C00F003D-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -147,7 +147,7 @@
 <!--FF8081812E2F6F3C012E2F750109001C-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF8081812E2F6F3C012E2F750109001C-->  <AD_MODULE_ID><![CDATA[0138E7A89B5E4DC3932462252801FFBC]]></AD_MODULE_ID>
 <!--FF8081812E2F6F3C012E2F750109001C-->  <AD_DEPENDENT_MODULE_ID><![CDATA[FF8080812D842086012D844F3CC0003E]]></AD_DEPENDENT_MODULE_ID>
-<!--FF8081812E2F6F3C012E2F750109001C-->  <STARTVERSION><![CDATA[0.0.29717]]></STARTVERSION>
+<!--FF8081812E2F6F3C012E2F750109001C-->  <STARTVERSION><![CDATA[0.0.29935]]></STARTVERSION>
 <!--FF8081812E2F6F3C012E2F750109001C-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--FF8081812E2F6F3C012E2F750109001C-->  <DEPENDANT_MODULE_NAME><![CDATA[Widgets Collection]]></DEPENDANT_MODULE_NAME>
 <!--FF8081812E2F6F3C012E2F750109001C-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/src-core/src/org/openbravo/database/SessionInfo.java	Fri Aug 26 10:16:17 2016 +0200
+++ b/src-core/src/org/openbravo/database/SessionInfo.java	Mon Aug 29 09:04:15 2016 +0200
@@ -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) 2009-2013 Openbravo SLU 
+ * All portions are Copyright (C) 2009-2016 Openbravo SLU
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -199,7 +199,9 @@
    *          Connection where the session information will be stored in
    * @param rdbms
    *          Database type
+   * @deprecated
    */
+  @Deprecated
   public static void setDBSessionInfo(Connection conn, String rdbms) {
     if (!isAuditActive) {
       return;
--- a/src-db/database/model/views/C_INVOICETAX_CASHVAT_V.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/src-db/database/model/views/C_INVOICETAX_CASHVAT_V.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -1,4 +1,4 @@
 <?xml version="1.0"?>
   <database name="VIEW C_INVOICETAX_CASHVAT_V">
-    <view name="C_INVOICETAX_CASHVAT_V"><![CDATA[SELECT itcv.c_invoicetax_cashvat_id AS c_invoicetax_cashvat_v_id, itcv.ad_client_id, itcv.ad_org_id, itcv.created, itcv.createdby, itcv.updated, itcv.updatedby, itcv.isactive, fp.paymentdate, itcv.percentage, itcv.taxamt, itcv.taxbaseamt, fpsd.iscanceled, fp.fin_payment_id, fpd.fin_payment_detail_id, fp.isreceipt, fp.c_bpartner_id, fp.fin_paymentmethod_id, fp.status, fp.amount, fp.c_currency_id, itcv.c_invoicetax_id, itcv.ismanualsettlement FROM c_invoicetax_cashvat itcv JOIN c_invoicetax it ON it.c_invoicetax_id = itcv.c_invoicetax_id JOIN fin_payment_detail fpd ON fpd.fin_payment_detail_id = itcv.fin_payment_detail_id JOIN fin_payment fp ON fp.fin_payment_id = fpd.fin_payment_id JOIN fin_payment_scheduledetail fpsd ON fpd.fin_payment_detail_id = fpsd.fin_payment_detail_id JOIN fin_payment_schedule fpsi ON fpsi.fin_payment_schedule_id = fpsd.fin_payment_schedule_invoice WHERE itcv.ismanualsettlement = 'N' AND fpsi.c_invoice_id = it.c_invoice_id UNION ALL SELECT itcv.c_invoicetax_cashvat_id AS c_invoicetax_cashvat_v_id, itcv.ad_client_id, itcv.ad_org_id, itcv.created, itcv.createdby, itcv.updated, itcv.updatedby, itcv.isactive, NULL AS paymentdate, itcv.percentage, itcv.taxamt, itcv.taxbaseamt, 'N' AS iscanceled, NULL AS fin_payment_id, NULL AS fin_payment_detail_id, NULL AS isreceipt, NULL AS c_bpartner_id, NULL AS fin_paymentmethod_id, NULL AS status, NULL AS amount, NULL AS c_currency_id, itcv.c_invoicetax_id, itcv.ismanualsettlement FROM c_invoicetax_cashvat itcv WHERE itcv.ismanualsettlement = 'Y']]></view>
+    <view name="C_INVOICETAX_CASHVAT_V"><![CDATA[SELECT itcv.c_invoicetax_cashvat_id AS c_invoicetax_cashvat_v_id, itcv.ad_client_id, itcv.ad_org_id, itcv.created, itcv.createdby, itcv.updated, itcv.updatedby, itcv.isactive, fp.paymentdate, itcv.percentage, itcv.taxamt, itcv.taxbaseamt, COALESCE(fpsd.iscanceled, 'N') AS iscanceled, fp.fin_payment_id, fpd.fin_payment_detail_id, fp.isreceipt, fp.c_bpartner_id, fp.fin_paymentmethod_id, fp.status, fp.amount, fp.c_currency_id, itcv.c_invoicetax_id, itcv.ismanualsettlement FROM c_invoicetax_cashvat itcv LEFT JOIN c_invoicetax it ON it.c_invoicetax_id = itcv.c_invoicetax_id LEFT JOIN fin_payment_detail fpd ON fpd.fin_payment_detail_id = itcv.fin_payment_detail_id LEFT JOIN fin_payment fp ON fp.fin_payment_id = fpd.fin_payment_id LEFT JOIN fin_payment_scheduledetail fpsd ON fpd.fin_payment_detail_id = fpsd.fin_payment_detail_id LEFT JOIN fin_payment_schedule fpsi ON fpsi.fin_payment_schedule_id = fpsd.fin_payment_schedule_invoice WHERE itcv.ismanualsettlement = 'N' AND fpsi.c_invoice_id = it.c_invoice_id OR itcv.ismanualsettlement = 'Y']]></view>
   </database>
--- a/src-db/database/sourcedata/AD_MODULE.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/src-db/database/sourcedata/AD_MODULE.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -6,7 +6,7 @@
 <!--0-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--0-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--0-->  <NAME><![CDATA[Core]]></NAME>
-<!--0-->  <VERSION><![CDATA[3.0.29717]]></VERSION>
+<!--0-->  <VERSION><![CDATA[3.0.29935]]></VERSION>
 <!--0-->  <DESCRIPTION><![CDATA[Core module is the base one]]></DESCRIPTION>
 <!--0-->  <HELP><![CDATA[Core module is the base one, all developments in core are included as part of the standard Openbravo ERP.]]></HELP>
 <!--0-->  <URL><![CDATA[www.openbravo.com]]></URL>
--- a/src-db/database/sourcedata/AD_REF_TREE.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/src-db/database/sourcedata/AD_REF_TREE.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -7,7 +7,7 @@
 <!--95582A51651D415993D0FD3B64C8E861-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--95582A51651D415993D0FD3B64C8E861-->  <AD_REFERENCE_ID><![CDATA[D3D9A7BAF4594950922A22B2D7ABFA74]]></AD_REFERENCE_ID>
 <!--95582A51651D415993D0FD3B64C8E861-->  <AD_TABLE_ID><![CDATA[E913D17C9B3847CF92235082DBE2EC44]]></AD_TABLE_ID>
-<!--95582A51651D415993D0FD3B64C8E861-->  <WHERECLAUSE><![CDATA[e.characteristic.id=@parentCharId@]]></WHERECLAUSE>
+<!--95582A51651D415993D0FD3B64C8E861-->  <WHERECLAUSE><![CDATA[e.characteristic.id= @parentCharId@ and ('-1'= @productCharSubsetId@ or e.id in ( select  cs.characteristicValue.id from CharacteristicSubsetValue cs where cs.characteristicSubset.id = @productCharSubsetId@))]]></WHERECLAUSE>
 <!--95582A51651D415993D0FD3B64C8E861-->  <VALUEFIELD_ID><![CDATA[7B82AF2B5C2C48CDB05C78BA3DC26989]]></VALUEFIELD_ID>
 <!--95582A51651D415993D0FD3B64C8E861-->  <DISPLAYFIELD_ID><![CDATA[01982CD5659A4E76A0781FBE4FA3CFC7]]></DISPLAYFIELD_ID>
 <!--95582A51651D415993D0FD3B64C8E861-->  <AD_TABLE_TREE_ID><![CDATA[B6C7204712CC4EDEB5705C93F706DF05]]></AD_TABLE_TREE_ID>
--- a/src-db/database/sourcedata/AD_TEXTINTERFACES.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/src-db/database/sourcedata/AD_TEXTINTERFACES.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -13930,6 +13930,17 @@
 <!--3970C02EB23F4983A349D2726F5F4BF6-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--3970C02EB23F4983A349D2726F5F4BF6--></AD_TEXTINTERFACES>
 
+<!--39A0FA8EF38721A1E0530100007FB0C3--><AD_TEXTINTERFACES>
+<!--39A0FA8EF38721A1E0530100007FB0C3-->  <AD_TEXTINTERFACES_ID><![CDATA[39A0FA8EF38721A1E0530100007FB0C3]]></AD_TEXTINTERFACES_ID>
+<!--39A0FA8EF38721A1E0530100007FB0C3-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--39A0FA8EF38721A1E0530100007FB0C3-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--39A0FA8EF38721A1E0530100007FB0C3-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--39A0FA8EF38721A1E0530100007FB0C3-->  <TEXT><![CDATA[Period N-1:]]></TEXT>
+<!--39A0FA8EF38721A1E0530100007FB0C3-->  <FILENAME><![CDATA[/org/openbravo/erpCommon/ad_reports/GeneralAccountingReportsPDF.jrxml]]></FILENAME>
+<!--39A0FA8EF38721A1E0530100007FB0C3-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--39A0FA8EF38721A1E0530100007FB0C3-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--39A0FA8EF38721A1E0530100007FB0C3--></AD_TEXTINTERFACES>
+
 <!--39F1C6FF551B4210BE3EC6F1904DE43B--><AD_TEXTINTERFACES>
 <!--39F1C6FF551B4210BE3EC6F1904DE43B-->  <AD_TEXTINTERFACES_ID><![CDATA[39F1C6FF551B4210BE3EC6F1904DE43B]]></AD_TEXTINTERFACES_ID>
 <!--39F1C6FF551B4210BE3EC6F1904DE43B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -14249,17 +14260,6 @@
 <!--48AF9E125D2143669AFAAA89D52473D3-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--48AF9E125D2143669AFAAA89D52473D3--></AD_TEXTINTERFACES>
 
-<!--48B16F0CEB9E47D4BF0963C89D22504D--><AD_TEXTINTERFACES>
-<!--48B16F0CEB9E47D4BF0963C89D22504D-->  <AD_TEXTINTERFACES_ID><![CDATA[48B16F0CEB9E47D4BF0963C89D22504D]]></AD_TEXTINTERFACES_ID>
-<!--48B16F0CEB9E47D4BF0963C89D22504D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--48B16F0CEB9E47D4BF0963C89D22504D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--48B16F0CEB9E47D4BF0963C89D22504D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--48B16F0CEB9E47D4BF0963C89D22504D-->  <TEXT><![CDATA[Period N-1]]></TEXT>
-<!--48B16F0CEB9E47D4BF0963C89D22504D-->  <FILENAME><![CDATA[/org/openbravo/erpCommon/ad_reports/GeneralAccountingReportsPDF.jrxml]]></FILENAME>
-<!--48B16F0CEB9E47D4BF0963C89D22504D-->  <ISUSED><![CDATA[Y]]></ISUSED>
-<!--48B16F0CEB9E47D4BF0963C89D22504D-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--48B16F0CEB9E47D4BF0963C89D22504D--></AD_TEXTINTERFACES>
-
 <!--4A2CBA2EA7EF4F01843340C1921843F1--><AD_TEXTINTERFACES>
 <!--4A2CBA2EA7EF4F01843340C1921843F1-->  <AD_TEXTINTERFACES_ID><![CDATA[4A2CBA2EA7EF4F01843340C1921843F1]]></AD_TEXTINTERFACES_ID>
 <!--4A2CBA2EA7EF4F01843340C1921843F1-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -14414,6 +14414,17 @@
 <!--4D6F7EFED00711DDBE8C001D09C4A2FE-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--4D6F7EFED00711DDBE8C001D09C4A2FE--></AD_TEXTINTERFACES>
 
+<!--4DE64DE174C34EA2AC63A7522575A600--><AD_TEXTINTERFACES>
+<!--4DE64DE174C34EA2AC63A7522575A600-->  <AD_TEXTINTERFACES_ID><![CDATA[4DE64DE174C34EA2AC63A7522575A600]]></AD_TEXTINTERFACES_ID>
+<!--4DE64DE174C34EA2AC63A7522575A600-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--4DE64DE174C34EA2AC63A7522575A600-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--4DE64DE174C34EA2AC63A7522575A600-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--4DE64DE174C34EA2AC63A7522575A600-->  <TEXT><![CDATA[Compare To]]></TEXT>
+<!--4DE64DE174C34EA2AC63A7522575A600-->  <FILENAME><![CDATA[/org/openbravo/erpCommon/ad_reports/GeneralAccountingReports.html]]></FILENAME>
+<!--4DE64DE174C34EA2AC63A7522575A600-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--4DE64DE174C34EA2AC63A7522575A600-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--4DE64DE174C34EA2AC63A7522575A600--></AD_TEXTINTERFACES>
+
 <!--4E80DAAC37BB49D09A8EF2737160FEF5--><AD_TEXTINTERFACES>
 <!--4E80DAAC37BB49D09A8EF2737160FEF5-->  <AD_TEXTINTERFACES_ID><![CDATA[4E80DAAC37BB49D09A8EF2737160FEF5]]></AD_TEXTINTERFACES_ID>
 <!--4E80DAAC37BB49D09A8EF2737160FEF5-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src/org/openbravo/base/secureApp/OrgTree.java	Fri Aug 26 10:16:17 2016 +0200
+++ b/src/org/openbravo/base/secureApp/OrgTree.java	Mon Aug 29 09:04:15 2016 +0200
@@ -204,9 +204,9 @@
     String s = "";
     if (nodes == null)
       return "";
-    for (int i = 0; i < nodes.toArray().length; i++) {
+    for (int i = 0; i < nodes.size(); i++) {
       if (nodes.get(i) != null)
-        s += "'" + nodes.get(i).getId() + "'" + ((i < nodes.toArray().length - 1) ? "," : "");
+        s += "'" + nodes.get(i).getId() + "'" + ((i < nodes.size() - 1) ? "," : "");
     }
     return s;
   }
@@ -218,10 +218,10 @@
     String s = "";
     if (nodes == null)
       return "";
-    for (int i = 0; i < nodes.toArray().length; i++) {
+    for (int i = 0; i < nodes.size(); i++) {
       if (nodes.get(i) != null)
         s += nodes.get(i).getId() + " - " + nodes.get(i).getValue()
-            + ((i < nodes.toArray().length - 1) ? "\n" : "");
+            + ((i < nodes.size() - 1) ? "\n" : "");
     }
     return s;
   }
@@ -233,7 +233,7 @@
    */
   private void addTree(OrgTree t1) {
     if ((t1 != null) && (t1.nodes != null)) {
-      for (int i = 0; i < t1.nodes.toArray().length; i++) {
+      for (int i = 0; i < t1.nodes.size(); i++) {
         if (!this.isNodeInTree(t1.nodes.get(i).getId()))
           this.nodes.add(t1.nodes.get(i));
       }
@@ -278,15 +278,15 @@
         list.add(getNodeById(parentNodeId));
       else {
         boolean exists = false;
-        for (int i = 0; i < list.toArray().length; i++)
+        for (int i = 0; i < list.size(); i++)
           if (list.get(i).equals(parentNodeId))
             exists = true;
         if ((!exists) && (withZero || !getNodeById(parentNodeId).getId().equals("0")))
           list.add(getNodeById(parentNodeId));
       }
     }
-    if (childNodes.toArray().length != 0)
-      for (int i = 0; i < childNodes.toArray().length; i++)
+    if (childNodes.size() != 0)
+      for (int i = 0; i < childNodes.size(); i++)
         getDescendantTreeList(childNodes.get(i).getId(), list, repeatNodes, withZero);
 
   }
@@ -307,7 +307,7 @@
   private OrgTreeNode getNodeById(String id) {
     if (nodes == null)
       return null;
-    for (int i = 0; i < nodes.toArray().length; i++)
+    for (int i = 0; i < nodes.size(); i++)
       if (nodes.get(i).equals(id))
         return nodes.get(i);
     return null;
@@ -319,7 +319,7 @@
   private boolean isNodeInTree(String id) {
     if (nodes == null)
       return false;
-    for (int i = 0; i < nodes.toArray().length; i++)
+    for (int i = 0; i < nodes.size(); i++)
       if (nodes.get(i).equals(id))
         return true;
     return false;
@@ -331,7 +331,7 @@
   private List<OrgTreeNode> getNodesWithParent(String parentId) {
     List<OrgTreeNode> vecNodes = new ArrayList<OrgTreeNode>();
     int idx = 0;
-    for (int i = 0; i < nodes.toArray().length; i++)
+    for (int i = 0; i < nodes.size(); i++)
       if (nodes.get(i).getParentId().equals(parentId)) {
         vecNodes.add(idx++, nodes.get(i));
       }
--- a/src/org/openbravo/costing/CostingRuleProcess.java	Fri Aug 26 10:16:17 2016 +0200
+++ b/src/org/openbravo/costing/CostingRuleProcess.java	Mon Aug 29 09:04:15 2016 +0200
@@ -580,6 +580,9 @@
           if (existsPreviousRule) {
             trxCost = CostingUtils.getTransactionCost(trx, startingDate, true, cur);
             if (trx.getMovementQuantity().compareTo(BigDecimal.ZERO) != 0) {
+              if (trxCost == null) {
+                throw new OBException("@NoCostCalculated@: " + trx.getIdentifier());
+              }
               cost = trxCost.divide(trx.getMovementQuantity().abs(), cur.getCostingPrecision()
                   .intValue(), RoundingMode.HALF_UP);
               trx = OBDal.getInstance().get(MaterialTransaction.class, trx.getId());
--- a/src/org/openbravo/dal/core/DalSessionFactory.java	Fri Aug 26 10:16:17 2016 +0200
+++ b/src/org/openbravo/dal/core/DalSessionFactory.java	Mon Aug 29 09:04:15 2016 +0200
@@ -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) 2009-2011 Openbravo SLU 
+ * All portions are Copyright (C) 2009-2016 Openbravo SLU
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -162,6 +162,7 @@
   /**
    * Note method sets user session information in the database and opens a connection for this.
    */
+  @Override
   public Session openSession() throws HibernateException {
     // NOTE: workaround for this issue:
     // http://opensource.atlassian.com/projects/hibernate/browse/HHH-3529
@@ -171,6 +172,7 @@
       Thread.currentThread().setContextClassLoader(BorrowedConnectionProxy.class.getClassLoader());
       final Properties props = OBPropertiesProvider.getInstance().getOpenbravoProperties();
       Connection conn = ((SessionImplementor) session).connection();
+      // When a connection is obtained using the DAL pool it is necessary to call the initDB method.
       SessionInfo.initDB(conn, props.getProperty("bbdd.rdbms"));
       SessionInfo.setDBSessionInfo(conn);
       PreparedStatement pstmt = null;
@@ -198,16 +200,28 @@
   /**
    * Note method sets user session information in the database and opens a connection for this.
    */
+  @Override
   public Session openSession(Connection connection, Interceptor interceptor) {
     // NOTE: workaround for this issue:
     // http://opensource.atlassian.com/projects/hibernate/browse/HHH-3529
     final Session session = delegateSessionFactory.openSession(connection, interceptor);
+    Connection conn = ((SessionImplementor) session).connection();
+    initializeDBSessionInfo(conn);
+    return session;
+  }
+
+  /**
+   * Note method sets user session information in the database and opens a connection for this.
+   */
+  @Override
+  public Session openSession(Connection connection) {
+    // NOTE: workaround for this issue:
+    // http://opensource.atlassian.com/projects/hibernate/browse/HHH-3529
+    final Session session = delegateSessionFactory.openSession(connection);
     final ClassLoader currentLoader = Thread.currentThread().getContextClassLoader();
     try {
       Thread.currentThread().setContextClassLoader(BorrowedConnectionProxy.class.getClassLoader());
       Connection conn = ((SessionImplementor) session).connection();
-      SessionInfo.initDB(conn, OBPropertiesProvider.getInstance().getOpenbravoProperties()
-          .getProperty("bbdd.rdbms"));
       SessionInfo.setDBSessionInfo(conn);
     } finally {
       Thread.currentThread().setContextClassLoader(currentLoader);
@@ -218,81 +232,52 @@
   /**
    * Note method sets user session information in the database and opens a connection for this.
    */
-  public Session openSession(Connection connection) {
+  @Override
+  public Session openSession(Interceptor interceptor) throws HibernateException {
     // NOTE: workaround for this issue:
     // http://opensource.atlassian.com/projects/hibernate/browse/HHH-3529
-    final Session session = delegateSessionFactory.openSession(connection);
+    final Session session = delegateSessionFactory.openSession(interceptor);
+    Connection conn = ((SessionImplementor) session).connection();
+    initializeDBSessionInfo(conn);
+    return session;
+  }
+
+  /**
+   * Note method sets user session information in the database and opens a connection for this.
+   */
+  @Override
+  public StatelessSession openStatelessSession() {
+    // NOTE: workaround for this issue:
+    // http://opensource.atlassian.com/projects/hibernate/browse/HHH-3529
+    final StatelessSession session = delegateSessionFactory.openStatelessSession();
+    Connection conn = ((SessionImplementor) session).connection();
+    initializeDBSessionInfo(conn);
+    return session;
+  }
+
+  /**
+   * Note method sets user session information in the database and opens a connection for this.
+   */
+  @Override
+  public StatelessSession openStatelessSession(Connection connection) {
+    // NOTE: workaround for this issue:
+    // http://opensource.atlassian.com/projects/hibernate/browse/HHH-3529
+    final StatelessSession session = delegateSessionFactory.openStatelessSession(connection);
+    Connection conn = ((SessionImplementor) session).connection();
+    initializeDBSessionInfo(conn);
+    return session;
+  }
+
+  private void initializeDBSessionInfo(Connection conn) {
     final ClassLoader currentLoader = Thread.currentThread().getContextClassLoader();
     try {
       Thread.currentThread().setContextClassLoader(BorrowedConnectionProxy.class.getClassLoader());
-      Connection conn = ((SessionImplementor) session).connection();
       SessionInfo.initDB(conn, OBPropertiesProvider.getInstance().getOpenbravoProperties()
           .getProperty("bbdd.rdbms"));
       SessionInfo.setDBSessionInfo(conn);
     } finally {
       Thread.currentThread().setContextClassLoader(currentLoader);
     }
-    return session;
-  }
-
-  /**
-   * Note method sets user session information in the database and opens a connection for this.
-   */
-  public Session openSession(Interceptor interceptor) throws HibernateException {
-    // NOTE: workaround for this issue:
-    // http://opensource.atlassian.com/projects/hibernate/browse/HHH-3529
-    final Session session = delegateSessionFactory.openSession(interceptor);
-    final ClassLoader currentLoader = Thread.currentThread().getContextClassLoader();
-    try {
-      Thread.currentThread().setContextClassLoader(BorrowedConnectionProxy.class.getClassLoader());
-      Connection conn = ((SessionImplementor) session).connection();
-      SessionInfo.initDB(conn, OBPropertiesProvider.getInstance().getOpenbravoProperties()
-          .getProperty("bbdd.rdbms"));
-      SessionInfo.setDBSessionInfo(conn);
-    } finally {
-      Thread.currentThread().setContextClassLoader(currentLoader);
-    }
-    return session;
-  }
-
-  /**
-   * Note method sets user session information in the database and opens a connection for this.
-   */
-  public StatelessSession openStatelessSession() {
-    // NOTE: workaround for this issue:
-    // http://opensource.atlassian.com/projects/hibernate/browse/HHH-3529
-    final StatelessSession session = delegateSessionFactory.openStatelessSession();
-    final ClassLoader currentLoader = Thread.currentThread().getContextClassLoader();
-    try {
-      Thread.currentThread().setContextClassLoader(BorrowedConnectionProxy.class.getClassLoader());
-      Connection conn = ((SessionImplementor) session).connection();
-      SessionInfo.initDB(conn, OBPropertiesProvider.getInstance().getOpenbravoProperties()
-          .getProperty("bbdd.rdbms"));
-      SessionInfo.setDBSessionInfo(conn);
-    } finally {
-      Thread.currentThread().setContextClassLoader(currentLoader);
-    }
-    return session;
-  }
-
-  /**
-   * Note method sets user session information in the database and opens a connection for this.
-   */
-  public StatelessSession openStatelessSession(Connection connection) {
-    // NOTE: workaround for this issue:
-    // http://opensource.atlassian.com/projects/hibernate/browse/HHH-3529
-    final StatelessSession session = delegateSessionFactory.openStatelessSession(connection);
-    final ClassLoader currentLoader = Thread.currentThread().getContextClassLoader();
-    try {
-      Thread.currentThread().setContextClassLoader(BorrowedConnectionProxy.class.getClassLoader());
-      Connection conn = ((SessionImplementor) session).connection();
-      SessionInfo.initDB(conn, OBPropertiesProvider.getInstance().getOpenbravoProperties()
-          .getProperty("bbdd.rdbms"));
-      SessionInfo.setDBSessionInfo(conn);
-    } finally {
-      Thread.currentThread().setContextClassLoader(currentLoader);
-    }
-    return session;
   }
 
   public Cache getCache() {
--- a/src/org/openbravo/dal/core/SessionHandler.java	Fri Aug 26 10:16:17 2016 +0200
+++ b/src/org/openbravo/dal/core/SessionHandler.java	Mon Aug 29 09:04:15 2016 +0200
@@ -40,6 +40,7 @@
 import org.openbravo.base.util.Check;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.database.ExternalConnectionPool;
+import org.openbravo.database.SessionInfo;
 import org.openbravo.service.db.DbUtility;
 
 /**
@@ -55,6 +56,7 @@
   private static final Logger log = Logger.getLogger(SessionHandler.class);
 
   private static ExternalConnectionPool externalConnectionPool;
+  private static String rbdms;
 
   {
     String poolClassName = OBPropertiesProvider.getInstance().getOpenbravoProperties()
@@ -67,6 +69,7 @@
         log.warn("External connection pool class not found: " + poolClassName, e);
       }
     }
+    rbdms = (String) OBPropertiesProvider.getInstance().getOpenbravoProperties().get("bbdd.rdbms");
   }
 
   // The threadlocal which handles the session
@@ -178,6 +181,7 @@
       // getting connection from Hibernate pool
       newConnection = ((DalSessionFactory) SessionFactoryController.getInstance()
           .getSessionFactory()).getConnectionProvider().getConnection();
+      SessionInfo.initDB(newConnection, rbdms);
     }
     return newConnection;
   }
--- a/src/org/openbravo/dal/service/OBCriteria.java	Fri Aug 26 10:16:17 2016 +0200
+++ b/src/org/openbravo/dal/service/OBCriteria.java	Mon Aug 29 09:04:15 2016 +0200
@@ -68,7 +68,6 @@
   private boolean filterOnReadableOrganization = true;
   private boolean filterOnActive = true;
   private List<OrderBy> orderBys = new ArrayList<OrderBy>();
-  private boolean initialized = false;
 
   // package visible
 
@@ -137,9 +136,6 @@
   }
 
   void initialize() {
-    if (initialized) {
-      return;
-    }
     final OBContext obContext = OBContext.getOBContext();
     final Entity e = getEntity();
 
@@ -184,7 +180,6 @@
     if (SessionInfo.getQueryProfile() != null) {
       QueryTimeOutUtil.getInstance().setQueryTimeOut(this, SessionInfo.getQueryProfile());
     }
-    initialized = true;
   }
 
   /**
--- a/src/org/openbravo/erpCommon/ad_callouts/SE_Invoice_BPartner.java	Fri Aug 26 10:16:17 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SE_Invoice_BPartner.java	Mon Aug 29 09:04:15 2016 +0200
@@ -405,7 +405,8 @@
           obc.add(Restrictions.in(FinAccPaymentMethod.PROPERTY_ORGANIZATION + ".id", OBContext
               .getOBContext().getOrganizationStructureProvider().getNaturalTree(strOrgId)));
 
-          if (obc.list() == null || obc.list().size() == 0) {
+          // filter is on unique constraint so list().size() <=1 always
+          if (obc.list().isEmpty()) {
             message = Utility.messageBD(this, "PaymentmethodNotbelongsFinAccount",
                 vars.getLanguage());
           }
--- a/src/org/openbravo/erpCommon/ad_forms/AcctServer_data.xsql	Fri Aug 26 10:16:17 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/AcctServer_data.xsql	Mon Aug 29 09:04:15 2016 +0200
@@ -12,7 +12,7 @@
  * Portions created by Jorg Janke are Copyright (C) 1999-2001 Jorg Janke, parts
  * created by ComPiere are Copyright (C) ComPiere, Inc.;   All Rights Reserved.
  * Contributor(s): Openbravo SLU
- * Contributions are Copyright (C) 2001-2013 Openbravo S.L.U.
+ * Contributions are Copyright (C) 2001-2016 Openbravo S.L.U.
  ******************************************************************************
 -->
 
@@ -529,30 +529,37 @@
       <![CDATA[
         select 1 as id from dual where exists ( select 1 from (
          SELECT a.dateacct as dateacct
-         from   c_invoice a, c_periodcontrol, c_period
+         FROM   c_invoice a
          WHERE a.ad_client_id = ?
-           AND a.ad_org_id in ('1')
-           AND a.posted = 'N'
-           AND a.processed = 'Y'
-           AND (a.processing = 'N' OR a.processing IS NULL)
-           and c_periodcontrol.c_period_id = c_period.c_period_id
-           AND c_periodcontrol.docbasetype = ?
-           AND c_periodcontrol.periodstatus = 'O'
-           AND ad_org_getperiodcontrolallow(a.ad_org_id) = c_periodcontrol.ad_org_id
-           AND  a.dateacct >= c_period.StartDate
-           AND   a.dateacct < c_period.EndDate + 1
-           ) b
+         AND a.ad_org_id in ('1')
+         AND a.posted = 'N'
+         AND a.processed = 'Y'
+         AND (a.processing = 'N' OR a.processing IS NULL)
+         AND EXISTS (
+           SELECT 1
+           FROM c_period p
+           WHERE  a.dateacct >= p.StartDate
+           AND   a.dateacct < p.EndDate + 1
+           AND EXISTS (
+             SELECT 1
+             FROM c_periodcontrol pc
+             WHERE pc.c_period_id = p.c_period_id
+             AND ad_org_getperiodcontrolallow(a.ad_org_id) = pc.ad_org_id
+             AND pc.docbasetype = ?
+             AND pc.periodstatus = 'O'
+           )
+         )) b
          where 1=1
          )
       ]]>
       </Sql>
       <Parameter name="columnName" type="replace" optional="true" after="SELECT a." text="dateacct"/>
-      <Parameter name="tableName" type="replace" optional="true" after="from   " text="c_invoice"/>
+      <Parameter name="tableName" type="replace" optional="true" after="FROM   " text="c_invoice"/>
       <Parameter name="adClientId" />
       <Parameter name="StrOrg" type="replace" optional="true" after="a.ad_org_id in (" text="'1'"/>
+      <Parameter name="columnName" type="replace" optional="true" after="WHERE  a." text="dateacct"/>
+      <Parameter name="columnName" type="replace" optional="true" after="AND   a." text="dateacct"/>
       <Parameter name="docbasetype"/>
-      <Parameter name="columnName" type="replace" optional="true" after="AND  a." text="dateacct"/>
-      <Parameter name="columnName" type="replace" optional="true" after="AND   a." text="dateacct"/>
       <Parameter name="dateFrom" optional="true" after="where 1=1"><![CDATA[ AND b.dateacct >= TO_DATE(?)]]></Parameter>
       <Parameter name="dateTo" optional="true" after="where 1=1"><![CDATA[ AND b.dateacct <= TO_DATE(?)]]></Parameter>
    </SqlMethod>
--- a/src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java	Fri Aug 26 10:16:17 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java	Mon Aug 29 09:04:15 2016 +0200
@@ -299,7 +299,7 @@
             paymentDetail.isPrepayment() ? (pso != null ? pso.getId() : "") : (psi != null ? psi
                 .getId() : ""));
 
-        if (i % 100 == 0) {
+        if ((i + 1) % 100 == 0) {
           OBDal.getInstance().getSession().clear();
         }
       }
@@ -633,12 +633,13 @@
           }
         }
 
-        if (i % 100 == 0) {
+        if ((i + 1) % 100 == 0) {
           OBDal.getInstance().getSession().clear();
         }
       }
       // Pre-payment is consumed when Used Credit Amount not equals Zero. When consuming Credit no
       // credit is generated
+      transaction = OBDal.getInstance().get(FIN_FinaccTransaction.class, Record_ID);
       if (transaction.getFinPayment().getUsedCredit().compareTo(ZERO) != 0
           && transaction.getFinPayment().getGeneratedCredit().compareTo(ZERO) == 0) {
         List<FIN_Payment_Credit> creditPayments = transaction.getFinPayment()
--- a/src/org/openbravo/erpCommon/ad_forms/DocFINPayment.java	Fri Aug 26 10:16:17 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/DocFINPayment.java	Mon Aug 29 09:04:15 2016 +0200
@@ -262,7 +262,7 @@
             paymentDetail.isPrepayment() ? (pso != null ? pso.getId() : "") : (psi != null ? psi
                 .getId() : ""));
 
-        if (i % 100 == 0) {
+        if ((i + 1) % 100 == 0) {
           OBDal.getInstance().getSession().clear();
         }
       }
@@ -476,7 +476,7 @@
               (isReceipt ? bpAmount : ""), Fact_Acct_Group_ID, nextSeqNo(SeqNo), DocumentType, conn);
         }
 
-        if (i % 100 == 0) {
+        if ((i + 1) % 100 == 0) {
           OBDal.getInstance().getSession().clear();
         }
       }
--- a/src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java	Fri Aug 26 10:16:17 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java	Mon Aug 29 09:04:15 2016 +0200
@@ -2363,8 +2363,9 @@
       qList.add(Restrictions.eq(org.openbravo.model.ad.domain.List.PROPERTY_REFERENCE + ".id",
           "8BA0A3775CE14CE69989B6C09982FB2E"));
       qList.addOrder(Order.asc(org.openbravo.model.ad.domain.List.PROPERTY_SEQUENCENUMBER));
-      SQLReturnObject[] fpEnforcementCombo = new SQLReturnObject[qList.list().size()];
-      for (org.openbravo.model.ad.domain.List value : qList.list()) {
+      List<org.openbravo.model.ad.domain.List> rList = qList.list();
+      SQLReturnObject[] fpEnforcementCombo = new SQLReturnObject[rList.size()];
+      for (org.openbravo.model.ad.domain.List value : rList) {
         SQLReturnObject val = new SQLReturnObject();
         val.setData("ID", value.getSearchKey());
         val.setData(
--- a/src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReports.html	Fri Aug 26 10:16:17 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReports.html	Mon Aug 29 09:04:15 2016 +0200
@@ -85,7 +85,7 @@
 		setWindowElementFocus(frm.inpAgno);
 		showJSMessage(7);
 		return false;
-	} else if (frm.inpAgnoRef.value == null || frm.inpAgnoRef.value == "") {
+	} else if (frm.inpCompareTo.checked && (frm.inpAgnoRef.value == null || frm.inpAgnoRef.value == "")) {
 		setWindowElementFocus(frm.inpAgnoRef);
 		showJSMessage(7);
 		return false;
@@ -171,6 +171,13 @@
     }
 }
 
+function onClickCompare() {
+	if(document.frmMain.inpCompareTo.checked)
+		displayLogicElement('trReferenceDetails', true);
+	else
+		displayLogicElement('trReferenceDetails', false);
+}
+
 function onloadFunctions() {
 }
 </script>
@@ -490,8 +497,15 @@
                     </TABLE>
                   </TD>
                 </tr>
+                
+                <!-- Improved Balance Sheet -->
+                <tr>
+                  <td class="TitleCell"><span class="LabelText">Compare To</span></td>
+                  <td class="Radio_Check_ContentCell"><input name="inpCompareTo" type="checkbox" id="fieldCompareTo" value="Y" onclick="onClickCompare();"></input></td>
+                </tr>
+                <!-- Improved Balance Sheet -->
 
-                <tr>
+                <tr id="trReferenceDetails">
                 <td class="TitleCell"><span class="LabelText">Reference Year</span></td>
                   <td class="Combo_ContentCell"> <SELECT name="inpAgnoRef" id="paramAgnoRef" class="ComboKey Combo_OneCell_width" onchange="displayLogic(); return true;">
                       <OPTION value=""></OPTION>
--- a/src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReports.java	Fri Aug 26 10:16:17 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReports.java	Mon Aug 29 09:04:15 2016 +0200
@@ -94,14 +94,19 @@
           "GeneralAccountingReports|conImporte", "N");
       String strConCodigo = vars.getGlobalVariable("inpConCodigo",
           "GeneralAccountingReports|conCodigo", "N");
+      /* Improved Balance Sheet */
+      String strCompareTo = vars.getGlobalVariable("inpCompareTo",
+          "GeneralAccountingReports|compareTo", "Y");
+
       String strLevel = vars.getGlobalVariable("inpLevel", "GeneralAccountingReports|level", "");
       printPageDataSheet(response, vars, "", "", strDateFrom, strDateTo, strPageNo, strDateFromRef,
           strDateToRef, strAsDateTo, strAsDateToRef, strElementValue, strConImporte, "", strLevel,
-          strConCodigo, "");
+          strConCodigo, "", strCompareTo);
     } else if (vars.commandIn("FIND")) {
       String strcAcctSchemaId = vars.getStringParameter("inpcAcctSchemaId", "");
       String strAgno = vars.getRequiredGlobalVariable("inpAgno", "GeneralAccountingReports|agno");
-      String strAgnoRef = vars.getRequiredGlobalVariable("inpAgnoRef",
+      /* Improved Balance Sheet */
+      String strAgnoRef = vars.getRequestGlobalVariable("inpAgnoRef",
           "GeneralAccountingReports|agnoRef");
       String strDateFrom = vars.getRequestGlobalVariable("inpDateFrom",
           "GeneralAccountingReports|dateFrom");
@@ -123,12 +128,15 @@
           "GeneralAccountingReports|conImporte");
       String strConCodigo = vars.getRequestGlobalVariable("inpConCodigo",
           "GeneralAccountingReports|conCodigo");
+      /* Improved Balance Sheet */
+      String strCompareTo = vars.getRequestGlobalVariable("inpCompareTo",
+          "GeneralAccountingReports|compareTo");
       String strOrg = vars.getRequestGlobalVariable("inpOrganizacion",
           "GeneralAccountingReports|organizacion");
       String strLevel = vars.getRequestGlobalVariable("inpLevel", "GeneralAccountingReports|level");
       printPagePDF(request, response, vars, strAgno, strAgnoRef, strDateFrom, strDateTo,
           strDateFromRef, strDateToRef, strAsDateTo, strAsDateToRef, strElementValue,
-          strConImporte, strOrg, strLevel, strConCodigo, strcAcctSchemaId, strPageNo);
+          strConImporte, strOrg, strLevel, strConCodigo, strcAcctSchemaId, strPageNo, strCompareTo);
     } else if (vars.commandIn("LEDGER")) {
       String strOrg = vars.getStringParameter("inpOrganizacion");
       if (StringUtils.isEmpty(strOrg)) {
@@ -150,8 +158,8 @@
       VariablesSecureApp vars, String strYearId, String strYearRefId, String strDateFrom,
       String strDateTo, String strDateFromRef, String strDateToRef, String strAsDateTo,
       String strAsDateToRef, String strElementValue, String strConImporte, String strOrg,
-      String strLevel, String strConCodigo, String strcAcctSchemaId, String strPageNo)
-      throws IOException, ServletException {
+      String strLevel, String strConCodigo, String strcAcctSchemaId, String strPageNo,
+      String strCompareTo) throws IOException, ServletException {
     String localStrElementValue = strElementValue;
     String localStrDateToRef = strDateToRef;
     String localStrDateFrom = strDateFrom;
@@ -201,7 +209,13 @@
         Year year = OBDal.getInstance().get(Year.class, strYearId);
         Year yearRef = OBDal.getInstance().get(Year.class, strYearRefId);
         HashMap<String, Date> startingEndingDate = getStartingEndingDate(year);
-        HashMap<String, Date> startingEndingDateRef = getStartingEndingDate(yearRef);
+        /* Improved Balance Sheet */
+        String yrRef = "";
+        HashMap<String, Date> startingEndingDateRef = null;
+        if (strCompareTo.equals("Y")) {
+          yrRef = yearRef.getFiscalYear();
+          startingEndingDateRef = getStartingEndingDate(yearRef);
+        }
         // Years to be included as no closing is present
         String strYearsToClose = "";
         String strYearsToCloseRef = "";
@@ -219,13 +233,16 @@
             strCalculateOpening = "Y";
             strYearsToClose = "," + strYearsToClose;
           }
-          yearsInfo = getYearsToClose(startingEndingDateRef.get("startingDate"), strOrg,
-              yearRef.getCalendar(), strcAcctSchemaId, true);
-          strYearsToCloseRef = yearsInfo[0];
-          openingEntryOwnerRef = yearsInfo[1];
-          if (strYearsToCloseRef.length() > 0) {
-            strCalculateOpening = "Y";
-            strYearsToCloseRef = "," + strYearsToCloseRef;
+          /* Improved Balance Sheet */
+          if (strCompareTo.equals("Y")) {
+            yearsInfo = getYearsToClose(startingEndingDateRef.get("startingDate"), strOrg,
+                yearRef.getCalendar(), strcAcctSchemaId, true);
+            strYearsToCloseRef = yearsInfo[0];
+            openingEntryOwnerRef = yearsInfo[1];
+            if (strYearsToCloseRef.length() > 0) {
+              strCalculateOpening = "Y";
+              strYearsToCloseRef = "," + strYearsToCloseRef;
+            }
           }
         }
         // Income summary amount is calculated and included in the balance sheet data
@@ -246,9 +263,9 @@
               Utility.getContext(this, vars, "#User_Client", "GeneralAccountingReports"),
               localStrDateFrom, DateTimeData.nDaysAfter(this, localStrDateTo, "1"),
               strcAcctSchemaId, Tree.getMembers(this, strTreeOrg, strOrg),
-              "'" + year.getFiscalYear() + "'" + strYearsToClose, openingEntryOwner,
+              "'" + year.getFiscalYear() + "'" + strYearsToClose, openingEntryOwner, strCompareTo,
               localStrDateFromRef, DateTimeData.nDaysAfter(this, localStrDateToRef, "1"), "'"
-                  + yearRef.getFiscalYear() + "'" + strYearsToCloseRef, openingEntryOwnerRef);
+                  + yrRef + "'" + strYearsToCloseRef, openingEntryOwnerRef);
           {
             if (log4j.isDebugEnabled())
               log4j.debug("*********** strIncomeSummaryAccount: " + strIncomeSummaryAccount);
@@ -257,12 +274,16 @@
                     + "'" + strYearsToClose, strTreeOrg, strOrg, strcAcctSchemaId);
             if (log4j.isDebugEnabled())
               log4j.debug("*********** strISyear: " + strISyear);
-            String strISyearRef = processIncomeSummary(localStrDateFromRef,
-                DateTimeData.nDaysAfter(this, localStrDateToRef, "1"),
-                "'" + yearRef.getFiscalYear() + "'" + strYearsToCloseRef, strTreeOrg, strOrg,
-                strcAcctSchemaId);
-            if (log4j.isDebugEnabled())
-              log4j.debug("*********** strISyearRef: " + strISyearRef);
+            /* Improved Balance Sheet */
+            String strISyearRef = "0";
+            if (strCompareTo.equals("Y")) {
+              strISyearRef = processIncomeSummary(localStrDateFromRef,
+                  DateTimeData.nDaysAfter(this, localStrDateToRef, "1"),
+                  "'" + yearRef.getFiscalYear() + "'" + strYearsToCloseRef, strTreeOrg, strOrg,
+                  strcAcctSchemaId);
+              if (log4j.isDebugEnabled())
+                log4j.debug("*********** strISyearRef: " + strISyearRef);
+            }
             accounts = appendRecords(accounts, strIncomeSummaryAccount, strISyear, strISyearRef);
 
           }
@@ -282,12 +303,12 @@
         parameters.put("group", strGroups);
         parameters.put("agno", year.getFiscalYear());
 
-        parameters.put("agno2", yearRef.getFiscalYear());
+        parameters.put("agno2", yrRef);
         parameters.put("column", year.getFiscalYear());
-        parameters.put("columnRef", yearRef.getFiscalYear());
+        parameters.put("columnRef", yrRef);
         parameters.put("org", OrganizationData.selectOrgName(this, strOrg));
         parameters.put("column1", year.getFiscalYear());
-        parameters.put("columnRef1", yearRef.getFiscalYear());
+        parameters.put("columnRef1", yrRef);
         parameters.put("companyName",
             GeneralAccountingReportsData.companyName(this, vars.getClient()));
         parameters.put("date", DateTimeData.today(this));
@@ -295,15 +316,18 @@
           localStrDateFrom = OBDateUtils.formatDate(startingEndingDate.get("startingDate"));
         if (localStrDateTo.equals(""))
           localStrDateTo = OBDateUtils.formatDate(startingEndingDate.get("endingDate"));
-        if (localStrDateFromRef.equals(""))
-          localStrDateFromRef = OBDateUtils.formatDate(startingEndingDateRef.get("startingDate"));
-        if (localStrDateToRef.equals(""))
-          localStrDateToRef = OBDateUtils.formatDate(startingEndingDateRef.get("endingDate"));
+        /* Improved Balance Sheet */
+        if (strCompareTo.equals("Y")) {
+          if (localStrDateFromRef.equals(""))
+            localStrDateFromRef = OBDateUtils.formatDate(startingEndingDateRef.get("startingDate"));
+          if (localStrDateToRef.equals(""))
+            localStrDateToRef = OBDateUtils.formatDate(startingEndingDateRef.get("endingDate"));
+        }
         parameters.put("period", localStrDateFrom + " - " + localStrDateTo);
         parameters.put("periodRef", localStrDateFromRef + " - " + localStrDateToRef);
         parameters.put("agnoInitial", year.getFiscalYear());
-        parameters.put("agnoRef", yearRef.getFiscalYear());
-
+        parameters.put("agnoRef", yrRef);
+        parameters.put("compareTo", (strCompareTo.equals("Y") ? "Y" : "N"));
         parameters.put(
             "principalTitle",
             strCalculateOpening.equals("Y") ? GeneralAccountingReportsData.rptTitle(this,
@@ -486,7 +510,8 @@
       String strAgno, String strAgnoRef, String strDateFrom, String strDateTo, String strPageNo,
       String strDateFromRef, String strDateToRef, String strAsDateTo, String strAsDateToRef,
       String strElementValue, String strConImporte, String strOrg, String strLevel,
-      String strConCodigo, String strcAcctSchemaId) throws IOException, ServletException {
+      String strConCodigo, String strcAcctSchemaId, String strCompareTo) throws IOException,
+      ServletException {
     if (log4j.isDebugEnabled())
       log4j.debug("Output: dataSheet");
     XmlDocument xmlDocument = xmlEngine.readXmlTemplate(
@@ -549,6 +574,8 @@
     xmlDocument.setParameter("asDateToRefsaveFormat", vars.getSessionValue("#AD_SqlDateFormat"));
     xmlDocument.setParameter("conImporte", strConImporte);
     xmlDocument.setParameter("conCodigo", strConCodigo);
+    /* Improved Balance Sheet */
+    xmlDocument.setParameter("compareTo", strCompareTo);
     xmlDocument.setParameter("C_Org_ID", strOrg);
     xmlDocument.setParameter("C_ElementValue_ID", strElementValue);
     xmlDocument.setParameter("level", strLevel);
--- a/src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReports.xml	Fri Aug 26 10:16:17 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReports.xml	Mon Aug 29 09:04:15 2016 +0200
@@ -46,6 +46,7 @@
   <PARAMETER id="fieldCheck" name="check" default="Y"/>
   <PARAMETER id="fieldConImporte" name="conImporte" boolean="checked" withId="fieldCheck"/>
   <PARAMETER id="fieldConCodigo" name="conCodigo" boolean="checked" withId="fieldCheck"/>
+  <PARAMETER id="fieldCompareTo" name="compareTo" boolean="checked" withId="fieldCheck"/>
   <PARAMETER id="fieldC_ElementValue_ID" name="C_ElementValue_ID"/>
   <PARAMETER id="fieldC_Org_ID" name="C_Org_ID"/>
   <PARAMETER id="paramLevel" name="level"/>
--- a/src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReportsPDF.jrxml	Fri Aug 26 10:16:17 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReportsPDF.jrxml	Mon Aug 29 09:04:15 2016 +0200
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="GeneralAccountingReportsPDF" pageWidth="595" pageHeight="842" columnWidth="535" leftMargin="30" rightMargin="30" topMargin="20" bottomMargin="20" uuid="1de34766-77d8-4a3a-9223-88d6ac76dcb9">
+<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="GeneralAccountingReportsPDF" pageWidth="595" pageHeight="842" columnWidth="535" leftMargin="30" rightMargin="30" topMargin="20" bottomMargin="20">
 	<property name="ireport.scriptlethandling" value="0"/>
 	<property name="ireport.encoding" value="UTF-8"/>
-	<property name="ireport.zoom" value="1.5"/>
-	<property name="ireport.x" value="0"/>
+	<property name="ireport.zoom" value="1.6500000000000001"/>
+	<property name="ireport.x" value="277"/>
 	<property name="ireport.y" value="0"/>
 	<import value="net.sf.jasperreports.engine.*"/>
 	<import value="java.util.*"/>
@@ -46,6 +46,9 @@
 	<parameter name="agnoRef" class="java.lang.String"/>
 	<parameter name="principalTitle" class="java.lang.String"/>
 	<parameter name="pageNo" class="java.lang.String"/>
+	<parameter name="compareTo" class="java.lang.String">
+		<defaultValueExpression><![CDATA[]]></defaultValueExpression>
+	</parameter>
 	<queryString>
 		<![CDATA[]]>
 	</queryString>
@@ -73,17 +76,17 @@
 	<pageHeader>
 		<band height="121" splitType="Stretch">
 			<textField>
-				<reportElement key="staticText-15" x="0" y="0" width="535" height="18" uuid="793d4469-26a6-483e-ab31-d93d39e76902"/>
+				<reportElement key="staticText-15" x="0" y="0" width="535" height="18"/>
 				<textElement textAlignment="Center" markup="none">
 					<font fontName="DejaVu Sans" size="12" isBold="true" pdfFontName="Helvetica-Bold"/>
 				</textElement>
-				<textFieldExpression><![CDATA[$P{principalTitle}]]></textFieldExpression>
+				<textFieldExpression class="java.lang.String"><![CDATA[$P{principalTitle}]]></textFieldExpression>
 			</textField>
 			<line>
-				<reportElement key="line-1" x="0" y="71" width="535" height="1" forecolor="#555555" uuid="13b43add-025a-45e9-8995-1919aab54746"/>
+				<reportElement key="line-1" x="0" y="71" width="535" height="1" forecolor="#555555"/>
 			</line>
 			<staticText>
-				<reportElement key="staticText-7" x="0" y="23" width="37" height="14" uuid="44053d39-9800-4d28-a4e4-44ca6bf0d50a"/>
+				<reportElement key="staticText-7" x="0" y="23" width="37" height="14"/>
 				<box>
 					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
 					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
@@ -96,21 +99,21 @@
 				<text><![CDATA[Client:]]></text>
 			</staticText>
 			<textField>
-				<reportElement key="staticText-7" x="37" y="23" width="192" height="14" uuid="15801ca4-e016-499d-9f57-831ce66fa6e5"/>
+				<reportElement key="staticText-7" x="37" y="23" width="192" height="14"/>
 				<textElement markup="none">
 					<font fontName="DejaVu Sans" size="9" isBold="false"/>
 				</textElement>
-				<textFieldExpression><![CDATA[$P{companyName}+ " "+ $P{agnoInitial}]]></textFieldExpression>
+				<textFieldExpression class="java.lang.String"><![CDATA[$P{companyName}+ " "+ $P{agnoInitial}]]></textFieldExpression>
 			</textField>
 			<textField>
-				<reportElement key="staticText-7" x="464" y="23" width="71" height="14" uuid="fef3282d-269a-49b4-8b55-9dc10e37132b"/>
+				<reportElement key="staticText-7" x="464" y="23" width="71" height="14"/>
 				<textElement markup="none">
 					<font fontName="DejaVu Sans" size="9" isBold="false"/>
 				</textElement>
-				<textFieldExpression><![CDATA[$P{date}]]></textFieldExpression>
+				<textFieldExpression class="java.lang.String"><![CDATA[$P{date}]]></textFieldExpression>
 			</textField>
 			<staticText>
-				<reportElement key="staticText-7" x="436" y="23" width="28" height="14" uuid="1d78c0bb-21e3-44ad-9593-fb220dd65c7b"/>
+				<reportElement key="staticText-7" x="436" y="23" width="28" height="14"/>
 				<box>
 					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
 					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
@@ -123,14 +126,14 @@
 				<text><![CDATA[Date:]]></text>
 			</staticText>
 			<textField>
-				<reportElement key="staticText-7" x="298" y="23" width="138" height="14" uuid="7eb0f2ad-8837-4b6a-9aaf-56fb0a68066c"/>
+				<reportElement key="staticText-7" x="298" y="23" width="138" height="14"/>
 				<textElement markup="none">
 					<font fontName="DejaVu Sans" size="9" isBold="false"/>
 				</textElement>
-				<textFieldExpression><![CDATA[$P{org}]]></textFieldExpression>
+				<textFieldExpression class="java.lang.String"><![CDATA[$P{org}]]></textFieldExpression>
 			</textField>
 			<staticText>
-				<reportElement key="staticText-7" x="229" y="23" width="69" height="14" uuid="98412d72-0776-43cc-9d76-11ebff6928ed"/>
+				<reportElement key="staticText-7" x="229" y="23" width="69" height="14"/>
 				<box>
 					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
 					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
@@ -143,14 +146,14 @@
 				<text><![CDATA[Organization:]]></text>
 			</staticText>
 			<textField>
-				<reportElement key="staticText-7" x="62" y="39" width="473" height="14" uuid="635971d7-1490-4325-8ce9-c5d984c70edf"/>
+				<reportElement key="staticText-7" x="62" y="39" width="473" height="14"/>
 				<textElement markup="none">
 					<font fontName="DejaVu Sans" size="9" isBold="false"/>
 				</textElement>
-				<textFieldExpression><![CDATA["Period:" + $P{period} + "   Period N-1"+ $P{periodRef}]]></textFieldExpression>
+				<textFieldExpression class="java.lang.String"><![CDATA["Period:" + $P{period} + (($P{compareTo}.equals("Y")) ? "   Period N-1: "+ $P{periodRef}:"")]]></textFieldExpression>
 			</textField>
 			<staticText>
-				<reportElement key="staticText-7" x="0" y="39" width="62" height="14" uuid="5d291dd0-76ee-427b-b14d-876305a70c2d"/>
+				<reportElement key="staticText-7" x="0" y="39" width="62" height="14"/>
 				<box>
 					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
 					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
@@ -163,50 +166,62 @@
 				<text><![CDATA[Conditions:]]></text>
 			</staticText>
 			<line>
-				<reportElement key="line-1" x="0" y="19" width="535" height="1" uuid="9b16adcc-98b9-48b6-be1e-aec1543c663e"/>
+				<reportElement key="line-1" x="0" y="19" width="535" height="1"/>
 			</line>
 			<textField>
-				<reportElement key="staticText-7" x="63" y="55" width="472" height="14" uuid="c0639c17-692f-40ee-9658-e6db7759fb98"/>
+				<reportElement key="staticText-7" x="63" y="55" width="472" height="14"/>
 				<textElement markup="none">
 					<font fontName="DejaVu Sans" size="9" isBold="false"/>
 				</textElement>
-				<textFieldExpression><![CDATA["Client N-1: "+ $P{companyName}+ " " +$P{agnoRef}]]></textFieldExpression>
+				<textFieldExpression class="java.lang.String"><![CDATA["Client N-1: "+ $P{companyName}+ " " +$P{agnoRef}]]></textFieldExpression>
 			</textField>
 			<textField>
-				<reportElement key="staticText-7" x="211" y="84" width="112" height="11" uuid="9274a660-0e3b-4319-9335-a95c0f3b01b7"/>
+				<reportElement key="staticText-7" x="211" y="84" width="112" height="11"/>
 				<textElement markup="none">
 					<font fontName="DejaVu Sans" size="9" isBold="true"/>
 				</textElement>
-				<textFieldExpression><![CDATA[$P{agno}]]></textFieldExpression>
+				<textFieldExpression class="java.lang.String"><![CDATA[$P{agno}]]></textFieldExpression>
 			</textField>
 			<staticText>
-				<reportElement key="staticText-7" mode="Transparent" x="0" y="94" width="112" height="10" forecolor="#000000" backcolor="#FFFFFF" uuid="467c5340-b7bc-4283-a149-7d8e324f5db4"/>
+				<reportElement key="staticText-7" mode="Transparent" x="0" y="94" width="112" height="10" forecolor="#000000" backcolor="#FFFFFF"/>
 				<textElement textAlignment="Left" rotation="None" markup="none">
 					<font fontName="DejaVu Sans" size="8" isBold="true" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
-					<paragraph lineSpacing="Single"/>
 				</textElement>
 				<text><![CDATA[Element]]></text>
 			</staticText>
 			<textField>
-				<reportElement key="staticText-7" x="376" y="94" width="80" height="10" uuid="199ddce2-e209-4e39-80c1-d9e08964e38c"/>
+				<reportElement key="staticText-7" x="376" y="94" width="80" height="10">
+					<printWhenExpression><![CDATA[$P{compareTo}.equals("Y")]]></printWhenExpression>
+				</reportElement>
 				<textElement textAlignment="Right" markup="none">
 					<font fontName="DejaVu Sans" size="8" isBold="true"/>
 				</textElement>
-				<textFieldExpression><![CDATA[$P{column}]]></textFieldExpression>
+				<textFieldExpression class="java.lang.String"><![CDATA[$P{column}]]></textFieldExpression>
 			</textField>
 			<textField>
-				<reportElement key="staticText-7" x="455" y="94" width="80" height="10" uuid="a46072dd-19c2-4305-82a2-12251937fcde"/>
+				<reportElement key="staticText-7" x="455" y="94" width="80" height="10">
+					<printWhenExpression><![CDATA[$P{compareTo}.equals("Y")]]></printWhenExpression>
+				</reportElement>
 				<textElement textAlignment="Right" markup="none">
 					<font fontName="DejaVu Sans" size="8" isBold="true"/>
 				</textElement>
-				<textFieldExpression><![CDATA[$P{columnRef}]]></textFieldExpression>
+				<textFieldExpression class="java.lang.String"><![CDATA[$P{columnRef}]]></textFieldExpression>
 			</textField>
 			<textField>
-				<reportElement key="staticText-7" x="0" y="74" width="229" height="12" uuid="1c526f90-e915-4987-94ef-85a93e688e29"/>
+				<reportElement key="staticText-7" x="0" y="74" width="229" height="12"/>
 				<textElement markup="none">
 					<font fontName="DejaVu Sans" size="9" isBold="false"/>
 				</textElement>
-				<textFieldExpression><![CDATA[$F{groupname}]]></textFieldExpression>
+				<textFieldExpression class="java.lang.String"><![CDATA[$F{groupname}]]></textFieldExpression>
+			</textField>
+			<textField>
+				<reportElement key="staticText-7" x="376" y="95" width="157" height="10">
+					<printWhenExpression><![CDATA[$P{compareTo}.equals("N")]]></printWhenExpression>
+				</reportElement>
+				<textElement textAlignment="Right" markup="none">
+					<font fontName="DejaVu Sans" size="8" isBold="true"/>
+				</textElement>
+				<textFieldExpression class="java.lang.String"><![CDATA[$P{column}]]></textFieldExpression>
 			</textField>
 		</band>
 	</pageHeader>
@@ -216,25 +231,38 @@
 	<detail>
 		<band height="15" splitType="Stretch">
 			<textField>
-				<reportElement key="staticText-7" style="CustSatIndexMarkup" x="0" y="0" width="376" height="14" uuid="c4215005-6242-46f7-a913-de5861f16db1"/>
+				<reportElement key="staticText-7" style="CustSatIndexMarkup" x="0" y="0" width="376" height="14"/>
 				<textElement markup="none">
 					<font fontName="DejaVu Sans"/>
 				</textElement>
-				<textFieldExpression><![CDATA[$F{elementLevel}>=4 ? "      " + $F{name}: $F{elementLevel}==3 ? "     " + $F{name}: $F{elementLevel}==2 ? "  " + $F{name}:$F{name}]]></textFieldExpression>
+				<textFieldExpression class="java.lang.String"><![CDATA[$F{elementLevel}>=4 ? "      " + $F{name}: $F{elementLevel}==3 ? "     " + $F{name}: $F{elementLevel}==2 ? "  " + $F{name}:$F{name}]]></textFieldExpression>
 			</textField>
 			<textField isBlankWhenNull="true">
-				<reportElement key="staticText-7" x="376" y="0" width="80" height="14" uuid="58238d0b-9368-44df-a023-b80d1291b4ce"/>
+				<reportElement key="staticText-7" x="376" y="0" width="80" height="14">
+					<printWhenExpression><![CDATA[$P{compareTo}.equals("Y")]]></printWhenExpression>
+				</reportElement>
 				<textElement textAlignment="Right" markup="none">
 					<font fontName="DejaVu Sans" size="9" isBold="false"/>
 				</textElement>
-				<textFieldExpression><![CDATA[($F{qty}!=null) ? $P{NUMBERFORMAT}.format($F{qty}).toString() : new String(" ")]]></textFieldExpression>
+				<textFieldExpression class="java.lang.String"><![CDATA[($F{qty}!=null) ? $P{NUMBERFORMAT}.format($F{qty}).toString() : new String(" ")]]></textFieldExpression>
 			</textField>
 			<textField isBlankWhenNull="true">
-				<reportElement key="staticText-7" x="455" y="0" width="80" height="14" uuid="9eef38aa-b277-4b7d-9312-6788aa0678d5"/>
+				<reportElement key="staticText-7" x="455" y="0" width="80" height="14">
+					<printWhenExpression><![CDATA[$P{compareTo}.equals("Y")]]></printWhenExpression>
+				</reportElement>
 				<textElement textAlignment="Right" markup="none">
 					<font fontName="DejaVu Sans" size="9" isBold="false"/>
 				</textElement>
-				<textFieldExpression><![CDATA[($F{qtyRef}!=null) ? $P{NUMBERFORMAT}.format($F{qtyRef}).toString() : new String(" ")]]></textFieldExpression>
+				<textFieldExpression class="java.lang.String"><![CDATA[($F{qtyRef}!=null) ? $P{NUMBERFORMAT}.format($F{qtyRef}).toString() : new String(" ")]]></textFieldExpression>
+			</textField>
+			<textField isBlankWhenNull="true">
+				<reportElement key="staticText-7" x="374" y="0" width="159" height="14">
+					<printWhenExpression><![CDATA[$P{compareTo}.equals("N")]]></printWhenExpression>
+				</reportElement>
+				<textElement textAlignment="Right" markup="none">
+					<font fontName="DejaVu Sans" size="9" isBold="false"/>
+				</textElement>
+				<textFieldExpression class="java.lang.String"><![CDATA[($F{qty}!=null) ? $P{NUMBERFORMAT}.format($F{qty}).toString() : new String(" ")]]></textFieldExpression>
 			</textField>
 		</band>
 	</detail>
--- a/src/org/openbravo/erpCommon/ad_reports/ReportStandardCostsJR_subreport0.jrxml	Fri Aug 26 10:16:17 2016 +0200
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportStandardCostsJR_subreport0.jrxml	Mon Aug 29 09:04:15 2016 +0200
@@ -73,9 +73,9 @@
 	<queryString>
 		<![CDATA[SELECT  MA_SEQUENCEPRODUCT.MA_SEQUENCE_ID, A.COMPONENTCOSTSUM, MA_SEQUENCEPRODUCT.COMPONENTCOST,
   AD_COLUMN_IDENTIFIER(to_char('M_PRODUCT'), to_char(M_PRODUCT_ID), $P{LANGUAGE}) AS CONCEPT,
-       ROUND(quantity/COALESCE(decrease,1)*COALESCE(rejected,1),4) AS QUANTITY,
+       ROUND(quantity/CASE WHEN (decrease=0 OR rejected=0) THEN 1 ELSE COALESCE(decrease,1)*COALESCE(rejected,1) END,4) AS QUANTITY,
        C_CURRENCY_CONVERT(COALESCE(COST, 0), $P{BASE_CURRENCY_ID}, $P{CURRENCY_ID}, TO_DATE(COALESCE(MA_SEQUENCEPRODUCT.CREATED,NOW())), NULL, MA_SEQUENCEPRODUCT.AD_CLIENT_ID, MA_SEQUENCEPRODUCT.AD_ORG_ID)  AS UNIT_COST,
-       C_CURRENCY_CONVERT(COALESCE(COST*quantity/COALESCE(decrease,1)*COALESCE(rejected,1),0), $P{BASE_CURRENCY_ID}, $P{CURRENCY_ID}, TO_DATE(COALESCE(MA_SEQUENCEPRODUCT.CREATED,NOW())), NULL, MA_SEQUENCEPRODUCT.AD_CLIENT_ID, MA_SEQUENCEPRODUCT.AD_ORG_ID) AS COST,
+       C_CURRENCY_CONVERT(COALESCE(COST*quantity/CASE WHEN (decrease=0 OR rejected=0) THEN 1 ELSE COALESCE(decrease,1)*COALESCE(rejected,1) END,0), $P{BASE_CURRENCY_ID}, $P{CURRENCY_ID}, TO_DATE(COALESCE(MA_SEQUENCEPRODUCT.CREATED,NOW())), NULL, MA_SEQUENCEPRODUCT.AD_CLIENT_ID, MA_SEQUENCEPRODUCT.AD_ORG_ID) AS COST,
        C_CURRENCY_SYMBOL($P{CURRENCY_ID}, 0, 'Y') AS CONVSYM,
        C_CURRENCY_ISOSYM($P{CURRENCY_ID}) AS CONVISOSYM
 FROM MA_SEQUENCEPRODUCT,
--- a/src/org/openbravo/erpCommon/businessUtility/AccountTree_data.xsql	Fri Aug 26 10:16:17 2016 +0200
+++ b/src/org/openbravo/erpCommon/businessUtility/AccountTree_data.xsql	Mon Aug 29 09:04:15 2016 +0200
@@ -12,7 +12,7 @@
  * Portions created by Jorg Janke are Copyright (C) 1999-2001 Jorg Janke, parts
  * created by ComPiere are Copyright (C) ComPiere, Inc.;   All Rights Reserved.
  * Contributor(s): Openbravo SLU
- * Contributions are Copyright (C) 2001-2013 Openbravo S.L.U.
+ * Contributions are Copyright (C) 2001-2016 Openbravo S.L.U.
  ******************************************************************************
 -->
 
@@ -134,7 +134,8 @@
                 (COALESCE(f.AMTACCTCR,0) - COALESCE(f.AMTACCTDR, 0)) AS qtyCredit_ref 
                 FROM C_ElementValue m, Fact_Acct f, C_Period p, C_Year y 
                 WHERE m.AD_Org_ID IN('2') 
-                AND m.AD_Client_ID IN('2') 
+                AND m.AD_Client_ID IN('2')
+                AND (1=2 )  
                 AND 2=2 
                 AND f.FACTACCTTYPE <> 'R'
                 AND f.FACTACCTTYPE <> 'C'
@@ -160,6 +161,7 @@
         <Parameter name="openingEntryOwner"/>
         <Parameter name="adOrgClient" type="replace" optional="true" after="m.AD_Org_ID IN(" text="'2'"/>
         <Parameter name="adUserClient" type="replace" optional="true" after="m.AD_Client_ID IN(" text="'2'"/>
+        <Parameter name="compareTo" optional="true" after="AND (1=2 "><![CDATA[ OR to_char('Y')=to_char(?)]]></Parameter>
         <Parameter name="dateFromRef" optional="true" after="AND 2=2 "><![CDATA[ AND f.DATEACCT >= to_date(?)]]></Parameter>
         <Parameter name="dateToRef" optional="true" after="AND 2=2 "><![CDATA[ AND f.DATEACCT < to_date(?)]]></Parameter>
         <Parameter name="acctschema" optional="true" after="AND 2=2 "><![CDATA[ AND f.C_ACCTSCHEMA_ID = ?]]></Parameter>
--- a/src/org/openbravo/erpCommon/businessUtility/InitialSetupUtility.java	Fri Aug 26 10:16:17 2016 +0200
+++ b/src/org/openbravo/erpCommon/businessUtility/InitialSetupUtility.java	Mon Aug 29 09:04:15 2016 +0200
@@ -284,10 +284,8 @@
   public static Language getLanguage(String strLanguage) throws Exception {
     final OBCriteria<Language> obcLanguage = OBDal.getInstance().createCriteria(Language.class);
     obcLanguage.add(Restrictions.eq(Language.PROPERTY_LANGUAGE, strLanguage));
-    if (obcLanguage.list().size() > 0)
-      return obcLanguage.list().get(0);
-    else
-      return null;
+    // ad_language.ad_language is unique
+    return (Language) obcLanguage.uniqueResult();
   }
 
   /**
@@ -1863,8 +1861,9 @@
       obcDataSets.add(Restrictions.eq(DataSet.PROPERTY_MODULE, module));
       obcDataSets.add(Restrictions.in(DataSet.PROPERTY_DATAACCESSLEVEL, accessLevel));
       obcDataSets.addOrder(Order.asc(DataSet.PROPERTY_NAME));
-      if (obcDataSets.list().size() > 0) {
-        return obcDataSets.list();
+      List<DataSet> listDataSets = obcDataSets.list();
+      if (!listDataSets.isEmpty()) {
+        return listDataSets;
       } else {
         return null;
       }
@@ -1887,8 +1886,9 @@
           .createCriteria(org.openbravo.model.ad.domain.List.class);
       obcRefList.add(Restrictions.eq(org.openbravo.model.ad.domain.List.PROPERTY_REFERENCE, OBDal
           .getInstance().get(Reference.class, "181")));
-      if (obcRefList.list().size() > 0) {
-        return obcRefList.list();
+      List<org.openbravo.model.ad.domain.List> listRefList = obcRefList.list();
+      if (!listRefList.isEmpty()) {
+        return listRefList;
       } else {
         return null;
       }
--- a/src/org/openbravo/erpCommon/info/PriceListVersionFilterExpression.java	Fri Aug 26 10:16:17 2016 +0200
+++ b/src/org/openbravo/erpCommon/info/PriceListVersionFilterExpression.java	Mon Aug 29 09:04:15 2016 +0200
@@ -1,3 +1,22 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.1  (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) 2011-2016 Openbravo SLU 
+ * All Rights Reserved. 
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+
 package org.openbravo.erpCommon.info;
 
 import java.text.SimpleDateFormat;
@@ -108,11 +127,9 @@
         PriceListVersion.class);
     plVersionCrit.add(Restrictions.eq(PriceListVersion.PROPERTY_PRICELIST, priceList));
     plVersionCrit.add(Restrictions.le(PriceListVersion.PROPERTY_VALIDFROMDATE, date));
-    if (plVersionCrit.count() > 0) {
-      plVersionCrit.addOrderBy(PriceListVersion.PROPERTY_VALIDFROMDATE, false);
-      return plVersionCrit.list().get(0);
-    }
-    return null;
+    plVersionCrit.addOrderBy(PriceListVersion.PROPERTY_VALIDFROMDATE, false);
+    plVersionCrit.setMaxResults(1);
+    return (PriceListVersion) plVersionCrit.uniqueResult();
   }
 
   private boolean isSalesTransaction() {
--- a/src/org/openbravo/erpCommon/info/PriceListVersionFilterExpressionName.java	Fri Aug 26 10:16:17 2016 +0200
+++ b/src/org/openbravo/erpCommon/info/PriceListVersionFilterExpressionName.java	Mon Aug 29 09:04:15 2016 +0200
@@ -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) 2012 Openbravo SLU 
+ * All portions are Copyright (C) 2012-2016 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -127,11 +127,9 @@
         PriceListVersion.class);
     plVersionCrit.add(Restrictions.eq(PriceListVersion.PROPERTY_PRICELIST, priceList));
     plVersionCrit.add(Restrictions.le(PriceListVersion.PROPERTY_VALIDFROMDATE, date));
-    if (plVersionCrit.count() > 0) {
-      plVersionCrit.addOrderBy(PriceListVersion.PROPERTY_VALIDFROMDATE, false);
-      return plVersionCrit.list().get(0);
-    }
-    return null;
+    plVersionCrit.addOrderBy(PriceListVersion.PROPERTY_VALIDFROMDATE, false);
+    plVersionCrit.setMaxResults(1);
+    return (PriceListVersion) plVersionCrit.uniqueResult();
   }
 
   private boolean isSalesTransaction() {
--- a/src/org/openbravo/erpCommon/utility/OBMessageUtils.java	Fri Aug 26 10:16:17 2016 +0200
+++ b/src/org/openbravo/erpCommon/utility/OBMessageUtils.java	Mon Aug 29 09:04:15 2016 +0200
@@ -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) 2012-2015 Openbravo SLU
+ * All portions are Copyright (C) 2012-2016 Openbravo SLU
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -514,16 +514,13 @@
       final OBQuery<Message> messages = OBDal.getInstance().createQuery(Message.class,
           Message.PROPERTY_SEARCHKEY + "=:key");
       messages.setNamedParameter("key", key);
-      if (messages.list().isEmpty()) {
+
+      // ad_message.value has unique constraint
+      final Message message = messages.uniqueResult();
+      if (message == null) {
         return null;
       }
 
-      if (messages.list().size() > 1) {
-        log4j.warn("More than one message found using key " + key);
-      }
-
-      // pick the first one
-      final Message message = messages.list().get(0);
       String label = message.getMessageText();
       final String languageId = OBContext.getOBContext().getLanguage().getId();
       for (MessageTrl messageTrl : message.getADMessageTrlList()) {
--- a/src/org/openbravo/service/db/CallProcess.java	Fri Aug 26 10:16:17 2016 +0200
+++ b/src/org/openbravo/service/db/CallProcess.java	Mon Aug 29 09:04:15 2016 +0200
@@ -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) 2009-2012 Openbravo SLU 
+ * All portions are Copyright (C) 2009-2016 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  * Modification july 2010 (c) openbravo SLU, based on contribution made by iferca
@@ -25,6 +25,7 @@
 import java.sql.PreparedStatement;
 import java.sql.SQLException;
 import java.util.Date;
+import java.util.List;
 import java.util.Map;
 import java.util.Properties;
 
@@ -85,12 +86,13 @@
         .createCriteria(org.openbravo.model.ad.ui.Process.class);
     processCriteria.add(Restrictions.eq(org.openbravo.model.ad.ui.Process.PROPERTY_PROCEDURE,
         processName));
-    if (processCriteria.list().size() != 1) {
+    List<org.openbravo.model.ad.ui.Process> processList = processCriteria.list();
+    if (processList.size() != 1) {
       throw new OBException("No process or more than one process found using procedurename "
           + processName);
 
     }
-    return call(processCriteria.list().get(0), recordID, parameters, doCommit);
+    return call(processList.get(0), recordID, parameters, doCommit);
   }
 
   /**
--- a/web/js/productCharacteristicsProcess.js	Fri Aug 26 10:16:17 2016 +0200
+++ b/web/js/productCharacteristicsProcess.js	Mon Aug 29 09:04:15 2016 +0200
@@ -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) 2013-2015 Openbravo SLU 
+ * All portions are Copyright (C) 2013-2016 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -175,7 +175,8 @@
       this.tree.originalShow = this.tree.show;
       this.tree.treeItem.addParamsToRequest = function () {
         return {
-          parentCharId: this.parentCharId
+          parentCharId: this.parentCharId,
+          productCharSubsetId: this.productCharSubsetId
         }
       };
       this.tree.show = function (explicitCriteria) {
@@ -217,6 +218,7 @@
           displayField: 'name',
           valueField: 'id',
           referencedTableId: 'E913D17C9B3847CF92235082DBE2EC44',
+          productCharSubsetId: this.characteristicList[i].productCharSubsetId,
           pickListFields: [{
             title: ' ',
             name: 'name',