Merge with pi changeset 18239:27ce30de051f
authorMikel Irurita <mikel.irurita@openbravo.com>
Wed, 17 Oct 2012 18:29:21 +0200
changeset 18829 40d9ac596602
parent 18828 920b8a5ba22a (current diff)
parent 18240 27ce30de051f (diff)
child 18830 67f34b928616
Merge with pi changeset 18239:27ce30de051f
modules/org.openbravo.v3/src-db/database/configScript.xml
src-db/database/model/functions/C_INVOICE_POST.xml
src-db/database/model/functions/M_INOUT_POST.xml
src-db/database/model/tables/C_INVOICELINE.xml
src-db/database/model/tables/C_ORDERLINE.xml
src-db/database/model/triggers/C_VALIDCOMBINATION_TRG.xml
src-db/database/sourcedata/AD_COLUMN.xml
src-db/database/sourcedata/AD_ELEMENT.xml
src-db/database/sourcedata/AD_FIELD.xml
src-db/database/sourcedata/AD_MENU.xml
src-db/database/sourcedata/AD_MESSAGE.xml
src-db/database/sourcedata/AD_REFERENCE.xml
src-db/database/sourcedata/AD_REF_LIST.xml
src-db/database/sourcedata/AD_TAB.xml
src-db/database/sourcedata/AD_TREENODE.xml
src-db/database/sourcedata/AD_WINDOW.xml
src-db/database/sourcedata/OBUISEL_SELECTOR.xml
src-db/database/sourcedata/OBUISEL_SELECTOR_FIELD.xml
src/org/openbravo/erpCommon/ad_actionButton/CreateFrom.java
src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Invoice_data.xsql
src/org/openbravo/erpCommon/ad_forms/AcctServer.java
--- a/.hgsigs	Wed Oct 17 16:39:43 2012 +0200
+++ b/.hgsigs	Wed Oct 17 18:29:21 2012 +0200
@@ -78,4 +78,9 @@
 e73588ed4b71972072141cda206f2382c618fbc8 0 iEYEABECAAYFAlAlOJcACgkQCX/oGf+2qkN2uwCg1Nd3SJnzR1OdCXmMDHxOm/C8kEsAoMF+P+CltaPNylrKX7B4wimfTW/e
 a934dbe3f5fad31293f1a5a2cc6f2ca630fd0f31 0 iEYEABECAAYFAlAGLkgACgkQCX/oGf+2qkOu/ACfYJXb8JwO69uZVxLM2u6BHOwQHj4AoJ08uNluEH3iB94pfMnCsD2URUX8
 110a8fe1328f4a9e7e5ff1179ace3e529286cfce 0 iEYEABECAAYFAlBN5pQACgkQCX/oGf+2qkN9ZACZAZXSsoFWJoDLsoqPj9aGd6QiEjoAoP79Il22Awt4fupQo3hqZL+JOYd9
+6476bb0e9da298f7adb7759265f784d9eb28884d 0 iEYEABECAAYFAlBkPuAACgkQCX/oGf+2qkMUxgCgglb7oUz6aO/2IC55x7u2xRy65HoAnj83lJHvsqrlllOquMxoLJ2UkTkO
 3ef42df4953f5813543c5d1cb2b323d13c8c0359 0 iEYEABECAAYFAlA/cv4ACgkQCX/oGf+2qkMT3gCgjbewzyw3X/1MOZjn6V5P3HqrQtoAoPdsUsBzwVelyg7jpbUhhzGW5Vbz
+d221450bb4d5334f101e6d0fe5d2e941bb714f0a 0 iEYEABECAAYFAlBqvAsACgkQCX/oGf+2qkNIogCfTU6AVwlfmEH2DZUjGkiE1zzo25MAoOkIN46+PHwWKslqp5lxFShVzVTd
+7643bde3a4855fc35ddf7269a221ba0e77863a75 0 iEYEABECAAYFAlBgQyAACgkQCX/oGf+2qkNE2ACfb7Xzd4dq5VTeUnFo9VSsPqoQHtsAn063Puz1dhXpBsvhgkpbDV7fXiR6
+2680cddd9aca96f87a83156d3ca27935a692dfb3 0 iEYEABECAAYFAlBsebEACgkQCX/oGf+2qkMexACdFPyyCM6bMSTiXilJF9M61iXNBQ4AnAwzonIXgFkr4tyY1WHa+PGw3caA
+aee16f41346874b9e355af6007df8df57b7f0266 0 iEYEABECAAYFAlBut3kACgkQCX/oGf+2qkPE8gCaAyk5dQSNyoOSpzPeOEtOLBhrF0MAn3XWPPVJ1Pb7vCei3oE3aQ8Ctj9o
--- a/.hgtags	Wed Oct 17 16:39:43 2012 +0200
+++ b/.hgtags	Wed Oct 17 18:29:21 2012 +0200
@@ -89,4 +89,9 @@
 6319e314cf98d9fd0df44324e8a5b2aead800b54 3.0MP12.2
 33314611486b1823d42d1059110369d7705ef13f 3.0MP13
 0389ecbdda642f959d524d644f1a73a3bc27d57a 3.0MP13.1
+141c70bce6606bca6bf2b8422b9c27fbf19e7ede 3.0MP13.2
 35168ddf12d33e94aeb18d2c79c6d9255a26c742 3.0MP14
+6861c9689350eae52de16fad01f78b37f5164c9e 3.0MP14.1
+bf2e6628cebd62b56796fe8433c35378d516e375 3.0MP15
+fa0e90f7e9eed2e99536b6c372a15a2448c03d06 3.0MP15.1
+1cd80d4b32bbafca742ca1406fee082f97f5f254 3.0MP16
--- a/config/Openbravo.properties.template	Wed Oct 17 16:39:43 2012 +0200
+++ b/config/Openbravo.properties.template	Wed Oct 17 18:29:21 2012 +0200
@@ -199,3 +199,8 @@
 # Setting this to true will enable extra (hidden) functionality used 
 # automated test scripts.
 test.environment=false
+
+# allows to compile classic 2.50 windows for all available tab
+# By default those all not generated anymore for tabs for which they are not needed
+#wad.generateAllClassic250Windows=true
+
Binary file modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/UpdateRecordId2Value.class has changed
Binary file modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/UpdateRecordId2ValueData.class has changed
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml	Wed Oct 17 18:29:21 2012 +0200
@@ -7820,9 +7820,9 @@
 <!--8420366B8591339CE040007F010023A9-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
 <!--8420366B8591339CE040007F010023A9-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--8420366B8591339CE040007F010023A9-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--8420366B8591339CE040007F010023A9-->  <NAME><![CDATA[Account No.]]></NAME>
-<!--8420366B8591339CE040007F010023A9-->  <DESCRIPTION><![CDATA[Account Number]]></DESCRIPTION>
-<!--8420366B8591339CE040007F010023A9-->  <HELP><![CDATA[The Account Number indicates the Number assigned to this account]]></HELP>
+<!--8420366B8591339CE040007F010023A9-->  <NAME><![CDATA[Displayed Account]]></NAME>
+<!--8420366B8591339CE040007F010023A9-->  <DESCRIPTION><![CDATA[Text that will identify this bank account]]></DESCRIPTION>
+<!--8420366B8591339CE040007F010023A9-->  <HELP><![CDATA[Text that will identify this bank account]]></HELP>
 <!--8420366B8591339CE040007F010023A9-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
 <!--8420366B8591339CE040007F010023A9-->  <AD_TAB_ID><![CDATA[5B9941AC1F6A4529A76FCA7CDA0A7D7A]]></AD_TAB_ID>
 <!--8420366B8591339CE040007F010023A9-->  <AD_COLUMN_ID><![CDATA[828EE0AE80515FA1E040007F010067C7]]></AD_COLUMN_ID>
@@ -8341,9 +8341,9 @@
 <!--8420366B85A3339CE040007F010023A9-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
 <!--8420366B85A3339CE040007F010023A9-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--8420366B85A3339CE040007F010023A9-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--8420366B85A3339CE040007F010023A9-->  <NAME><![CDATA[Swift code]]></NAME>
-<!--8420366B85A3339CE040007F010023A9-->  <DESCRIPTION><![CDATA[Swift Code (Society of Worldwide Interbank Financial Telecommunications)]]></DESCRIPTION>
-<!--8420366B85A3339CE040007F010023A9-->  <HELP><![CDATA[The SWIFT code is an identifier of a Bank]]></HELP>
+<!--8420366B85A3339CE040007F010023A9-->  <NAME><![CDATA[SWIFT Code]]></NAME>
+<!--8420366B85A3339CE040007F010023A9-->  <DESCRIPTION><![CDATA[SWIFT Code (Society of Worldwide Interbank Financial Telecommunications)]]></DESCRIPTION>
+<!--8420366B85A3339CE040007F010023A9-->  <HELP><![CDATA[The SWIFT Code is an identifier of a Bank]]></HELP>
 <!--8420366B85A3339CE040007F010023A9-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
 <!--8420366B85A3339CE040007F010023A9-->  <AD_TAB_ID><![CDATA[5B9941AC1F6A4529A76FCA7CDA0A7D7A]]></AD_TAB_ID>
 <!--8420366B85A3339CE040007F010023A9-->  <AD_COLUMN_ID><![CDATA[828EE0AE804A5FA1E040007F010067C7]]></AD_COLUMN_ID>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MESSAGE.xml	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MESSAGE.xml	Wed Oct 17 18:29:21 2012 +0200
@@ -220,6 +220,17 @@
 <!--44973749BE9E47989F1E9D4A1C52EDEF-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--44973749BE9E47989F1E9D4A1C52EDEF--></AD_MESSAGE>
 
+<!--48898A3B7F9141C0B9BFBDD9AE5FCF8F--><AD_MESSAGE>
+<!--48898A3B7F9141C0B9BFBDD9AE5FCF8F-->  <AD_MESSAGE_ID><![CDATA[48898A3B7F9141C0B9BFBDD9AE5FCF8F]]></AD_MESSAGE_ID>
+<!--48898A3B7F9141C0B9BFBDD9AE5FCF8F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--48898A3B7F9141C0B9BFBDD9AE5FCF8F-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--48898A3B7F9141C0B9BFBDD9AE5FCF8F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--48898A3B7F9141C0B9BFBDD9AE5FCF8F-->  <VALUE><![CDATA[APRM_PeriodNotAvailableClearedItem]]></VALUE>
+<!--48898A3B7F9141C0B9BFBDD9AE5FCF8F-->  <MSGTEXT><![CDATA[The period of the cleared item (%s) is not open or available.]]></MSGTEXT>
+<!--48898A3B7F9141C0B9BFBDD9AE5FCF8F-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--48898A3B7F9141C0B9BFBDD9AE5FCF8F-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--48898A3B7F9141C0B9BFBDD9AE5FCF8F--></AD_MESSAGE>
+
 <!--49C16126D1A141C398175B0632C08F95--><AD_MESSAGE>
 <!--49C16126D1A141C398175B0632C08F95-->  <AD_MESSAGE_ID><![CDATA[49C16126D1A141C398175B0632C08F95]]></AD_MESSAGE_ID>
 <!--49C16126D1A141C398175B0632C08F95-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE.xml	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE.xml	Wed Oct 17 18:29:21 2012 +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.17839]]></VERSION>
+<!--A918E3331C404B889D69AA9BFAFB23AC-->  <VERSION><![CDATA[3.0.18223]]></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	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Oct 17 18:29:21 2012 +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.17839]]></STARTVERSION>
+<!--89326AE95DAD449D85DFAB2C5B1C6683-->  <STARTVERSION><![CDATA[2.1.18223]]></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.17839]]></STARTVERSION>
+<!--B97FC854C6DD41E692161585645A900F-->  <STARTVERSION><![CDATA[3.0.18223]]></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_VAL_RULE.xml	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_VAL_RULE.xml	Wed Oct 17 18:29:21 2012 +0200
@@ -33,6 +33,18 @@
 <!--575E470ABADB4C278132C957A78C47E3-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--575E470ABADB4C278132C957A78C47E3--></AD_VAL_RULE>
 
+<!--E00B19370995405C8014D48E2DE98FD1--><AD_VAL_RULE>
+<!--E00B19370995405C8014D48E2DE98FD1-->  <AD_VAL_RULE_ID><![CDATA[E00B19370995405C8014D48E2DE98FD1]]></AD_VAL_RULE_ID>
+<!--E00B19370995405C8014D48E2DE98FD1-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--E00B19370995405C8014D48E2DE98FD1-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--E00B19370995405C8014D48E2DE98FD1-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--E00B19370995405C8014D48E2DE98FD1-->  <NAME><![CDATA[AD_Org show product's child organizations]]></NAME>
+<!--E00B19370995405C8014D48E2DE98FD1-->  <DESCRIPTION><![CDATA[It only shows the child organizations of the organization of the product.]]></DESCRIPTION>
+<!--E00B19370995405C8014D48E2DE98FD1-->  <TYPE><![CDATA[S]]></TYPE>
+<!--E00B19370995405C8014D48E2DE98FD1-->  <CODE><![CDATA[AD_ISORGINCLUDED(ad_org.ad_org_id, @Product_Org@, ad_org.ad_client_id)<>-1 AND IsReady = 'Y']]></CODE>
+<!--E00B19370995405C8014D48E2DE98FD1-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--E00B19370995405C8014D48E2DE98FD1--></AD_VAL_RULE>
+
 <!--FF8080812E448A62012E44943A160017--><AD_VAL_RULE>
 <!--FF8080812E448A62012E44943A160017-->  <AD_VAL_RULE_ID><![CDATA[FF8080812E448A62012E44943A160017]]></AD_VAL_RULE_ID>
 <!--FF8080812E448A62012E44943A160017-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/UpdateRecordId2Value.java	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/UpdateRecordId2Value.java	Wed Oct 17 18:29:21 2012 +0200
@@ -31,7 +31,9 @@
   public void execute() {
     try {
       ConnectionProvider cp = getConnectionProvider();
-      UpdateRecordId2ValueData.update(cp);
+      if(UpdateRecordId2ValueData.selectCheck(cp)){
+        UpdateRecordId2ValueData.update(cp);
+      }
     } catch (Exception e) {
       handleError(e);
     }
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/UpdateRecordId2Value_data.xsql	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/UpdateRecordId2Value_data.xsql	Wed Oct 17 18:29:21 2012 +0200
@@ -27,12 +27,24 @@
       ]]>
     </Sql>
   </SqlMethod>
+  <SqlMethod name="selectCheck" type="preparedStatement" return="boolean">
+    <SqlMethodComment></SqlMethodComment>
+    <Sql>
+      <![CDATA[
+        SELECT count(1) as name from dual
+        WHERE EXISTS(SELECT 1 FROM FACT_ACCT 
+        WHERE NOT EXISTS (SELECT 1 FROM C_DEBT_PAYMENT WHERE C_DEBT_PAYMENT_ID = RECORD_ID2)
+        AND RECORD_ID2 IS NOT NULL)
+      ]]>
+    </Sql>
+  </SqlMethod>
   <SqlMethod name="update" type="preparedStatement" return="rowCount">
     <SqlMethodComment></SqlMethodComment>
     <Sql>
       <![CDATA[
         UPDATE FACT_ACCT SET RECORD_ID2 = NULL 
         WHERE NOT EXISTS (SELECT 1 FROM C_DEBT_PAYMENT WHERE C_DEBT_PAYMENT_ID = RECORD_ID2)
+        AND RECORD_ID2 IS NOT NULL
       ]]>
     </Sql>
   </SqlMethod>
--- a/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/UpdateRecordId2ValueData.java	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/UpdateRecordId2ValueData.java	Wed Oct 17 18:29:21 2012 +0200
@@ -22,7 +22,7 @@
   }
 
   public String getField(String fieldName) {
-    if (fieldName.equalsIgnoreCase("name"))
+    if (fieldName.equalsIgnoreCase("NAME"))
       return name;
    else {
      log4j.debug("Field does not exist: " + fieldName);
@@ -57,7 +57,7 @@
       while(continueResult && result.next()) {
         countRecord++;
         UpdateRecordId2ValueData objectUpdateRecordId2ValueData = new UpdateRecordId2ValueData();
-        objectUpdateRecordId2ValueData.name = UtilSql.getValue(result, "name");
+        objectUpdateRecordId2ValueData.name = UtilSql.getValue(result, "NAME");
         objectUpdateRecordId2ValueData.InitRecordNumber = Integer.toString(firstRegister);
         vector.addElement(objectUpdateRecordId2ValueData);
         if (countRecord >= numberRegisters && numberRegisters != 0) {
@@ -83,11 +83,48 @@
     return(objectUpdateRecordId2ValueData);
   }
 
+  public static boolean selectCheck(ConnectionProvider connectionProvider)    throws ServletException {
+    String strSql = "";
+    strSql = strSql + 
+      "        SELECT count(1) as name from dual" +
+      "        WHERE EXISTS(SELECT 1 FROM FACT_ACCT " +
+      "        WHERE NOT EXISTS (SELECT 1 FROM C_DEBT_PAYMENT WHERE C_DEBT_PAYMENT_ID = RECORD_ID2)" +
+      "        AND RECORD_ID2 IS NOT NULL)";
+
+    ResultSet result;
+    boolean boolReturn = false;
+    PreparedStatement st = null;
+
+    try {
+    st = connectionProvider.getPreparedStatement(strSql);
+
+      result = st.executeQuery();
+      if(result.next()) {
+        boolReturn = !UtilSql.getValue(result, "NAME").equals("0");
+      }
+      result.close();
+    } catch(SQLException e){
+      log4j.error("SQL error in query: " + strSql + "Exception:"+ e);
+      throw new ServletException("@CODE=" + Integer.toString(e.getErrorCode()) + "@" + e.getMessage());
+    } catch(Exception ex){
+      log4j.error("Exception in query: " + strSql + "Exception:"+ ex);
+      throw new ServletException("@CODE=@" + ex.getMessage());
+    } finally {
+      try {
+        connectionProvider.releasePreparedStatement(st);
+      } catch(Exception ignore){
+        ignore.printStackTrace();
+      }
+    }
+    return(boolReturn);
+  }
+
   public static int update(ConnectionProvider connectionProvider)    throws ServletException {
     String strSql = "";
     strSql = strSql + 
       "        UPDATE FACT_ACCT SET RECORD_ID2 = NULL " +
-      "        WHERE NOT EXISTS (SELECT 1 FROM C_DEBT_PAYMENT WHERE C_DEBT_PAYMENT_ID = RECORD_ID2)";
+      "        WHERE NOT EXISTS (SELECT 1 FROM C_DEBT_PAYMENT WHERE C_DEBT_PAYMENT_ID = RECORD_ID2)" +
+      "        AND RECORD_ID2 IS NOT NULL";
 
     int updateCount = 0;
     PreparedStatement st = null;
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.html	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.html	Wed Oct 17 18:29:21 2012 +0200
@@ -62,6 +62,77 @@
 </script>
 <script language="JavaScript" type="text/javascript">
 //Ajax calls
+function distributeAmount(_amount) {
+  var amount = applyFormat(_amount);
+  var distributedAmount = 0;
+  var keepSelection = false;
+  var chk = frm.inpScheduledPaymentDetailId;
+  var scheduledPaymentDetailId, outstandingAmount, j, i;
+  if (isGLItemEnabled) {
+    amount = subtract(amount, frm.inpGLSumAmount.value);
+  }
+  
+  if (!chk) {
+    updateTotal();
+    return;
+  } else if (!chk.length) {
+    scheduledPaymentDetailId = frm.inpRecordId0.value;
+    outstandingAmount = frm.elements["inpRecordAmt" + scheduledPaymentDetailId].value;
+    if ( compare(outstandingAmount, '>', amount) ) {
+      outstandingAmount = amount;
+    }
+    frm.elements["inpPaymentAmount" + scheduledPaymentDetailId].value = outstandingAmount;
+    if (!chk.checked && compare(outstandingAmount, '!=', 0)) {
+      chk.checked = true;
+      updateData(chk.value, chk.checked);
+    }
+  } else {
+    var total = chk.length;
+    for ( i = 0; i < total; i++) {
+      if (chk[i].checked) {
+        distributedAmount = add(distributedAmount, frm.elements["inpPaymentAmount" + chk[i].value].value);
+      }
+    }
+    if (compare(amount, '>', distributedAmount) || compare(amount, '==', distributedAmount)) {
+      amount = subtract(amount, distributedAmount);
+      keepSelection = true;
+    }
+    for (i = 0; i < total; i++) {
+      scheduledPaymentDetailId = frm.elements["inpRecordId" + i].value;
+      outstandingAmount = frm.elements["inpRecordAmt" + scheduledPaymentDetailId].value;
+      if (chk[i].checked && keepSelection) {
+        if(compare(outstandingAmount, '<', amount) && compare(distributedAmount, '==', outstandingAmount))
+    	  continue;
+        else
+          amount = add(amount, frm.elements["inpPaymentAmount" + chk[i].value].value);
+      }
+      if ( compare(outstandingAmount, '>', amount) ) {
+        outstandingAmount = amount;
+      }
+      if ( compare(amount, '==', 0) && compare(outstandingAmount, '>=', 0 )) {
+        frm.elements["inpPaymentAmount" + scheduledPaymentDetailId].value = "";
+        for ( j = 0; j < total; j++) {
+          if (chk[j].checked && chk[j].value === scheduledPaymentDetailId) {
+            chk[j].checked = false;
+            updateData(chk[j].value, chk[j].checked);
+          }
+        }
+      } else {
+        frm.elements["inpPaymentAmount" + scheduledPaymentDetailId].value = outstandingAmount;
+        for ( j = 0; j < total; j++) {
+          if (!chk[j].checked && chk[j].value === scheduledPaymentDetailId) {
+            chk[j].checked = true;
+            updateData(chk[j].value, chk[j].checked,null ,true );
+          }
+        }
+        amount = subtract(amount, outstandingAmount);
+      }
+    }
+  }
+  updateTotal();
+  return true;
+}
+
 function callBackGrid(paramXMLParticular, XMLHttpRequestObj) {
   var strText = '';
   if (getReadyStateHandler(XMLHttpRequestObj)) {
@@ -421,7 +492,7 @@
         }
       }
       else{
-          updateData(chk[i].value, chk[i].checked, drivenByGrid,false);
+          updateData(chk[i].value, chk[i].checked, drivenByGrid,true);
       }
     }
   }
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.html	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.html	Wed Oct 17 18:29:21 2012 +0200
@@ -56,17 +56,17 @@
 function validate(action) {
   var frm = document.frmMain;
   if (action=='openprocess') {
-	if (isMulticurrencyTxn()) {
-	  if (frm.inpActualConverted.value==null || frm.inpActualConverted.value=="") {
-	   setWindowElementFocus(frm.inpActualConverted);
-	   showJSMessage(7);
-	   return false;
-	  } else if (frm.inpExchangeRate.value==null || frm.inpExchangeRate.value=="") {
-	   setWindowElementFocus(frm.inpExchangeRate);
-	   showJSMessage(7);
-	   return false;
-	   }
-	 }
+    if (isMulticurrencyTxn()) {
+      if (frm.inpActualConverted.value==null || frm.inpActualConverted.value=="") {
+       setWindowElementFocus(frm.inpActualConverted);
+       showJSMessage(7);
+       return false;
+      } else if (frm.inpExchangeRate.value==null || frm.inpExchangeRate.value=="") {
+       setWindowElementFocus(frm.inpExchangeRate);
+       showJSMessage(7);
+       return false;
+       }
+     }
     if (frm.inpDocNumber.value==null || frm.inpDocNumber.value=="") {
       setWindowElementFocus(frm.inpDocNumber);
       showJSMessage(7);
@@ -137,6 +137,7 @@
       submitThisPage('SAVEANDPROCESS');
       return true;
     }
+    calculateProperProcessOptions();
     document.getElementById('client_top_popup').style.display = 'block';
     document.getElementById('client_top').style.display = 'none';
     document.getElementById('client_middle').style.display = 'none';
@@ -150,7 +151,43 @@
   document.getElementById('client_bottom').style.display = 'block';
 }
 
-function updateData(key, mark, drivenByGrid) {
+function updateAll(drivenByGrid) {
+  var frm = document.frmMain;
+  var chk = frm.inpScheduledPaymentDetailId;
+  var recordAmount, i;
+
+  frm.inpExpectedPayment.value = applyFormat('0');
+  if (isGLItemEnabled) {
+    frm.inpExpectedPayment.value = frm.inpGLSumAmount.value || applyFormat('0');
+  }
+  if (!chk) {
+    return;
+  } else if (!chk.length) {
+    if (!chk.checked) {
+      recordAmount = frm.elements["inpRecordAmt" + chk.value].value;
+      frm.inpExpectedPayment.value = add(frm.inpExpectedPayment.value, recordAmount);
+    }
+    updateData(chk.value, chk.checked, drivenByGrid);
+  } else {
+    var total = chk.length;
+    for (i = 0; i < total; i++) {
+      if (!chk[i].checked) {
+        recordAmount = frm.elements["inpRecordAmt" + chk[i].value].value;
+        frm.inpExpectedPayment.value = add(frm.inpExpectedPayment.value, recordAmount);
+      }
+      if (!drivenByGrid || drivenByGrid == false){
+        updateData(chk[i].value, chk[i].checked, drivenByGrid,true);
+      }
+      else{
+        updateData(chk[i].value, chk[i].checked, drivenByGrid,false);
+      }
+    }
+    updateTotal();
+  }
+  return true;
+}
+
+function updateData(key, mark, drivenByGrid,all) {
   if (mark==null) mark=false;
   updateReadOnly(key, mark);
   var paymentAmount = document.frmMain.elements['inpPaymentAmount'+key];
@@ -190,7 +227,9 @@
       }
     }
   }
-  updateTotal();
+  if(!all){
+    updateTotal();
+  }
 
   return true;
 }
@@ -367,6 +406,16 @@
   }
 }
 
+function calculateProperProcessOptions() {
+  try {
+    var url = "../org.openbravo.advpaymentmngt.ad_actionbutton/AddPaymentFromInvoice.html";
+    var paramXMLReq = null;
+    return submitXmlHttpRequest(callBackProperOption, document.frmMain, "PROPERPROCESSOPTIONS", url, false, null, paramXMLReq);
+  } catch (e) {
+    alert(e);
+  }
+}
+
 function callBackFinancialAccount(paramXMLParticular, XMLHttpRequestObj) {
   if (getReadyStateHandler(XMLHttpRequestObj)) {
     try {
@@ -384,7 +433,7 @@
             document.getElementById('paramStrAmountwriteoff').value = applyFormatJSToOBMasked(resp.awriteoff, resp.formatOutput);
         }
         else{
-        	document.getElementById('paramStrtypewriteoff').value = '';
+            document.getElementById('paramStrtypewriteoff').value = '';
             document.getElementById('paramStrAmountwriteoff').value = '';
         }
         updateDifference();
@@ -413,6 +462,26 @@
   return true;
 }
 
+function callBackProperOption(paramXMLParticular, XMLHttpRequestObj) {
+  var strText = "";
+  if (getReadyStateHandler(XMLHttpRequestObj)) {
+    try {
+      if (XMLHttpRequestObj.responseText) {
+    	strText = XMLHttpRequestObj.responseText;
+        createCombo(document.getElementById('paramActionDocument'), strText);
+	    document.getElementById('client_top_popup').style.display = 'block';
+        document.getElementById('client_top').style.display = 'none';
+        document.getElementById('client_middle').style.display = 'none';
+        document.getElementById('client_bottom').style.display = 'none';
+      } else {
+        document.getElementById('paramActionDocument').innerHTML = '';
+      }
+    } catch (e) {
+    }
+  }
+  return true;
+}
+
 </script>
 <script language="JavaScript" type="text/javascript">
   function onLoadDo(){
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.java	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.java	Wed Oct 17 18:29:21 2012 +0200
@@ -33,6 +33,7 @@
 
 import org.codehaus.jettison.json.JSONException;
 import org.codehaus.jettison.json.JSONObject;
+import org.hibernate.Query;
 import org.hibernate.criterion.Restrictions;
 import org.openbravo.advpaymentmngt.dao.AdvPaymentMngtDao;
 import org.openbravo.advpaymentmngt.process.FIN_AddPayment;
@@ -264,6 +265,13 @@
 
       vars.setMessage(strTabId, message);
       printPageClosePopUp(response, vars, strWindowPath);
+    } else if (vars.commandIn("PROPERPROCESSOPTIONS")) {
+      String strPaymentMethodId = vars.getRequiredStringParameter("inpPaymentMethod");
+      String strFinancialAccountId = vars.getRequiredStringParameter("inpFinancialAccount");
+      String strOrgId = vars.getRequiredStringParameter("inpadOrgId");
+      boolean isReceipt = vars.getRequiredStringParameter("isReceipt").equals("Y");
+      refreshProcessOptions(response, strPaymentMethodId, strFinancialAccountId, strOrgId,
+          isReceipt);
     }
 
   }
@@ -587,6 +595,107 @@
     out.close();
   }
 
+  private void refreshProcessOptions(HttpServletResponse response, String strPaymentMethod,
+      String strFinancialAccountId, String strOrgId, boolean isReceipt) throws IOException,
+      ServletException {
+    log4j.debug("Callout: Financial Account has changed to" + strFinancialAccountId);
+
+    FIN_PaymentMethod paymentMethod = OBDal.getInstance().get(FIN_PaymentMethod.class,
+        strPaymentMethod);
+    FIN_FinancialAccount financialAccount = OBDal.getInstance().get(FIN_FinancialAccount.class,
+        strFinancialAccountId);
+    FinAccPaymentMethod finAccPaymentMethod = null;
+
+    for (FinAccPaymentMethod finAccPaymentMethodItem : financialAccount
+        .getFinancialMgmtFinAccPaymentMethodList()) {
+      if (finAccPaymentMethodItem.getPaymentMethod().getId()
+          .equalsIgnoreCase(paymentMethod.getId())) {
+        finAccPaymentMethod = finAccPaymentMethodItem;
+      }
+    }
+    String processOprtionsComboHtml = null;
+    if (isReceipt) {
+      if (finAccPaymentMethod.isAutomaticDeposit()) {
+        // 1 option: Process.
+        processOprtionsComboHtml = FIN_Utility.getOptionsList(
+            processActionWithDepositWithdrawn("F903F726B41A49D3860243101CEEBA25", true), null,
+            true, true);
+
+      } else {
+        // 2 options: Process or Process and Deposit.
+        try {
+          OBContext.setAdminMode(true);
+          org.openbravo.model.ad.domain.Reference reference = OBDal.getInstance().get(
+              org.openbravo.model.ad.domain.Reference.class, "F903F726B41A49D3860243101CEEBA25");
+          processOprtionsComboHtml = FIN_Utility.getOptionsList(reference.getADListList(), null,
+              true, true);
+        } catch (Exception e) {
+
+        } finally {
+          OBContext.restorePreviousMode();
+        }
+      }
+    } else {
+      if (finAccPaymentMethod.isAutomaticWithdrawn()) {
+        // 1 option: Process.
+        processOprtionsComboHtml = FIN_Utility.getOptionsList(
+            processActionWithDepositWithdrawn("F15C13A199A748F1B0B00E985A64C036", false), null,
+            true, true);
+
+      } else {
+        // 2 Options: Process or Process and Withdrawn
+        try {
+          OBContext.setAdminMode(true);
+          org.openbravo.model.ad.domain.Reference reference = OBDal.getInstance().get(
+              org.openbravo.model.ad.domain.Reference.class, "F15C13A199A748F1B0B00E985A64C036");
+          processOprtionsComboHtml = FIN_Utility.getOptionsList(reference.getADListList(), null,
+              true, true);
+        } catch (Exception e) {
+
+        } finally {
+          OBContext.restorePreviousMode();
+        }
+      }
+    }
+
+    response.setContentType("text/html; charset=UTF-8");
+    PrintWriter out = response.getWriter();
+    out.println(processOprtionsComboHtml.replaceAll("\"", "\\'"));
+
+    out.close();
+  }
+
+  /**
+   * Returns the list of the reference list for payment process
+   * 
+   * @param refId
+   *          . Indicates the Id of the reference.
+   * @param deposit
+   *          . Indicates whether the method is being executed for deposit of withdrawn.
+   * @return. Returns the list of process actions.
+   */
+  private List processActionWithDepositWithdrawn(String refId, boolean deposit) {
+    try {
+      OBContext.setAdminMode(true);
+      StringBuilder hql = new StringBuilder();
+      hql.append("select l ");
+      hql.append("from ADReference r ");
+      hql.append("  left join r.aDListList l ");
+      hql.append("where r.id = '").append(refId).append("' ");
+      hql.append("  and lower(l.name) like '%").append((deposit == true) ? "deposit" : "withdrawn")
+          .append("%'");
+
+      final Query query = OBDal.getInstance().getSession().createQuery(hql.toString());
+
+      return query.list();
+    } catch (Exception e) {
+      return null;
+    } finally {
+      OBContext.restorePreviousMode();
+    }
+
+  }
+
   private BigDecimal findExchangeRate(VariablesSecureApp vars, Currency paymentCurrency,
       Currency financialAccountCurrency, Date paymentDate, Organization organization,
       int conversionRatePrecision) {
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/ProcessInvoice.java	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/ProcessInvoice.java	Wed Oct 17 18:29:21 2012 +0200
@@ -186,29 +186,30 @@
           String invoiceDocCategory = "";
           try {
             invoiceDocCategory = invoice.getDocumentType().getDocumentCategory();
+
+            /*
+             * Print a grid popup in case of credit payment
+             */
+            // If the invoice grand total is ZERO or already has payments (due to
+            // payment method automation) or the business partner does not have a default financial
+            // account defined or invoice's payment method is not inside BP's financial
+            // account do not cancel credit
+            if (BigDecimal.ZERO.compareTo(invoice.getGrandTotalAmount()) != 0
+                && isPaymentMethodConfigured(invoice)
+                && !isInvoiceWithPayments(invoice)
+                && (AcctServer.DOCTYPE_ARInvoice.equals(invoiceDocCategory) || AcctServer.DOCTYPE_APInvoice
+                    .equals(invoiceDocCategory))) {
+              creditPayments = dao.getCustomerPaymentsWithCredit(invoice.getOrganization(),
+                  invoice.getBusinessPartner(), invoice.isSalesTransaction());
+              if (creditPayments != null && !creditPayments.isEmpty()) {
+                printPageCreditPaymentGrid(response, vars, strC_Invoice_ID, strdocaction, strTabId,
+                    strC_Invoice_ID, strdocaction, strWindowId, strTabId, invoice.getInvoiceDate(),
+                    strOrg);
+              }
+            }
           } finally {
             OBContext.restorePreviousMode();
           }
-          /*
-           * Print a grid popup in case of credit payment
-           */
-          // If the invoice grand total is ZERO or already has payments (due to
-          // payment method automation) or the business partner does not have a default financial
-          // account defined or invoice's payment method is not inside BP's financial
-          // account do not cancel credit
-          if (BigDecimal.ZERO.compareTo(invoice.getGrandTotalAmount()) != 0
-              && isPaymentMethodConfigured(invoice)
-              && !isInvoiceWithPayments(invoice)
-              && (AcctServer.DOCTYPE_ARInvoice.equals(invoiceDocCategory) || AcctServer.DOCTYPE_APInvoice
-                  .equals(invoiceDocCategory))) {
-            creditPayments = dao.getCustomerPaymentsWithCredit(invoice.getOrganization(),
-                invoice.getBusinessPartner(), invoice.isSalesTransaction());
-            if (creditPayments != null && !creditPayments.isEmpty()) {
-              printPageCreditPaymentGrid(response, vars, strC_Invoice_ID, strdocaction, strTabId,
-                  strC_Invoice_ID, strdocaction, strWindowId, strTabId, invoice.getInvoiceDate(),
-                  strOrg);
-            }
-          }
 
           executePayments(response, vars, strWindowId, strTabId, strC_Invoice_ID, strOrg);
         }
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/Reconciliation.java	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/Reconciliation.java	Wed Oct 17 18:29:21 2012 +0200
@@ -46,7 +46,9 @@
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.service.OBCriteria;
 import org.openbravo.dal.service.OBDal;
+import org.openbravo.dal.service.OBQuery;
 import org.openbravo.data.FieldProvider;
+import org.openbravo.erpCommon.ad_forms.AcctServer;
 import org.openbravo.erpCommon.utility.DateTimeData;
 import org.openbravo.erpCommon.utility.OBError;
 import org.openbravo.erpCommon.utility.Utility;
@@ -214,6 +216,32 @@
           return;
         }
 
+        if (!FIN_Utility.isPeriodOpen(reconciliation.getClient().getId(),
+            AcctServer.DOCTYPE_Reconciliation, reconciliation.getOrganization().getId(),
+            strStatementDate)) {
+          msg.setType("Error");
+          msg.setTitle(Utility.messageBD(this, "Error", vars.getLanguage()));
+          msg.setMessage(Utility.parseTranslation(this, vars, vars.getLanguage(),
+              "@PeriodNotAvailable@"));
+          vars.setMessage(strTabId, msg);
+          msg = null;
+          printPageClosePopUpAndRefreshParent(response, vars);
+          return;
+        }
+
+        String identifier = linesInNotAvailablePeriod(reconciliation.getId());
+        if (!identifier.equalsIgnoreCase("")) {
+          msg.setType("Error");
+          msg.setTitle(Utility.messageBD(this, "Error", vars.getLanguage()));
+          msg.setMessage(String.format(
+              Utility.messageBD(this, "APRM_PeriodNotAvailableClearedItem", vars.getLanguage()),
+              identifier));
+          vars.setMessage(strTabId, msg);
+          msg = null;
+          printPageClosePopUpAndRefreshParent(response, vars);
+          return;
+        }
+
         for (APRM_FinaccTransactionV finacctrxv : reconciliation.getAPRMFinaccTransactionVList()) {
           if (reconciliation.getEndingDate().compareTo(
               finacctrxv.getFinancialAccountTransaction().getTransactionDate()) < 0) {
@@ -461,4 +489,26 @@
     return "This servlet manages manual transactions reconciliations.";
   }
 
+  private String linesInNotAvailablePeriod(String reconciliationId) {
+    final StringBuilder hql = new StringBuilder();
+
+    hql.append(" as rl ");
+    hql.append(" where rl.reconciliation.id = '").append(reconciliationId).append("' ");
+    hql.append("   and c_chk_open_period(rl.organization, rl.transactionDate, 'REC', null) = 0 ");
+    hql.append(" order by rl.transactionDate");
+
+    final OBQuery<FIN_ReconciliationLine_v> obqRL = OBDal.getInstance().createQuery(
+        FIN_ReconciliationLine_v.class, hql.toString());
+    obqRL.setMaxResult(1);
+
+    List<FIN_ReconciliationLine_v> obqRLlist = obqRL.list();
+
+    if (obqRLlist.size() == 0) {
+      return "";
+    } else {
+      return obqRLlist.get(0).getIdentifier();
+    }
+
+  }
+
 }
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/AdvPaymentMngtDao.java	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/AdvPaymentMngtDao.java	Wed Oct 17 18:29:21 2012 +0200
@@ -55,6 +55,7 @@
 import org.openbravo.model.common.currency.Currency;
 import org.openbravo.model.common.enterprise.DocumentType;
 import org.openbravo.model.common.enterprise.Organization;
+import org.openbravo.model.common.enterprise.OrganizationInformation;
 import org.openbravo.model.common.invoice.Invoice;
 import org.openbravo.model.common.order.Order;
 import org.openbravo.model.common.plm.Product;
@@ -214,6 +215,8 @@
       whereClause.append(" left outer join psd.invoicePaymentSchedule as ips ");
       whereClause.append(" left outer join ips.invoice as inv");
       whereClause.append(" left outer join ips.fINPaymentPriority as ipriority");
+      whereClause.append(" left outer join psd.organization as org");
+      whereClause.append(" left outer join org.organizationInformationList as oinfo");
       whereClause.append(" where psd.");
       whereClause.append(FIN_PaymentScheduleDetail.PROPERTY_PAYMENTDETAILS);
       whereClause.append(" is null");
@@ -223,6 +226,7 @@
       whereClause.append(Utility.getInStrSet(OBContext.getOBContext()
           .getOrganizationStructureProvider().getNaturalTree(organization.getId())));
       whereClause.append(")");
+      whereClause.append(" and (oinfo is null or oinfo.active = true)");
 
       // remove selected payments
       if (selectedScheduledPaymentDetails != null && selectedScheduledPaymentDetails.size() > 0) {
@@ -292,13 +296,33 @@
         whereClause.append(Invoice.PROPERTY_SALESTRANSACTION);
         whereClause.append(" = ");
         whereClause.append(isReceipt);
+
+        // Invoice Document No. filter
         if (!StringUtils.isEmpty(strDocumentNo)) {
-          whereClause.append(" and inv.");
+          whereClause.append(" and (case when");
+          whereClause.append(" (inv.");
+          whereClause.append(Invoice.PROPERTY_SALESTRANSACTION);
+          whereClause.append(" = false");
+          whereClause.append(" and oinfo is not null");
+          whereClause.append(" and oinfo.");
+          whereClause.append(OrganizationInformation.PROPERTY_APRMPAYMENTDESCRIPTION);
+          whereClause.append(" like 'Supplier Reference')");
+          whereClause.append(" then ");
+          // When the Organization of the Invoice sets that the Invoice Document No. is the
+          // supplier's
+          whereClause.append(" inv.");
+          whereClause.append(Invoice.PROPERTY_ORDERREFERENCE);
+          whereClause.append(" else ");
+          // When the Organization of the Invoice sets that the Invoice Document No. is the default
+          // Invoice Number
+          whereClause.append(" inv.");
           whereClause.append(Invoice.PROPERTY_DOCUMENTNO);
+          whereClause.append(" end) ");
           whereClause.append(" like '%");
           whereClause.append(strDocumentNo);
           whereClause.append("%' ");
         }
+
         whereClause.append(" and inv.");
         whereClause.append(Invoice.PROPERTY_CURRENCY);
         whereClause.append(".id = '");
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_AddPayment.java	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_AddPayment.java	Wed Oct 17 18:29:21 2012 +0200
@@ -46,6 +46,7 @@
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.service.OBCriteria;
 import org.openbravo.dal.service.OBDal;
+import org.openbravo.dal.service.OBDao;
 import org.openbravo.data.FieldProvider;
 import org.openbravo.database.ConnectionProvider;
 import org.openbravo.erpCommon.utility.FieldProviderFactory;
@@ -55,6 +56,7 @@
 import org.openbravo.model.common.currency.Currency;
 import org.openbravo.model.common.enterprise.DocumentType;
 import org.openbravo.model.common.enterprise.Organization;
+import org.openbravo.model.common.enterprise.OrganizationInformation;
 import org.openbravo.model.common.invoice.Invoice;
 import org.openbravo.model.common.plm.Product;
 import org.openbravo.model.financialmgmt.gl.GLItem;
@@ -240,8 +242,7 @@
           BigDecimal paymentDetailAmount = selectedPaymentScheduleDetailsAmounts
               .get(paymentScheduleDetail.getId());
           // If detail to be added is zero amount, skip it
-          if (paymentDetailAmount.signum() == 0
-              && paymentScheduleDetail.getWriteoffAmount().signum() == 0) {
+          if (paymentDetailAmount.signum() == 0 && !isWriteoff) {
             continue;
           }
           BigDecimal amountDifference = paymentScheduleDetail.getAmount().subtract(
@@ -731,10 +732,28 @@
           FieldProviderFactory.setField(data[i], "orderPaymentScheduleId", "");
         }
         if (FIN_PaymentScheduleDetails[i].getInvoicePaymentSchedule() != null) {
-          FieldProviderFactory.setField(data[i], "invoiceNr", FIN_PaymentScheduleDetails[i]
-              .getInvoicePaymentSchedule().getInvoice().getDocumentNo());
-          FieldProviderFactory.setField(data[i], "invoiceNrTrunc", FIN_PaymentScheduleDetails[i]
-              .getInvoicePaymentSchedule().getInvoice().getDocumentNo());
+          FIN_PaymentSchedule psd = FIN_PaymentScheduleDetails[i].getInvoicePaymentSchedule();
+          OrganizationInformation orgInfo = OBDao.getActiveOBObjectList(psd.getOrganization(),
+              Organization.PROPERTY_ORGANIZATIONINFORMATIONLIST) != null ? (OrganizationInformation) OBDao
+              .getActiveOBObjectList(psd.getOrganization(),
+                  Organization.PROPERTY_ORGANIZATIONINFORMATIONLIST).get(0) : null;
+          if (!psd.getInvoice().isSalesTransaction() && orgInfo != null
+              && orgInfo.getAPRMPaymentDescription().equals("Supplier Reference")) {
+            // When the Organization of the Invoice sets that the Invoice Document No. is the
+            // supplier's
+            FieldProviderFactory.setField(data[i], "invoiceNr", FIN_PaymentScheduleDetails[i]
+                .getInvoicePaymentSchedule().getInvoice().getOrderReference());
+            FieldProviderFactory.setField(data[i], "invoiceNrTrunc", FIN_PaymentScheduleDetails[i]
+                .getInvoicePaymentSchedule().getInvoice().getOrderReference());
+          } else {
+            // When the Organization of the Invoice sets that the Invoice Document No. is the
+            // default
+            // Invoice Number
+            FieldProviderFactory.setField(data[i], "invoiceNr", FIN_PaymentScheduleDetails[i]
+                .getInvoicePaymentSchedule().getInvoice().getDocumentNo());
+            FieldProviderFactory.setField(data[i], "invoiceNrTrunc", FIN_PaymentScheduleDetails[i]
+                .getInvoicePaymentSchedule().getInvoice().getDocumentNo());
+          }
           FieldProviderFactory.setField(data[i], "invoicePaymentScheduleId",
               FIN_PaymentScheduleDetails[i].getInvoicePaymentSchedule().getId());
         } else {
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java	Wed Oct 17 18:29:21 2012 +0200
@@ -39,6 +39,7 @@
 import org.openbravo.dal.service.OBCriteria;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.database.ConnectionProvider;
+import org.openbravo.erpCommon.utility.OBDateUtils;
 import org.openbravo.erpCommon.utility.OBError;
 import org.openbravo.erpCommon.utility.Utility;
 import org.openbravo.model.common.businesspartner.BusinessPartner;
@@ -103,6 +104,17 @@
           dao.createAPRMReadyPreference();
         }
 
+        if (!FIN_Utility.isPeriodOpen(payment.getClient().getId(), payment.getDocumentType()
+            .getDocumentCategory(), payment.getOrganization().getId(), OBDateUtils
+            .formatDate(payment.getPaymentDate()))) {
+          msg.setType("Error");
+          msg.setTitle(Utility.messageBD(conProvider, "Error", language));
+          msg.setMessage(Utility.parseTranslation(conProvider, vars, language,
+              "@PeriodNotAvailable@"));
+          bundle.setResult(msg);
+          OBDal.getInstance().rollbackAndClose();
+          return;
+        }
         Set<String> documentOrganizations = OBContext.getOBContext()
             .getOrganizationStructureProvider(payment.getClient().getId())
             .getNaturalTree(payment.getOrganization().getId());
@@ -646,7 +658,7 @@
                   final String creditMsg = Utility.messageBD(new DalConnectionProvider(),
                       "APRM_InvoiceDescUsedCredit", vars.getLanguage());
                   if (creditMsg != null) {
-                    final StringBuffer newDesc = new StringBuffer();
+                    StringBuffer newDesc = new StringBuffer();
                     for (final String line : invDesc.split("\n")) {
                       if (!line.startsWith(creditMsg.substring(0, creditMsg.lastIndexOf("%s")))) {
                         newDesc.append(line);
@@ -654,6 +666,10 @@
                           newDesc.append("\n");
                       }
                     }
+                    if (newDesc.length() > 255) {
+                      newDesc = newDesc.delete(251, newDesc.length());
+                      newDesc = newDesc.append("...\n");
+                    }
                     invoice.setDescription(newDesc.toString());
                   }
                 }
@@ -843,10 +859,12 @@
                       .getInvoicePaymentSchedule()
                       .getFINPaymentScheduleDetailInvoicePaymentScheduleList()) {
                     if (invScheDetail.getPaymentDetails() == null) {
-                      outStandingAmt = outStandingAmt.add(invScheDetail.getAmount());
+                      outStandingAmt = outStandingAmt.add(invScheDetail.getAmount()).add(
+                          invScheDetail.getWriteoffAmount());
                       removedPDS.add(invScheDetail);
                     } else if (invScheDetail.equals(paymentScheduleDetail)) {
-                      outStandingAmt = outStandingAmt.add(invScheDetail.getAmount());
+                      outStandingAmt = outStandingAmt.add(invScheDetail.getAmount()).add(
+                          invScheDetail.getWriteoffAmount());
                       paymentScheduleDetail.setCanceled(true);
                     }
                     invoiceDocNos.add(paymentScheduleDetail.getInvoicePaymentSchedule()
@@ -866,10 +884,12 @@
                       .getOrderPaymentSchedule()
                       .getFINPaymentScheduleDetailOrderPaymentScheduleList()) {
                     if (ordScheDetail.getPaymentDetails() == null) {
-                      outStandingAmt = outStandingAmt.add(ordScheDetail.getAmount());
+                      outStandingAmt = outStandingAmt.add(ordScheDetail.getAmount()).add(
+                          ordScheDetail.getWriteoffAmount());
                       removedPDS.add(ordScheDetail);
                     } else if (ordScheDetail.equals(paymentScheduleDetail)) {
-                      outStandingAmt = outStandingAmt.add(ordScheDetail.getAmount());
+                      outStandingAmt = outStandingAmt.add(ordScheDetail.getAmount()).add(
+                          ordScheDetail.getWriteoffAmount());
                       paymentScheduleDetail.setCanceled(true);
                     }
                   }
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_TransactionProcess.java	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_TransactionProcess.java	Wed Oct 17 18:29:21 2012 +0200
@@ -30,6 +30,8 @@
 import org.openbravo.dal.service.OBCriteria;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.database.ConnectionProvider;
+import org.openbravo.erpCommon.ad_forms.AcctServer;
+import org.openbravo.erpCommon.utility.OBDateUtils;
 import org.openbravo.erpCommon.utility.OBError;
 import org.openbravo.erpCommon.utility.Utility;
 import org.openbravo.model.common.currency.ConversionRateDoc;
@@ -66,6 +68,16 @@
           // ***********************
           // Process Transaction
           // ***********************
+          if (!FIN_Utility.isPeriodOpen(transaction.getClient().getId(),
+              AcctServer.DOCTYPE_FinAccTransaction, transaction.getOrganization().getId(),
+              OBDateUtils.formatDate(transaction.getDateAcct()))) {
+            msg.setType("Error");
+            msg.setTitle(Utility.messageBD(conProvider, "Error", language));
+            msg.setMessage(Utility.parseTranslation(conProvider, vars, language,
+                "@PeriodNotAvailable@"));
+            bundle.setResult(msg);
+            return;
+          }
           final FIN_FinancialAccount financialAccount = transaction.getAccount();
           financialAccount.setCurrentBalance(financialAccount.getCurrentBalance().add(
               transaction.getDepositAmount().subtract(transaction.getPaymentAmount())));
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_Utility.java	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_Utility.java	Wed Oct 17 18:29:21 2012 +0200
@@ -38,6 +38,8 @@
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.lang.time.DateUtils;
 import org.apache.log4j.Logger;
+import org.hibernate.Query;
+import org.hibernate.Session;
 import org.hibernate.criterion.Restrictions;
 import org.openbravo.advpaymentmngt.dao.AdvPaymentMngtDao;
 import org.openbravo.base.secureApp.VariablesSecureApp;
@@ -503,12 +505,35 @@
    */
   public static <T extends BaseOBObject> String getOptionsList(List<T> obObjectList,
       String selectedValue, boolean isMandatory) {
+    return getOptionsList(obObjectList, selectedValue, isMandatory, false);
+  }
+
+  /**
+   * Returns a String containing the html code with the options based on the given List of
+   * BaseOBObjects
+   * 
+   * @param <T>
+   *          Class that extends BaseOBObject.
+   * @param obObjectList
+   *          List containing the values to be included in the options.
+   * @param selectedValue
+   *          value to set as selected by default.
+   * @param isMandatory
+   *          boolean to add a blank option in the options list.
+   * @param isRefList
+   *          boolean to let know if the options belong to a refList. In that case, the value must
+   *          be the search key of the list item instead of it's id.
+   * @return a String containing the html code with the options. *
+   */
+  public static <T extends BaseOBObject> String getOptionsList(List<T> obObjectList,
+      String selectedValue, boolean isMandatory, boolean isRefList) {
     StringBuilder strOptions = new StringBuilder();
     if (!isMandatory)
       strOptions.append("<option value=\"\"></option>");
 
     for (T obObject : obObjectList) {
-      strOptions.append("<option value=\"").append(obObject.getId()).append("\"");
+      strOptions.append("<option value=\"")
+          .append((isRefList) ? obObject.getValue("searchKey") : obObject.getId()).append("\"");
       if (obObject.getId().equals(selectedValue))
         strOptions.append(" selected=\"selected\"");
       strOptions.append(">");
@@ -1029,4 +1054,28 @@
     }
   }
 
+  public static boolean isPeriodOpen(String client, String documentType, String org, String dateAcct) {
+    final Session session = OBDal.getInstance().getSession();
+
+    final StringBuilder hql = new StringBuilder();
+    hql.append("select max(p.id) as period ");
+    hql.append(" from FinancialMgmtPeriodControl pc ");
+    hql.append("   left join pc.period p ");
+    hql.append(" where p.client = '").append(client).append("' ");
+    hql.append(" and pc.documentCategory = '").append(documentType).append("' ");
+    hql.append(" and pc.periodStatus = 'O' ");
+    hql.append(" and pc.organization = ad_org_getcalendarowner('").append(org).append("') ");
+    hql.append(" and to_date('").append(dateAcct).append("') >= p.startingDate ");
+    hql.append(" and to_date('").append(dateAcct).append("') < p.endingDate + 1 ");
+
+    final Query qry = session.createQuery(hql.toString());
+
+    String period = (String) (qry.list().get(0));
+
+    if (period == null) {
+      return false;
+    } else {
+      return true;
+    }
+  }
 }
--- a/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/FIN_Utilities.js	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/FIN_Utilities.js	Wed Oct 17 18:29:21 2012 +0200
@@ -364,13 +364,12 @@
   document.getElementById('paramDifference').innerHTML = frm.inpDifference.value;
   displayLogicElement('sectionDifference', (compare(expected, '!=', total) || compareWithSign(amount, '>', total)));
   displayLogicElement('sectionDifferenceBox', (compare(expected, '!=', total) || (isCreditAllowed && compareWithSign(amount, '>', total))));
-  if ((frm.strWriteOffLimit.value === 'Y') && (compare(expected, '!=', total)) && (frm.strtypewriteoff.value==='A') && (compareWithSign((applyFormat((subtract(expected,total))*exchangeRate.value)), '>',frm.strAmountwriteoff.value))) {  
-	  displayLogicElement('writeofflimit', true);
-	  displayLogicElement('writeoff', false);
-   }
-  else {
-	  displayLogicElement('writeofflimit', false);
-	  displayLogicElement('writeoff', compare(expected, '!=', total));
+  if ((frm.strWriteOffLimit.value === 'Y') && (compare(expected, '!=', total)) && (frm.strtypewriteoff.value === 'A') && (compareWithSign((applyFormat((subtract(expected, total)) * exchangeRate.value)), '>', frm.strAmountwriteoff.value))) {
+    displayLogicElement('writeofflimit', true);
+    displayLogicElement('writeoff', false);
+  } else {
+    displayLogicElement('writeofflimit', false);
+    displayLogicElement('writeoff', compare(expected, '!=', total));
   }
   displayLogicElement('underpayment', compareWithSign(expected, '>', total));
   displayLogicElement('credit', isCreditAllowed && compareWithSign(amount, '>', total));
--- a/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE.xml	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE.xml	Wed Oct 17 18:29:21 2012 +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.17839]]></VERSION>
+<!--C70732EA90A14EC0916078B85CC33D2D-->  <VERSION><![CDATA[1.1.18223]]></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	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Oct 17 18:29:21 2012 +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.17839]]></STARTVERSION>
+<!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <STARTVERSION><![CDATA[3.0.18223]]></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_MESSAGE.xml	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MESSAGE.xml	Wed Oct 17 18:29:21 2012 +0200
@@ -1254,7 +1254,7 @@
 <!--FF8080812F10C577012F1138306C0027-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--FF8080812F10C577012F1138306C0027-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF8080812F10C577012F1138306C0027-->  <VALUE><![CDATA[OBUIAPP_ExecuteInCallout]]></VALUE>
-<!--FF8080812F10C577012F1138306C0027-->  <MSGTEXT><![CDATA[This window is using some functionality which needs to be updated to work in Openbravo 3. A preference has been added so that this window is opened in classic mode until this problem is fixed. Contact with your System Administrator, or with the developer of the module to fix this. You now need to log out of the application, and login again, so that this window is shown in classic mode.]]></MSGTEXT>
+<!--FF8080812F10C577012F1138306C0027-->  <MSGTEXT><![CDATA[This window is using some functionality which needs to be updated to work in Openbravo 3. A preference has been added so that this window is opened in classic mode until this problem is fixed. Contact with your System Administrator, or with the developer of the module to fix this. You now need to ask your System Administrator to rebuild the system, after that this window is shown in classic mode.]]></MSGTEXT>
 <!--FF8080812F10C577012F1138306C0027-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
 <!--FF8080812F10C577012F1138306C0027-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
 <!--FF8080812F10C577012F1138306C0027--></AD_MESSAGE>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE.xml	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE.xml	Wed Oct 17 18:29:21 2012 +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.17839]]></VERSION>
+<!--9BA0836A3CD74EE4AB48753A47211BCC-->  <VERSION><![CDATA[2.1.18223]]></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	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Oct 17 18:29:21 2012 +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.17839]]></STARTVERSION>
+<!--15D7CE8D95D043189162DBABA54A1F61-->  <STARTVERSION><![CDATA[2.1.18223]]></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.17839]]></STARTVERSION>
+<!--60A170212F36499D83B8AD38D01F46B3-->  <STARTVERSION><![CDATA[2.1.18223]]></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.17839]]></STARTVERSION>
+<!--824D60CB352E4099B1D8C903CA139DAE-->  <STARTVERSION><![CDATA[3.0.18223]]></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.17839]]></STARTVERSION>
+<!--E8FD820AFE3D4FE08C02FC47769026AD-->  <STARTVERSION><![CDATA[8.1.18223]]></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-db/database/sourcedata/AD_PREFERENCE.xml	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_PREFERENCE.xml	Wed Oct 17 18:29:21 2012 +0200
@@ -19,9 +19,13 @@
 <!--5EE6D055A7FE4C4DA7EB557F6C61D0EA-->  <VALUE><![CDATA[[
   {"id": "TabSet_CloseSelectedTab", "keyComb": {"alt": true, "shift": true, "key": "W"}},
   {"id": "TabSet_SelectParentTab", "keyComb": {"alt": true, "shift": true, "key": "Arrow_Up"}},
+  {"id": "TabSet_SelectParentTab_Alternative", "keyComb": {"ctrl": true, "space": true, "key": "Arrow_Up"}},
   {"id": "TabSet_SelectChildTab", "keyComb": {"alt": true, "shift": true, "key": "Arrow_Down"}},
+  {"id": "TabSet_SelectChildTab_Alternative", "keyComb": {"ctrl": true, "space": true, "key": "Arrow_Down"}},
   {"id": "TabSet_SelectPreviousTab", "keyComb": {"alt": true, "shift": true, "key": "Arrow_Left"}},
+  {"id": "TabSet_SelectPreviousTab_Alternative", "keyComb": {"ctrl": true, "space": true, "key": "Arrow_Left"}},
   {"id": "TabSet_SelectNextTab", "keyComb": {"alt": true, "shift": true, "key": "Arrow_Right"}},
+  {"id": "TabSet_SelectNextTab_Alternative", "keyComb": {"ctrl": true, "space": true, "key": "Arrow_Right"}},
   {"id": "TabSet_SelectWorkspaceTab", "keyComb": {"alt": true, "shift": true, "key": "1"}},
   {"id": "ToolBar_NewDoc", "keyComb": {"ctrl": true, "key": "D"}},
   {"id": "ToolBar_NewRow", "keyComb": {"ctrl": true, "key": "I"}},
@@ -35,7 +39,7 @@
   {"id": "ToolBar_Clone", "keyComb": {"ctrl": true, "shift": true, "key": "K"}},
   {"id": "ToolBar_Print", "keyComb": {"ctrl": true, "shift": true, "key": "P"}},
   {"id": "ToolBar_Email", "keyComb": {"ctrl": true, "shift": true, "key": "M"}},
-  {"id": "ToolBar_Audit", "keyComb": {"ctrl": true, "shift": true, "key": "L"}},
+  {"id": "ToolBar_Audit", "keyComb": {"ctrl": true, "shift": true, "key": "Y"}},
   {"id": "ToolBar_Link", "keyComb": {"ctrl": true, "shift": true, "key": "U"}},
   {"id": "StatusBar_Previous", "keyComb": {"alt": true, "shift": true, "key": "Page_Up"}},
   {"id": "StatusBar_Next", "keyComb": {"alt": true, "shift": true, "key": "Page_Down"}},
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/AlertActionHandler.java	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/AlertActionHandler.java	Wed Oct 17 18:29:21 2012 +0200
@@ -83,54 +83,56 @@
       }
 
       final VariablesSecureApp vars = new VariablesSecureApp(request);
+      // Do not execute the alerts if the system if being rebuilt
+      Long total = 0L;
+      if (!"Y".equals(vars.getSessionValue("ApplyModules|BuildRunning"))) {
+        // select the alert rules
+        final String hql = "select distinct(e.alertRule) from  " + AlertRecipient.ENTITY_NAME
+            + " e where e.alertRule.active = true and (e.userContact.id=? "
+            + " or (e.userContact.id = null and e.role.id = ?))";
+        final Query qry = OBDal.getInstance().getSession().createQuery(hql);
+        qry.setParameter(0, OBContext.getOBContext().getUser().getId());
+        qry.setParameter(1, OBContext.getOBContext().getRole().getId());
 
-      // select the alert rules
-      final String hql = "select distinct(e.alertRule) from  " + AlertRecipient.ENTITY_NAME
-          + " e where e.alertRule.active = true and (e.userContact.id=? "
-          + " or (e.userContact.id = null and e.role.id = ?))";
-      final Query qry = OBDal.getInstance().getSession().createQuery(hql);
-      qry.setParameter(0, OBContext.getOBContext().getUser().getId());
-      qry.setParameter(1, OBContext.getOBContext().getRole().getId());
+        for (Object o : qry.list()) {
+          final AlertRule alertRule = (AlertRule) o;
+          final String whereClause = new UsedByLink().getWhereClause(vars, "",
+              alertRule.getFilterClause() == null ? "" : alertRule.getFilterClause());
+          final String sql = "select count(*) from AD_ALERT where COALESCE(to_char(STATUS), 'NEW')='NEW'"
+              + " AND AD_CLIENT_ID "
+              + OBDal.getInstance().getReadableClientsInClause()
+              + " AND AD_ORG_ID "
+              + OBDal.getInstance().getReadableOrganizationsInClause()
+              + " AND AD_ALERTRULE_ID = ? " + (whereClause == null ? "" : whereClause);
 
-      Long total = 0L;
-      for (Object o : qry.list()) {
-        final AlertRule alertRule = (AlertRule) o;
-        final String whereClause = new UsedByLink().getWhereClause(vars, "",
-            alertRule.getFilterClause() == null ? "" : alertRule.getFilterClause());
-        final String sql = "select count(*) from AD_ALERT where COALESCE(to_char(STATUS), 'NEW')='NEW'"
-            + " AND AD_CLIENT_ID "
-            + OBDal.getInstance().getReadableClientsInClause()
-            + " AND AD_ORG_ID "
-            + OBDal.getInstance().getReadableOrganizationsInClause()
-            + " AND AD_ALERTRULE_ID = ? " + (whereClause == null ? "" : whereClause);
-
-        PreparedStatement sqlQuery = null;
-        ResultSet rs = null;
-        try {
-          sqlQuery = new DalConnectionProvider(false).getPreparedStatement(sql);
-          sqlQuery.setString(1, alertRule.getId());
-          sqlQuery.execute();
-          rs = sqlQuery.getResultSet();
-          if (rs.next()) {
-            long rows = rs.getLong(1);
-            total += rs.getLong(1);
-            log4j.debug("Alert " + alertRule.getName() + " (" + alertRule.getId() + ") - SQL:'"
-                + sql + "' - Rows: " + rows);
-          }
-        } catch (Exception e) {
-          log4j.error("An error has ocurred when trying to process the alerts: " + e.getMessage(),
-              e);
-        } finally {
+          PreparedStatement sqlQuery = null;
+          ResultSet rs = null;
           try {
-            if (sqlQuery != null) {
-              sqlQuery.close();
-            }
-            if (rs != null) {
-              rs.close();
+            sqlQuery = new DalConnectionProvider(false).getPreparedStatement(sql);
+            sqlQuery.setString(1, alertRule.getId());
+            sqlQuery.execute();
+            rs = sqlQuery.getResultSet();
+            if (rs.next()) {
+              long rows = rs.getLong(1);
+              total += rs.getLong(1);
+              log4j.debug("Alert " + alertRule.getName() + " (" + alertRule.getId() + ") - SQL:'"
+                  + sql + "' - Rows: " + rows);
             }
           } catch (Exception e) {
             log4j.error(
-                "An error has ocurred when trying to close the statement: " + e.getMessage(), e);
+                "An error has ocurred when trying to process the alerts: " + e.getMessage(), e);
+          } finally {
+            try {
+              if (sqlQuery != null) {
+                sqlQuery.close();
+              }
+              if (rs != null) {
+                rs.close();
+              }
+            } catch (Exception e) {
+              log4j.error(
+                  "An error has ocurred when trying to close the statement: " + e.getMessage(), e);
+            }
           }
         }
       }
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/MenuManager.java	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/MenuManager.java	Wed Oct 17 18:29:21 2012 +0200
@@ -343,7 +343,7 @@
   private void removeInaccessibleNodes() {
     final List<MenuOption> toRemove = new ArrayList<MenuOption>();
     for (MenuOption menuOption : menuOptions) {
-      if (!isAccessible(menuOption)) {
+      if (!menuOption.isAccessible()) {
         toRemove.add(menuOption);
       }
     }
@@ -355,29 +355,6 @@
     menuOptions.removeAll(toRemove);
   }
 
-  private boolean isAccessible(MenuOption menuOption) {
-    // In order to be accessible, all its menu entry parents must be active;
-    MenuOption parentMenuOption = menuOption;
-    TreeNode treeNode = menuOption.getTreeNode();
-    Menu menuEntry = OBDal.getInstance().get(Menu.class, treeNode.getNode());
-    while (menuEntry != null && menuEntry.isActive()) {
-      parentMenuOption = parentMenuOption.getParentMenuOption();
-      if (parentMenuOption == null) {
-        treeNode = null;
-        menuEntry = null;
-      } else {
-        treeNode = parentMenuOption.getTreeNode();
-        menuEntry = OBDal.getInstance().get(Menu.class, treeNode.getNode());
-      }
-    }
-    if (menuEntry == null) {
-      // All its ancestors are active
-      return true;
-    } else {
-      return menuEntry.isActive();
-    }
-  }
-
   private void createInitialMenuList() {
     Role role = OBDal.getInstance().get(Role.class, roleId);
     final Tree tree;
@@ -464,6 +441,14 @@
       return Boolean.toString(isReadOnly());
     }
 
+    public boolean isEditOrDeleteOnly() {
+      return getTab() != null && getTab().getUIPattern().equals("ED");
+    }
+
+    public String getEditOrDeleteOnlyStringValue() {
+      return Boolean.toString(isEditOrDeleteOnly());
+    }
+
     public boolean isReport() {
       return isReport;
     }
@@ -498,6 +483,16 @@
       return visible;
     }
 
+    public boolean isAccessible() {
+      // In order to be accessible, all its menu entry parents must be active;
+      Menu menuEntry = OBDal.getInstance().get(Menu.class, treeNode.getNode());
+      if (parentMenuOption == null) {
+        return menuEntry.isActive();
+      } else {
+        return menuEntry.isActive() && parentMenuOption.isAccessible();
+      }
+    }
+
     public void setVisible(Boolean visible) {
       this.visible = visible;
     }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/BusinessPartnerBankAccountHandler.java	Wed Oct 17 18:29:21 2012 +0200
@@ -0,0 +1,87 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2012 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ *************************************************************************
+ */
+
+package org.openbravo.client.application.event;
+
+import javax.enterprise.event.Observes;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.log4j.Logger;
+import org.openbravo.base.model.Entity;
+import org.openbravo.base.model.ModelProvider;
+import org.openbravo.base.model.Property;
+import org.openbravo.client.kernel.event.EntityNewEvent;
+import org.openbravo.client.kernel.event.EntityPersistenceEventObserver;
+import org.openbravo.client.kernel.event.EntityUpdateEvent;
+import org.openbravo.model.common.businesspartner.BankAccount;
+
+/**
+ * Adds retrocompatibity to code that uses the Show IBAN/Generic columns instead of the new Bank
+ * Account Format list
+ * 
+ * @author openbravo
+ * 
+ */
+public class BusinessPartnerBankAccountHandler extends EntityPersistenceEventObserver {
+
+  private static Entity[] entities = { ModelProvider.getInstance().getEntity(
+      BankAccount.ENTITY_NAME) };
+  protected Logger logger = Logger.getLogger(this.getClass());
+
+  @Override
+  protected Entity[] getObservedEntities() {
+    return entities;
+  }
+
+  public void onUpdate(@Observes EntityUpdateEvent event) {
+    if (!isValidEvent(event)) {
+      return;
+    }
+
+    final BankAccount bankAccount = (BankAccount) event.getTargetInstance();
+    if (bankAccount != null && StringUtils.isBlank(bankAccount.getBankFormat())) {
+      final Boolean showIBAN = bankAccount.isShowIBAN();
+      final Entity bankAccountEntity = ModelProvider.getInstance().getEntity(
+          BankAccount.ENTITY_NAME);
+      final Property bankFormatProperty = bankAccountEntity
+          .getProperty(BankAccount.PROPERTY_BANKFORMAT);
+      event.setCurrentState(bankFormatProperty, showIBAN ? "IBAN" : "GENERIC");
+      logger
+          .info("Automatically populated the Bank Account Format based on the Show Generic | Show IBAN info");
+    }
+  }
+
+  public void onSave(@Observes EntityNewEvent event) {
+    if (!isValidEvent(event)) {
+      return;
+    }
+
+    final BankAccount bankAccount = (BankAccount) event.getTargetInstance();
+    if (bankAccount != null && StringUtils.isBlank(bankAccount.getBankFormat())) {
+      final Boolean showIBAN = bankAccount.isShowIBAN();
+      final Entity bankAccountEntity = ModelProvider.getInstance().getEntity(
+          BankAccount.ENTITY_NAME);
+      final Property bankFormatProperty = bankAccountEntity
+          .getProperty(BankAccount.PROPERTY_BANKFORMAT);
+      event.setCurrentState(bankFormatProperty, showIBAN ? "IBAN" : "GENERIC");
+      logger
+          .info("Automatically populated the Bank Account Format based on the Show Generic | Show IBAN info");
+    }
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/ElementValueEventHandler.java	Wed Oct 17 18:29:21 2012 +0200
@@ -0,0 +1,206 @@
+/*
+ *************************************************************************
+ * 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) 2012 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+
+package org.openbravo.client.application.event;
+
+import java.math.BigInteger;
+import java.util.HashMap;
+import java.util.List;
+
+import javax.enterprise.event.Observes;
+
+import org.apache.commons.lang.ArrayUtils;
+import org.apache.log4j.Logger;
+import org.hibernate.criterion.Order;
+import org.hibernate.criterion.Restrictions;
+import org.openbravo.base.model.Entity;
+import org.openbravo.base.model.ModelProvider;
+import org.openbravo.base.model.Property;
+import org.openbravo.base.provider.OBProvider;
+import org.openbravo.client.kernel.event.EntityNewEvent;
+import org.openbravo.client.kernel.event.EntityPersistenceEventObserver;
+import org.openbravo.client.kernel.event.EntityUpdateEvent;
+import org.openbravo.dal.core.OBContext;
+import org.openbravo.dal.service.OBCriteria;
+import org.openbravo.dal.service.OBDal;
+import org.openbravo.model.ad.utility.Tree;
+import org.openbravo.model.ad.utility.TreeNode;
+import org.openbravo.model.financialmgmt.accounting.coa.ElementValue;
+
+public class ElementValueEventHandler extends EntityPersistenceEventObserver {
+
+  private static Entity[] entities = { ModelProvider.getInstance().getEntity(
+      ElementValue.ENTITY_NAME) };
+  protected Logger logger = Logger.getLogger(this.getClass());
+
+  @Override
+  protected Entity[] getObservedEntities() {
+    return entities;
+  }
+
+  public void onSave(@Observes
+  EntityNewEvent event) {
+    if (!isValidEvent(event)) {
+      return;
+    }
+    final ElementValue account = (ElementValue) event.getTargetInstance();
+    // If value is not a number account will be folded in the root directory of the tree. So do
+    // nothing, DB trigger will manage
+    try {
+      new BigInteger(account.getSearchKey());
+    } catch (NumberFormatException e) {
+      return;
+    }
+    // Skip for initial client setup and initial org setup;
+    // - Initial organization setup: Organization is not yet Ready
+    // - Initial Client Setup: Readable client list just contains system client ('0')
+    // Skip is required as accounts come with a tree definition
+    OBContext.setAdminMode();
+    try {
+      if (!account.getOrganization().isReady()
+          || !ArrayUtils.contains(OBContext.getOBContext().getReadableClients(), account
+              .getClient().getId())) {
+        return;
+      }
+    } finally {
+      OBContext.restorePreviousMode();
+    }
+    doIt(account);
+  }
+
+  public void onUpdate(@Observes
+  EntityUpdateEvent event) {
+    if (!isValidEvent(event)) {
+      return;
+    }
+    if (event.getPreviousState(getValueProperty())
+        .equals(event.getCurrentState(getValueProperty()))) {
+      return;
+    }
+    final ElementValue account = (ElementValue) event.getTargetInstance();
+    doIt(account);
+  }
+
+  private void doIt(ElementValue account) {
+    boolean isNumber = true;
+    try {
+      new BigInteger(account.getSearchKey());
+    } catch (NumberFormatException e) {
+      isNumber = false;
+    }
+    String rootNode = "0";
+    OBCriteria<TreeNode> obc = OBDal.getInstance().createCriteria(TreeNode.class);
+    obc.add(Restrictions.eq(TreeNode.PROPERTY_NODE, account.getId()));
+    obc.setMaxResults(1);
+    List<TreeNode> nodes = obc.list();
+    HashMap<String, String> result = getParentAndSeqNo(account);
+    String parent_ID = result.get("ParentID");
+    String seqNo = result.get("SeqNo");
+    if (nodes.size() > 0) {
+      TreeNode node = nodes.get(0);
+      node.setReportSet(!isNumber ? rootNode : parent_ID);
+      node.setSequenceNumber(new Long(seqNo));
+      OBDal.getInstance().save(node);
+    } else {
+      TreeNode treeElement = OBProvider.getInstance().get(TreeNode.class);
+      treeElement.setNode(account.getId());
+      treeElement.setTree(account.getAccountingElement().getTree());
+      treeElement.setReportSet(!isNumber ? rootNode : parent_ID);
+      treeElement.setSequenceNumber(new Long(seqNo));
+      OBDal.getInstance().save(treeElement);
+    }
+
+  }
+
+  HashMap<String, String> getParentAndSeqNo(ElementValue account) {
+    HashMap<String, String> result = new HashMap<String, String>();
+    // Default values for result
+    result.put("ParentID", "0");
+    result
+        .put("SeqNo", String.valueOf(getNextSeqNo(account.getAccountingElement().getTree(), "0")));
+    List<ElementValue> accounts = getAccountList(account);
+    ElementValue previousElement = null;
+    for (ElementValue elementValue : accounts) {
+      previousElement = elementValue;
+    }
+    if (previousElement != null && previousElement.isSummaryLevel() && !account.isSummaryLevel()) {
+      result.put("ParentID", previousElement.getId());
+      result.put("SeqNo", "0");
+    } else if (previousElement == null) {
+      return result;
+    } else {
+      OBCriteria<TreeNode> obc = OBDal.getInstance().createCriteria(TreeNode.class);
+      obc.add(Restrictions.eq(TreeNode.PROPERTY_NODE, previousElement.getId()));
+      obc.setMaxResults(1);
+      List<TreeNode> nodes = obc.list();
+      result.put("ParentID", nodes.get(0).getReportSet());
+      result.put("SeqNo", String.valueOf(nodes.get(0).getSequenceNumber() + 10));
+    }
+    updateSeqNo(result.get("ParentID"), account.getAccountingElement().getTree(),
+        result.get("SeqNo"));
+    return result;
+
+  }
+
+  List<ElementValue> getAccountList(ElementValue account) {
+    OBCriteria<ElementValue> obc = OBDal.getInstance().createCriteria(ElementValue.class);
+    obc.add(Restrictions.eq(ElementValue.PROPERTY_ACCOUNTINGELEMENT, account.getAccountingElement()));
+    obc.add(Restrictions.eq(ElementValue.PROPERTY_ACTIVE, true));
+    obc.add(Restrictions.le(ElementValue.PROPERTY_SEARCHKEY, account.getSearchKey()));
+    obc.add(Restrictions.ne(ElementValue.PROPERTY_ID, account.getId()));
+    obc.addOrder(Order.desc(ElementValue.PROPERTY_SEARCHKEY));
+    obc.setMaxResults(1);
+    obc.setFilterOnReadableClients(false);
+    obc.setFilterOnReadableOrganization(false);
+    return obc.list();
+  }
+
+  void updateSeqNo(String parentID, Tree tree, String seqNo) {
+    OBCriteria<TreeNode> obc = OBDal.getInstance().createCriteria(TreeNode.class);
+    obc.add(Restrictions.eq(TreeNode.PROPERTY_TREE, tree));
+    obc.add(Restrictions.eq(TreeNode.PROPERTY_REPORTSET, parentID));
+    obc.add(Restrictions.ge(TreeNode.PROPERTY_SEQUENCENUMBER, new Long(seqNo)));
+    obc.setFilterOnReadableClients(false);
+    obc.setFilterOnReadableOrganization(false);
+    for (TreeNode node : obc.list()) {
+      node.setSequenceNumber(node.getSequenceNumber() + 10l);
+      OBDal.getInstance().save(node);
+    }
+    return;
+  }
+
+  long getNextSeqNo(Tree tree, String parent_ID) {
+    OBCriteria<TreeNode> obc = OBDal.getInstance().createCriteria(TreeNode.class);
+    obc.add(Restrictions.eq(TreeNode.PROPERTY_REPORTSET, parent_ID));
+    obc.add(Restrictions.eq(TreeNode.PROPERTY_TREE, tree));
+    obc.addOrder(Order.desc(TreeNode.PROPERTY_SEQUENCENUMBER));
+    obc.setFilterOnReadableClients(false);
+    obc.setFilterOnReadableOrganization(false);
+    List<TreeNode> nodes = obc.list();
+    if (nodes.size() > 0) {
+      return obc.list().get(0).getSequenceNumber() + 10l;
+    } else {
+      return 10l;
+    }
+  }
+
+  private Property getValueProperty() {
+    return entities[0].getProperty(ElementValue.PROPERTY_SEARCHKEY);
+  }
+}
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/navigationbarcomponents/QuickCreateDataSource.java	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/navigationbarcomponents/QuickCreateDataSource.java	Wed Oct 17 18:29:21 2012 +0200
@@ -91,7 +91,8 @@
         final Map<String, Object> data = new HashMap<String, Object>();
 
         // read only tab
-        if (menuOption.isSingleRecord() || menuOption.isReadOnly()) {
+        if (menuOption.isSingleRecord() || menuOption.isReadOnly()
+            || menuOption.isEditOrDeleteOnly()) {
           continue;
         }
 
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/navigationbarcomponents/QuickLaunchDataSource.java	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/navigationbarcomponents/QuickLaunchDataSource.java	Wed Oct 17 18:29:21 2012 +0200
@@ -47,6 +47,7 @@
   public static final String OPTION_TYPE_TAB = "tab";
   public static final String OPTION_SINGLE_RECORD = "singleRecord";
   public static final String OPTION_READ_ONLY = "readOnly";
+  public static final String OPTION_EDIT_OR_DELETE_ONLY = "editOrDeleteOnly";
   public static final String PROCESS_ID = "processId";
   public static final String WINDOW_ID = "windowId";
   public static final String FORM_ID = "formId";
@@ -105,6 +106,7 @@
           data.put(WINDOW_ID, menuOption.getMenu().getWindow().getId());
           data.put(OPTION_SINGLE_RECORD, menuOption.isSingleRecord());
           data.put(OPTION_READ_ONLY, menuOption.isReadOnly());
+          data.put(OPTION_EDIT_OR_DELETE_ONLY, menuOption.isEditOrDeleteOnly());
         } else if (menuOption.isProcess()) {
           data.put(OPTION_TYPE, "process");
           data.put(PROCESS_ID, menuOption.getMenu().getProcess().getId());
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/navigationbarcomponents/templates/application-menu.js.ftl	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/navigationbarcomponents/templates/application-menu.js.ftl	Wed Oct 17 18:29:21 2012 +0200
@@ -63,6 +63,7 @@
     </#if>
     , singleRecord: ${menuOption.singleRecordStringValue}
     , readOnly: ${menuOption.readOnlyStringValue}
+    , editOrDeleteOnly: ${menuOption.editOrDeleteOnlyStringValue}
     
     <#list menuOption.parameters as parameter>
         , '${parameter.name?js_string}': '${parameter.parameterValue?js_string}'        
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java	Wed Oct 17 18:29:21 2012 +0200
@@ -1259,9 +1259,10 @@
                     messages.add(message);
                     createNewPreferenceForWindow(tab.getWindow());
                     log.warn("An EXECUTE element has been found in the response of the callout "
-                        + calloutClassName + ". A preference has been created for the window "
+                        + calloutClassName
+                        + ". A preference has been created for the window "
                         + tab.getWindow().getName()
-                        + "so that it's shown in classic mode until this problem is fixed.");
+                        + "so that it's shown in classic mode until this problem is fixed. This requires to build the system to generate this classic window.");
                   }
                 }
               } else {
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewFieldHandler.java	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewFieldHandler.java	Wed Oct 17 18:29:21 2012 +0200
@@ -26,6 +26,8 @@
 import java.util.Map;
 
 import org.apache.log4j.Logger;
+import org.openbravo.base.model.Entity;
+import org.openbravo.base.model.ModelProvider;
 import org.openbravo.base.model.Property;
 import org.openbravo.base.model.domaintype.ForeignKeyDomainType;
 import org.openbravo.client.application.ApplicationUtils;
@@ -368,6 +370,9 @@
   }
 
   private void processStatusBarFields(List<OBViewFieldDefinition> viewFields, List<Field> adFields) {
+    final Entity entity = ModelProvider.getInstance().getEntityByTableId(
+        getTab().getTable().getId());
+
     if (statusBarFields != null) {
       return;
     }
@@ -382,14 +387,16 @@
         continue;
       }
 
-      final Property property = KernelUtils.getInstance().getPropertyFromColumn(field.getColumn(),
-          false);
-
-      statusBarFields.add(property.getName());
+      final Property property;
+      if (field.getProperty() != null) {
+        property = DalUtil.getPropertyFromPath(entity, field.getProperty());
+        statusBarFields.add(field.getProperty().replace(DalUtil.DOT, DalUtil.FIELDSEPARATOR));
+      } else {
+        property = KernelUtils.getInstance().getPropertyFromColumn(field.getColumn(), false);
+        statusBarFields.add(property.getName());
+      }
 
       final OBViewField viewField = new OBViewField();
-      // Prevents the field from being displayed twice: on the status bar and in the form footer
-      field.setDisplayed(false);
       viewField.setField(field);
       viewField.setProperty(property);
       viewField.setRedrawOnChange(false);
@@ -1302,7 +1309,11 @@
     }
 
     public boolean isDisplayed() {
-      return field.isDisplayed() != null && field.isDisplayed();
+      if (field.isShownInStatusBar()) {
+        return false;
+      } else {
+        return field.isDisplayed() != null && field.isDisplayed();
+      }
     }
 
     public boolean isShowInitiallyInGrid() {
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/alert-management/ob-alert-management-view.js	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/alert-management/ob-alert-management-view.js	Wed Oct 17 18:29:21 2012 +0200
@@ -87,6 +87,16 @@
     this.getAlertRules();
   },
 
+  tabSelected: function (tabNum, tabPane, ID, tab) {
+    if (OB.AlertManagement.grids.New) {
+      // TODO: Add a more sophisticated focus logic to ensure each time the Alert Management is selected,
+      // the previous focused item is selected instead of the first grid filter editor
+      setTimeout(function () {
+        OB.AlertManagement.grids.New.focusInFirstFilterEditor();
+      }, 10);
+    }
+  },
+
   getAlertRules: function () {
     var post = {
       'eventType': 'getAlertRules'
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/classic/ob-classic-compatibility.js	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/classic/ob-classic-compatibility.js	Wed Oct 17 18:29:21 2012 +0200
@@ -248,7 +248,7 @@
 
           if (LKS.list[i].execLevel) {
             for (j = 0; j < LKS.list[i].execLevel.length; j++) {
-              if (LKS.list[i].execLevel[j] === 'Canvas') {
+              if (LKS.list[i].execLevel[j] === 'Canvas' && LKS.list[i].id !== 'Canvas_Avoid_Backspace') {
                 isCanvasShortcut = true;
                 break;
               }
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-date.js	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-date.js	Wed Oct 17 18:29:21 2012 +0200
@@ -228,6 +228,9 @@
 isc.OBDateItem.addProperties(OB.DateItemProperties, {
   validateOnExit: true,
 
+  startDate: Date.createLogicalDate(1951, 0, 1),
+  endDate: Date.createLogicalDate(2050, 11, 31),
+
   init: function () {
     // this call super.init
     this.doInit();
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-minidaterange.js	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-minidaterange.js	Wed Oct 17 18:29:21 2012 +0200
@@ -42,6 +42,9 @@
   quartersFromNowTitle: OB.I18N.getLabel('OBUIAPP_quarters_from_now'),
   yearsFromNowTitle: OB.I18N.getLabel('OBUIAPP_years_from_now'),
 
+  startDate: Date.createLogicalDate(1951, 0, 1),
+  endDate: Date.createLogicalDate(2050, 11, 31),
+
   presetOptions: {
     "$today": OB.I18N.getLabel('OBUISC_DateChooser.todayButtonTitle'),
     "$yesterday": OB.I18N.getLabel('OBUIAPP_Yesterday'),
@@ -76,17 +79,49 @@
     }
   },
 
+  validateOnExit: true,
+  showErrorIcon: false,
+
+  validateRelativeDateItem: function (value) {
+    var isADate = Object.prototype.toString.call(value) === '[object Date]';
+    if (value === null || isADate) {
+      this.editor.items[0].textBoxStyle = this.editor.items[0].textBoxStyleNormal;
+      this.editor.items[0].redraw();
+      return true;
+    } else {
+      this.editor.items[0].textBoxStyle = this.editor.items[0].textBoxStyleError;
+      this.editor.items[0].redraw();
+      return false;
+    }
+  },
+
+  validators: [{
+    type: 'custom',
+    condition: function (item, validator, value) {
+      return item.validateRelativeDateItem(value);
+    }
+  }],
+
   blur: function () {
     var blurValue = this.blurValue(),
+        newBlurValue = '',
         digitRegExp = new RegExp('^\\d+$', 'gm'),
-        areOnlyDigits = digitRegExp.test(blurValue),
-        newValue;
+        newValue, i;
 
-    if (areOnlyDigits) {
-      if (!this.areDateItemPropertiesSet) {
-        this.addDateItemProperties();
-        this.areDateItemPropertiesSet = true;
+    if (!this.areDateItemPropertiesSet) {
+      this.addDateItemProperties();
+      this.areDateItemPropertiesSet = true;
+    }
+
+    // Remove all kind of separators of the input value
+    for (i = 0; i < blurValue.length; i++) {
+      if (!this.isSeparator(blurValue, i)) {
+        newBlurValue += blurValue[i];
       }
+    }
+
+    // If are only digits/numbers
+    if (digitRegExp.test(newBlurValue)) {
       newValue = this.parseValue();
       if (newValue) {
         this.setValue(OB.Utilities.Date.OBToJS(newValue, this.dateFormat));
@@ -152,13 +187,25 @@
   initWidget: function () {
     this.Super('initWidget', arguments);
     this.rangeForm.setFocusItem(this.rangeItem);
+
+    var fromField = this.rangeForm.items[0].fromField,
+        toField = this.rangeForm.items[0].toField;
+    this.clearButton.click = function () {
+      this.creator.clearValues();
+      fromField.validate();
+      toField.validate();
+    };
   },
 
   show: function () {
     this.Super('show', arguments);
-    this.rangeForm.items[0].fromField.calculatedDateField.canFocus = false;
-    this.rangeForm.items[0].toField.calculatedDateField.canFocus = false;
-    this.rangeForm.items[0].fromField.valueField.focusInItem();
+    var fromField = this.rangeForm.items[0].fromField,
+        toField = this.rangeForm.items[0].toField;
+    fromField.calculatedDateField.canFocus = false;
+    fromField.validate();
+    toField.calculatedDateField.canFocus = false;
+    toField.validate();
+    fromField.valueField.focusInItem();
     this.rangeForm.focus();
   },
 
@@ -278,6 +325,12 @@
       return;
     }
 
+    // Apply the empty filter if the date text has been deleted
+    // See issue https://issues.openbravo.com/view.php?id=21697
+    if (newValue === '') {
+      return true;
+    }
+
     if (newValue === oldValue) {
       return false;
     }
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-number.js	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-number.js	Wed Oct 17 18:29:21 2012 +0200
@@ -577,6 +577,12 @@
     return ret;
   },
 
+  // If the filter has not been applied yet, apply it when it loses the focus
+  blur: function () {
+    this.form.grid.performAction();
+    return this.Super('blur', arguments);
+  },
+
   convertToStringValue: function (value) {
     var type = this.typeInstance;
     if (!isc.isA.String(value)) {
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form-attachments.js	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form-attachments.js	Wed Oct 17 18:29:21 2012 +0200
@@ -257,6 +257,7 @@
         if (OB.Utilities.currentUploader === null || forceUpload) {
           var attachmentFile = OB.I18N.getLabel('OBUIAPP_AttachmentFile');
           var form = isc.DynamicForm.create({
+            autoFocus: true,
             fields: [{
               name: 'inpname',
               title: attachmentFile,
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form-linked-items.js	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form-linked-items.js	Wed Oct 17 18:29:21 2012 +0200
@@ -224,7 +224,7 @@
    * Opens linked item in a new window
    */
   openLinkedItemInNewWindow: function (record) {
-    OB.Utilities.openView(record.adWindowId, record.adTabId, record.adMenuName, record.id, 'DIRECT', null, record.readOnly, record.singleRecord, true);
+    OB.Utilities.openView(record.adWindowId, record.adTabId, record.adMenuName, record.id, 'DIRECT', null, record.readOnly, record.singleRecord, true, record.editOrDeleteOnly);
   },
 
   /**
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js	Wed Oct 17 18:29:21 2012 +0200
@@ -191,7 +191,7 @@
     //   from the datasource, so it has to be converted from UTC to local time
     // see issue https://issues.openbravo.com/view.php?id=20684
     if (!isLocalTime) {
-      OB.Utilities.Date.convertUTCTimeToLocalTime([record], this.fields);
+      record = OB.Utilities.Date.convertUTCTimeToLocalTime([record], this.fields)[0];
     }
 
     ret = this.Super('editRecord', arguments);
@@ -1493,10 +1493,20 @@
           return;
         }
 
-        if (!view.newRecordsAfterRefresh) {
-          view.newRecordsAfterRefresh = [];
+        if (view.parentRecordId) {
+          if (!view.newRecordsAfterRefresh) {
+            view.newRecordsAfterRefresh = {};
+          }
+          if (!view.newRecordsAfterRefresh[view.parentRecordId]) {
+            view.newRecordsAfterRefresh[view.parentRecordId] = [];
+          }
+          view.newRecordsAfterRefresh[view.parentRecordId].push(data[OB.Constants.ID]);
+        } else {
+          if (!view.newRecordsAfterRefresh) {
+            view.newRecordsAfterRefresh = [];
+          }
+          view.newRecordsAfterRefresh.push(data[OB.Constants.ID]);
         }
-        view.newRecordsAfterRefresh.push(data[OB.Constants.ID]);
 
         // do this after doing autoSave as the setHasChanged will clean
         // the autosave info
@@ -1825,6 +1835,13 @@
 
   keyDown: function () {
     if (this.grid && this.grid.editFormKeyDown) {
+      // To fix issue https://issues.openbravo.com/view.php?id=21786
+      var focusedItem = this.getFocusItem(),
+          isEscape = isc.EH.getKey() === 'Escape' && !isc.EH.ctrlKeyDown() && !isc.EH.altKeyDown() && !isc.EH.shiftKeyDown();
+      if (isEscape && focusedItem && Object.prototype.toString.call(focusedItem.isPickListShown) === '[object Function]' && focusedItem.isPickListShown()) {
+        return true; // Then the event will bubble to ComboBoxItem.keyDown
+      }
+
       // To fix issue https://issues.openbravo.com/view.php?id=21382
       this.grid.editFormKeyDown(arguments);
     }
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-grid.js	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-grid.js	Wed Oct 17 18:29:21 2012 +0200
@@ -70,7 +70,12 @@
     OB.KeyboardManager.Shortcuts.set('Grid_FocusFilter', ['OBGrid.body', 'OBGrid.editForm'], ksAction_FocusFilter);
 
     ksAction_FocusGrid = function (caller) {
-      caller.focus();
+      if (caller.getPrototype().Class !== 'OBViewGrid' || caller.data.localData[0]) { // In OBViewGrid case, only execute action if there are at least one row in the grid
+        caller.focus();
+        if (!caller.getSelectedRecord()) { // If there are no rows already selected in the grid, select the first one
+          caller.selectSingleRecord(0);
+        }
+      }
       return false; //To avoid keyboard shortcut propagation
     };
     OB.KeyboardManager.Shortcuts.set('Grid_FocusGrid', 'OBGrid.filter', ksAction_FocusGrid);
@@ -122,7 +127,14 @@
   },
 
   filterFieldsKeyDown: function (item, form, keyName) {
-    var response = OB.KeyboardManager.Shortcuts.monitor('OBGrid.filter', this.grid.fieldSourceGrid);
+    // To fix issue https://issues.openbravo.com/view.php?id=21786
+    var isEscape = isc.EH.getKey() === 'Escape' && !isc.EH.ctrlKeyDown() && !isc.EH.altKeyDown() && !isc.EH.shiftKeyDown(),
+        response;
+    if (isEscape && item && Object.prototype.toString.call(item.isPickListShown) === '[object Function]' && item.isPickListShown()) {
+      return true; // Then the event will bubble to ComboBoxItem.keyDown
+    }
+
+    response = OB.KeyboardManager.Shortcuts.monitor('OBGrid.filter', this.grid.fieldSourceGrid);
     if (response !== false) {
       response = this.Super('filterFieldsKeyDown', arguments);
     }
@@ -622,7 +634,7 @@
   // be presented with a save-as dialog.
   // Parameters:
   // * {{{exportProperties}}} defines different properties used for controlling the export, currently only the 
-  // exportProperties.exportFormat is supported (which is defaulted to csv).
+  // exportProperties.exportAs and exportProperties._extraProperties are supported (which is defaulted to csv).
   // * {{{data}}} the parameters to post to the server, in addition the filter criteria of the grid are posted.  
   exportData: function (exportProperties, data) {
     var d = data || {},
@@ -642,9 +654,11 @@
       // never do count for export
       exportAs: expProp.exportAs || 'csv',
       viewState: expProp.viewState,
+      _extraProperties: expProp._extraProperties,
       tab: expProp.tab,
       exportToFile: true,
-      _textMatchStyle: 'substring'
+      _textMatchStyle: 'substring',
+      _UTCOffsetMiliseconds: OB.Utilities.Date.getUTCOffsetInMiliseconds()
     }, lcriteria, this.getFetchRequestParams());
     if (this.getSortField()) {
       sortCriteria = this.getSort();
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js	Wed Oct 17 18:29:21 2012 +0200
@@ -214,13 +214,13 @@
       // when the data is received from the datasource, time fields are formatted in UTC time. They have to be converted to local time
       if (dsResponse && dsResponse.context && (dsResponse.context.operationType === 'fetch' || dsResponse.context.operationType === 'update' || dsResponse.context.operationType === 'add')) {
         if (this.grid) {
-          OB.Utilities.Date.convertUTCTimeToLocalTime(newData, this.grid.completeFields);
+          newData = OB.Utilities.Date.convertUTCTimeToLocalTime(newData, this.grid.completeFields);
         }
       }
       // only do this stuff for fetch operations, in other cases strange things
       // happen as update/delete operations do not return the totalRows parameter      
       if (dsResponse && dsResponse.context && dsResponse.context.operationType !== 'fetch') {
-        return;
+        return newData;
       }
       // correct the length if there is already data in the localData array
       if (this.localData) {
@@ -242,6 +242,7 @@
       if (this.localData && this.localData[dsResponse.totalRows]) {
         this.localData[dsResponse.totalRows] = null;
       }
+      return newData;
     }
   },
 
@@ -301,12 +302,17 @@
 
     // TODO: add dynamic part of readonly (via setWindowSettings: see issue 17441)
     // add context-menu only if 'new' is allowed in tab definition
-    if (this.uiPattern !== 'SR' && this.uiPattern !== 'RO') {
+    if (this.uiPattern !== 'SR' && this.uiPattern !== 'RO' && this.uiPattern !== 'ED') {
       this.contextMenu = this.getMenuConstructor().create({
         items: menuItems
       });
       this.contextMenu.show = function () {
         var me = this;
+        // If not in the header tab, and no parent is selected, do not show the context menu
+        // See issue https://issues.openbravo.com/view.php?id=21787
+        if (!grid.view.hasValidState()) {
+          return;
+        }
         if (!grid.view.isActiveView()) {
           // The view where the context menu is being opened must be active
           // See issue https://issues.openbravo.com/view.php?id=20872
@@ -926,7 +932,7 @@
   dataArrived: function (startRow, endRow) {
     // do this now, to replace the loading message
     // TODO: add dynamic part of readonly (via setWindowSettings: see issue 17441)
-    if (this.uiPattern === 'SR' || this.uiPattern === 'RO') {
+    if (this.uiPattern === 'SR' || this.uiPattern === 'RO' || this.uiPattern !== 'ED') {
       this.noDataEmptyMessage = '<span class="' + this.emptyMessageStyle + '">' + OB.I18N.getLabel('OBUIAPP_NoDataInGrid') + '</span>';
     } else {
       this.noDataEmptyMessage = '<span class="' + this.emptyMessageStyle + '">' + OB.I18N.getLabel('OBUIAPP_GridNoRecords') + '</span>' + '<span onclick="this.onclick = new Function(); setTimeout(function() { window[\'' + this.ID + '\'].view.newRow(); }, 50); return false;" class="' + this.emptyMessageLinkStyle + '">' + OB.I18N.getLabel('OBUIAPP_GridCreateOne') + '</span>';
@@ -1521,7 +1527,7 @@
       });
     }
 
-    if (!this.view.singleRecord && !this.view.readOnly) {
+    if (!this.view.singleRecord && !this.view.readOnly && !this.view.editOrDeleteOnly) {
       menuItems.add({
         title: OB.I18N.getLabel('OBUIAPP_CreateRecordInGrid'),
         keyTitle: OB.KeyboardManager.Shortcuts.getProperty('keyComb.text', 'ToolBar_NewRow', 'id'),
@@ -2193,7 +2199,7 @@
     // how many arguments are passed on, sometimes the newValue is not passed in
     // and then it must be recomputed, so if we then use the undefined newValue
     // in the actionObject below things will go wrong
-    if (arguments.length < 2) {
+    if (arguments.length < 2 && this.view.allowNewRow()) {
       newValue = this.getEditValue(rowNum, colNum);
     }
 
@@ -2210,7 +2216,9 @@
     // If leaving the row...
     if (editCompletionEvent === 'enter' || editCompletionEvent === 'arrow_up' || editCompletionEvent === 'arrow_down') {
       // See issue https://issues.openbravo.com/view.php?id=19830
-      this.view.standardWindow.getDirtyEditForm().validateForm();
+      if (this.view.standardWindow.getDirtyEditForm()) {
+        this.view.standardWindow.getDirtyEditForm().validateForm();
+      }
     }
 
     this._leavingCell = true;
@@ -2236,7 +2244,7 @@
     var ret, i, length = this.getFields().length;
     this._inGetNextEditCell = true;
     // past the last row
-    if (editCompletionEvent === isc.ListGrid.ENTER_KEYPRESS && rowNum === (this.getTotalRows() - 1)) {
+    if (editCompletionEvent === isc.ListGrid.ENTER_KEYPRESS && rowNum === (this.getTotalRows() - 1) && this.view.allowNewRow()) {
       // move to the next row
       ret = this.findNextEditCell(rowNum + 1, 0, 1, true, true);
 
@@ -2254,13 +2262,18 @@
 
     // when moving between rows with the arrow keys, force the focus in the correct 
     // column
-    if (ret && ret[0] !== rowNum && this.getField(colNum) && (editCompletionEvent === isc.ListGrid.UP_ARROW_KEYPRESS || editCompletionEvent === isc.ListGrid.DOWN_ARROW_KEYPRESS)) {
+    if (ret && ret[0] !== rowNum && this.getField(colNum) && (editCompletionEvent === isc.ListGrid.UP_ARROW_KEYPRESS || editCompletionEvent === isc.ListGrid.DOWN_ARROW_KEYPRESS) && this.view.allowNewRow()) {
       this.forceFocusColumn = this.getField(colNum).name;
     }
 
     delete this._inGetNextEditCell;
     return ret;
   },
+  
+  //used in Edit or Delete only UI pattern
+  setListEndEditAction: function () {
+	this.listEndEditAction = "done";
+  },
 
   // overridden to take into account disabled at item level
   // only used when computing the next edit cell
@@ -2312,10 +2325,20 @@
     saveCallback = function () {
       if (originalCallback) {
         if (this.getSelectedRecord() && this.getSelectedRecord()[OB.Constants.ID]) {
-          if (!this.view.newRecordsAfterRefresh) {
-            this.view.newRecordsAfterRefresh = [];
+          if (this.view.parentRecordId) {
+            if (!this.view.newRecordsAfterRefresh) {
+              this.view.newRecordsAfterRefresh = {};
+            }
+            if (!this.view.newRecordsAfterRefresh[this.view.parentRecordId]) {
+              this.view.newRecordsAfterRefresh[this.view.parentRecordId] = [];
+            }
+            this.view.newRecordsAfterRefresh[this.view.parentRecordId].push(this.getSelectedRecord()[OB.Constants.ID]);
+          } else {
+            if (!this.view.newRecordsAfterRefresh) {
+              this.view.newRecordsAfterRefresh = [];
+            }
+            this.view.newRecordsAfterRefresh.push(this.getSelectedRecord()[OB.Constants.ID]);
           }
-          this.view.newRecordsAfterRefresh.push(this.getSelectedRecord()[OB.Constants.ID]);
         }
         this.fireCallback(originalCallback, "rowNum,colNum,editCompletionEvent,success", [rowNum, colNum, editCompletionEvent]);
       }
@@ -2384,6 +2407,10 @@
         isc.Log.logDebug('hideInlineEditor has NO record and editColumnLayout', 'OB');
       }
       this.view.isEditingGrid = false;
+      // Update the tab title after the record has been saved or canceled
+      // to get rid of the '*' in the tab title
+      // See https://issues.openbravo.com/view.php?id=21709
+      this.view.updateTabTitle();
     }
 
     // always hide the clickmask, as it needs to be re-applied
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js	Wed Oct 17 18:29:21 2012 +0200
@@ -71,6 +71,7 @@
 
   UI_PATTERN_READONLY: 'RO',
   UI_PATTERN_SINGLERECORD: 'SR',
+  UI_PATTERN_EDITORDELETEONLY: 'ED',
   UI_PATTERN_STANDARD: 'ST'
 });
 
@@ -185,6 +186,7 @@
 
   readOnly: false,
   singleRecord: false,
+  editOrDeleteOnly: false,
 
   isShowingForm: false,
   isEditingGrid: false,
@@ -652,10 +654,24 @@
     }
   },
 
+  setEditOrDeleteOnly: function (editOrDeleteOnly) {
+    this.editOrDeleteOnly = editOrDeleteOnly;
+    if (editOrDeleteOnly) {
+      this.viewGrid.setListEndEditAction();
+    }
+  },
+
   setSingleRecord: function (singleRecord) {
     this.singleRecord = singleRecord;
   },
 
+  allowNewRow: function () {
+    if (this.readOnly || this.singleRecord || this.editOrDeleteOnly) {
+      return false;
+    }
+    return true;
+  },
+
   setViewFocus: function () {
 
     var object, functionName, items, item, i;
@@ -674,8 +690,23 @@
       this.viewGrid.enableShortcuts();
     }
 
-    if (this.isShowingForm && this.viewForm && this.viewForm.getFocusItem()) {
-      object = this.viewForm.getFocusItem();
+    if (this.isShowingForm && this.viewForm) {
+      if (!this.lastFocusedItem) {
+        this.lastFocusedItem = this.viewForm.getItem(this.firstFocusedField);
+      }
+      if (this.lastFocusedItem && this.lastFocusedItem.getCanFocus()) {
+        object = this.lastFocusedItem;
+      } else if (this.viewForm.getFocusItem() && this.viewForm.getFocusItem().getCanFocus()) {
+        object = this.viewForm.getFocusItem();
+      } else {
+        var fields = this.viewForm.fields;
+        for (i = 0; i < fields.length; i++) {
+          if (fields[i].getCanFocus()) {
+            object = fields[i];
+            break;
+          }
+        }
+      }
       functionName = 'focusInItem';
     } else if (this.isEditingGrid && this.viewGrid.getEditForm() && this.viewGrid.getEditForm().getFocusItem()) {
       object = this.viewGrid.getEditForm();
@@ -731,6 +762,10 @@
   },
 
   setAsActiveView: function (autoSaveDone) {
+    var activeView = this.standardWindow.activeView;
+    if (activeView && activeView !== this && ((activeView.isShowingForm && activeView.viewForm.inFicCall) || (!activeView.isShowingForm && activeView.viewGrid.getEditForm() && activeView.viewGrid.getEditForm().inFicCall))) {
+      return;
+    }
     if (!autoSaveDone && this.standardWindow.activeView && this.standardWindow.activeView !== this) {
       var actionObject = {
         target: this,
@@ -1415,7 +1450,11 @@
     };
 
     if (!newRecordsToBeIncluded) {
-      this.newRecordsAfterRefresh = [];
+      if (this.parentRecordId && this.newRecordsAfterRefresh) {
+        this.newRecordsAfterRefresh[this.parentRecordId] = [];
+      } else {
+        this.newRecordsAfterRefresh = [];
+      }
     }
     if (!this.isShowingForm) {
       this.viewGrid.refreshGrid(refreshCallback, newRecordsToBeIncluded);
@@ -2055,6 +2094,7 @@
     var onChangeFunction;
 
     if (fld.displayed === false && !isGridField) {
+      fld.hiddenInForm = true;
       fld.visible = false;
       fld.alwaysTakeSpace = false;
     }
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js	Wed Oct 17 18:29:21 2012 +0200
@@ -235,7 +235,7 @@
         len = parts.length,
         className = '_',
         tabSet = OB.MainView.TabSet,
-        vStack, manualJS, originalClassName, processClass;
+        vStack, manualJS, originalClassName, processClass, processOwnerView;
 
     if (params.uiPattern === 'M') { // Manual UI Pattern
       try {
@@ -260,9 +260,12 @@
         processClass = isc[className] || isc[originalClassName];
 
         if (processClass) {
-          this.selectedState = this.activeView && this.activeView.viewGrid && this.activeView.viewGrid.getSelectedState();
+          processOwnerView = this.getProcessOwnerView(params.processId);
+          this.selectedState = processOwnerView.viewGrid && processOwnerView.viewGrid.getSelectedState();
           this.runningProcess = processClass.create(isc.addProperties({}, params, {
-            parentWindow: this
+            parentWindow: this,
+            sourceView: this.activeView,
+            buttonOwnerView: processOwnerView
           }));
 
           this.openPopupInTab(this.runningProcess, params.windowTitle, (this.runningProcess.popupWidth ? this.runningProcess.popupWidth : '90%'), (this.runningProcess.popupHeight ? this.runningProcess.popupHeight : '90%'), (this.runningProcess.showMinimizeButton ? this.runningProcess.showMinimizeButton : false), (this.runningProcess.showMaximizeButton ? this.runningProcess.showMaximizeButton : false), true, true);
@@ -370,6 +373,7 @@
     for (i = 0; i < length; i++) {
       this.views[i].setReadOnly(data.uiPattern[this.views[i].tabId] === isc.OBStandardView.UI_PATTERN_READONLY);
       this.views[i].setSingleRecord(data.uiPattern[this.views[i].tabId] === isc.OBStandardView.UI_PATTERN_SINGLERECORD);
+      this.views[i].setEditOrDeleteOnly(data.uiPattern[this.views[i].tabId] === isc.OBStandardView.UI_PATTERN_EDITORDELETEONLY);
       this.views[i].toolBar.updateButtonState(true);
     }
 
@@ -1081,5 +1085,19 @@
     }
     this.viewState = result;
     OB.PropertyStore.set('OBUIAPP_GridConfiguration', result, this.windowId);
+  },
+
+  getProcessOwnerView: function (processId) {
+    var ownerView, i, j, nActionButtons, nViews = this.views.length;
+    for (i = 0; i < nViews; i++) {
+      nActionButtons = this.views[i].actionToolbarButtons.length;
+      for (j = 0; j < nActionButtons; j++) {
+        if (processId === this.views[i].actionToolbarButtons[j].processId) {
+          return this.views[i];
+        }
+      }
+    }
+    // If it is not found, return the header view
+    return this.view;
   }
 });
\ No newline at end of file
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-tab.js	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-tab.js	Wed Oct 17 18:29:21 2012 +0200
@@ -113,11 +113,13 @@
       return false; //To avoid keyboard shortcut propagation
     };
     OB.KeyboardManager.Shortcuts.set('TabSet_SelectParentTab', 'Canvas', ksAction_SelectParentTab);
+    OB.KeyboardManager.Shortcuts.set('TabSet_SelectParentTab_Alternative', 'Canvas', ksAction_SelectParentTab);
     ksAction_SelectChildTab = function () {
       me.selectChildTab();
       return false; //To avoid keyboard shortcut propagation
     };
     OB.KeyboardManager.Shortcuts.set('TabSet_SelectChildTab', 'Canvas', ksAction_SelectChildTab);
+    OB.KeyboardManager.Shortcuts.set('TabSet_SelectChildTab_Alternative', 'Canvas', ksAction_SelectChildTab);
     ksAction_SelectPreviousTab = function () {
       if (!isc.Page.isRTL()) { // LTR mode
         me.selectPreviousTab();
@@ -127,6 +129,7 @@
       return false; //To avoid keyboard shortcut propagation
     };
     OB.KeyboardManager.Shortcuts.set('TabSet_SelectPreviousTab', 'Canvas', ksAction_SelectPreviousTab);
+    OB.KeyboardManager.Shortcuts.set('TabSet_SelectPreviousTab_Alternative', 'Canvas', ksAction_SelectPreviousTab);
     ksAction_SelectNextTab = function () {
       if (!isc.Page.isRTL()) { // LTR mode
         me.selectNextTab();
@@ -136,6 +139,7 @@
       return false; //To avoid keyboard shortcut propagation
     };
     OB.KeyboardManager.Shortcuts.set('TabSet_SelectNextTab', 'Canvas', ksAction_SelectNextTab);
+    OB.KeyboardManager.Shortcuts.set('TabSet_SelectNextTab_Alternative', 'Canvas', ksAction_SelectNextTab);
     ksAction_SelectWorkspaceTab = function () {
       me.selectTab(0);
       return false; //To avoid keyboard shortcut propagation
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/navbar/ob-application-menu.js	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/navbar/ob-application-menu.js	Wed Oct 17 18:29:21 2012 +0200
@@ -122,7 +122,7 @@
     var isClassicEnvironment = OB.Utilities.useClassicMode(item.windowId);
     var selectedView = isc.addProperties({}, item);
     if (item.tabId) {
-      selectedView = OB.Utilities.openView(item.windowId, item.tabId, item.title, null, null, item.icon, item.readOnly, item.singleRecord);
+      selectedView = OB.Utilities.openView(item.windowId, item.tabId, item.title, null, null, item.icon, item.readOnly, item.singleRecord,null,item.editOrDeleteOnly);
       selectedView.type = item.type;
       selectedView.icon = item.icon;
       if (selectedView) {
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/navbar/ob-quick-launch.js	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/navbar/ob-quick-launch.js	Wed Oct 17 18:29:21 2012 +0200
@@ -237,7 +237,7 @@
             isc.OBQuickRun.currentQuickRun.doHide();
             var openObject = isc.addProperties({}, record);
             if (record.optionType && record.optionType === 'tab') {
-              openObject = OB.Utilities.openView(record.windowId, viewValue, record[OB.Constants.IDENTIFIER], null, this.command, record.icon, record.readOnly, record.singleRecord);
+              openObject = OB.Utilities.openView(record.windowId, viewValue, record[OB.Constants.IDENTIFIER], null, this.command, record.icon, record.readOnly, record.singleRecord, null, record.editOrDeleteOnly);
               if (openObject) {
                 OB.RecentUtilities.addRecent(this.recentPropertyName, openObject);
               }
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-view.js	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-view.js	Wed Oct 17 18:29:21 2012 +0200
@@ -199,9 +199,11 @@
     var window = this.parentWindow;
 
     if (message) {
-      window.view.messageBar.setMessage(message.severity, message.text);
+      this.buttonOwnerView.messageBar.setMessage(message.severity, message.text);
     }
 
+    this.buttonOwnerView.setAsActiveView();
+
     if (refresh) {
       window.refresh();
     }
@@ -318,7 +320,7 @@
     var i, tmp, view = this,
         grid = view.viewGrid,
         activeView = view.parentWindow && view.parentWindow.activeView,
-        allProperties = activeView.getContextInfo(false, true, false, true) || {},
+        allProperties = this.sourceView.getContextInfo(false, true, false, true) || {},
         selection = grid.getSelectedRecords() || [],
         len = selection.length,
         allRows = grid.data.allRows || grid.data;
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-action-button.js	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-action-button.js	Wed Oct 17 18:29:21 2012 +0200
@@ -36,7 +36,7 @@
     var theView = this.view,
         record, rowNum, actionObject;
 
-    if (!theView.isShowingForm && theView.viewGrid.getSelectedRecords().length === 1) {
+    if (!theView.isShowingForm && theView.viewGrid.getSelectedRecords() && theView.viewGrid.getSelectedRecords().length === 1) {
       // Keep current selection that might be lost in autosave
       record = theView.viewGrid.getSelectedRecord();
       rowNum = theView.viewGrid.getRecordIndex(record);
@@ -146,7 +146,7 @@
     afterRefresh = function (doRefresh) {
       var undef, refresh = (doRefresh === undef || doRefresh),
           autosaveDone = false,
-          currentRecordId;
+          currentRecordId, recordsAfterRefresh;
 
       // Refresh context view
       contextView.getTabMessage();
@@ -162,7 +162,12 @@
         // The selected record should be shown after the refresh, even
         // if the filter would exclude it
         // See issue https://issues.openbravo.com/view.php?id=20722
-        currentView.refresh(null, autosaveDone, currentView.newRecordsAfterRefresh);
+        if (currentView.parentTabId) {
+          recordsAfterRefresh = currentView.newRecordsAfterRefresh[currentView.parentTabId];
+        } else {
+          recordsAfterRefresh = currentView.newRecordsAfterRefresh;
+        }
+        currentView.refresh(null, autosaveDone, recordsAfterRefresh);
       }
     };
 
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js	Wed Oct 17 18:29:21 2012 +0200
@@ -120,7 +120,7 @@
     updateState: function () {
       var view = this.view,
           selectedRecords = view.viewGrid.getSelectedRecords();
-      this.setDisabled(view.isShowingForm || view.readOnly || view.singleRecord || !view.hasValidState() || (selectedRecords && selectedRecords.length > 1));
+      this.setDisabled(view.isShowingForm || view.readOnly || view.singleRecord || view.editOrDeleteOnly || !view.hasValidState() || (selectedRecords && selectedRecords.length > 1));
     },
     keyboardShortcutId: 'ToolBar_NewRow'
   },
@@ -135,9 +135,9 @@
       var view = this.view,
           form = view.viewForm;
       if (view.isShowingForm) {
-        this.setDisabled(form.isSaving || view.readOnly || view.singleRecord || !view.hasValidState());
+        this.setDisabled(form.isSaving || view.readOnly || view.singleRecord || view.editOrDeleteOnly || !view.hasValidState());
       } else {
-        this.setDisabled(view.readOnly || view.singleRecord || !view.hasValidState());
+        this.setDisabled(view.readOnly || view.singleRecord || view.editOrDeleteOnly || !view.hasValidState());
       }
     },
     keyboardShortcutId: 'ToolBar_NewDoc'
@@ -172,9 +172,9 @@
         }
       }
       if (view.isShowingForm) {
-        this.setDisabled(form.isSaving || form.readOnly || view.singleRecord || !view.hasValidState() || form.isNew);
+        this.setDisabled(form.isSaving || form.readOnly || view.singleRecord || !view.hasValidState() || form.isNew || OB.PropertyStore.get("AllowDelete", this.view.standardWindow.id) === 'N');
       } else {
-        this.setDisabled(view.readOnly || view.singleRecord || !view.hasValidState() || !grid.getSelectedRecords() || grid.getSelectedRecords().length === 0);
+        this.setDisabled(view.readOnly || view.singleRecord || !view.hasValidState() || !grid.getSelectedRecords() || grid.getSelectedRecords().length === 0 || OB.PropertyStore.get("AllowDelete", this.view.standardWindow.id) === 'N');
       }
     },
     keyboardShortcutId: 'ToolBar_Eliminate'
@@ -220,6 +220,7 @@
       var requestProperties = {
         exportAs: 'csv',
         exportDisplay: 'download',
+        _extraProperties: this.view && this.view.dataSource && this.view.dataSource.requestProperties.params._extraProperties,
         params: {
           exportToFile: true
         },
@@ -361,6 +362,11 @@
       if (this.view.viewForm.readOnly && !this.view.attachmentExists) {
         this.setDisabled(true);
       }
+      if (OB.PropertyStore.get("AllowAttachment", this.view.standardWindow.id) === 'N') {
+        this.view.viewForm.enableAttachmentsSection(false);
+        this.setDisabled(true);
+      }
+
     },
     keyboardShortcutId: 'ToolBar_Attachments'
   },
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-keyboard-manager.js	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-keyboard-manager.js	Wed Oct 17 18:29:21 2012 +0200
@@ -116,6 +116,17 @@
               this.list[position].keyComb.text += 'Shift';
             }
           }
+          if (typeof keyComb.space === 'undefined') {
+            this.list[position].keyComb.space = false;
+          } else {
+            this.list[position].keyComb.space = keyComb.space;
+            if (keyComb.space === true) {
+              if (this.list[position].keyComb.text.length > 0) {
+                this.list[position].keyComb.text += '+';
+              }
+              this.list[position].keyComb.text += 'Space';
+            }
+          }
           if (typeof keyComb.key === 'undefined') {
             this.list[position].keyComb.key = null;
           } else {
@@ -275,6 +286,8 @@
         return this.list;
       },
 
+      isSpacePressed: false,
+
       monitor: function (execLevel, caller) {
         var i, j, length = this.list.length,
             position = null,
@@ -282,6 +295,7 @@
         pushedKS.ctrl = false;
         pushedKS.alt = false;
         pushedKS.shift = false;
+        pushedKS.space = false;
         pushedKS.key = null;
         if (isc.Event.ctrlKeyDown()) {
           pushedKS.ctrl = true;
@@ -292,7 +306,13 @@
         if (isc.Event.shiftKeyDown()) {
           pushedKS.shift = true;
         }
+        if (this.isSpacePressed) {
+          pushedKS.space = true;
+        }
         pushedKS.key = isc.Event.getKey();
+        if (pushedKS.key === 'Space' && pushedKS.ctrl && pushedKS.space) {
+          return false; // To avoid write a space when "just" ctrl+space combination is pressed
+        }
 
         for (i = 0; i < length; i++) {
           if (typeof this.list[i] === 'undefined' && !execLevel) {
@@ -300,7 +320,7 @@
           }
           if (this.list[i].execLevel) {
             for (j = 0; j < this.list[i].execLevel.length; j++) {
-              if (this.list[i].execLevel[j] === execLevel && this.list[i].keyComb.ctrl === pushedKS.ctrl && this.list[i].keyComb.alt === pushedKS.alt && this.list[i].keyComb.shift === pushedKS.shift && this.list[i].keyComb.key === pushedKS.key) {
+              if (this.list[i].execLevel[j] === execLevel && this.list[i].keyComb.ctrl === pushedKS.ctrl && this.list[i].keyComb.alt === pushedKS.alt && this.list[i].keyComb.shift === pushedKS.shift && this.list[i].keyComb.space === pushedKS.space && this.list[i].keyComb.key === pushedKS.key) {
                 position = i;
                 break;
               }
@@ -327,14 +347,66 @@
   // Initialize KeyboardManager object
   keyboardMgr = O.KeyboardManager = new KeyboardManager();
 
-  /* isc.Page.setEvent('keyPress', 'OB.KeyboardManager.Shortcuts.monitor('Canvas')'); // Discart due to Chrome event propagation problems http://forums.smartclient.com/showthread.php?p=65578 */
-  isc.Canvas.getPrototype()._originalKeyDown = isc.Canvas.getPrototype().keyDown;
-  isc.Canvas.getPrototype().keyDown = function () {
-    var response = OB.KeyboardManager.Shortcuts.monitor('Canvas');
-    if (response) { // To ensure that if a previous keyDown was set in the Canvas it is executed if the action KeyboardManager.action should be propagated
-      response = this._originalKeyDown();
+  // To avoid default browser behavior that makes "Backspace" key go to previous html page
+  O.KeyboardManager.Shortcuts.set('Canvas_Avoid_Backspace', 'Canvas', function () {
+    if (document.activeElement && (document.activeElement.tagName.toLowerCase() === 'div' || document.activeElement.tagName.toLowerCase() === 'body')) {
+      return false;
+    } else {
+      return true;
+    }
+  }, null, {
+    "key": "Backspace"
+  });
+
+  // To fix issue https://issues.openbravo.com/view.php?id=21786
+  isc.ComboBoxItem.getPrototype()._originalKeyDown = isc.ComboBoxItem.getPrototype().keyDown;
+  isc.ComboBoxItem.getPrototype().keyDown = function () {
+    var actionObject = {
+      target: this,
+      method: this._originalKeyDown,
+      parameters: arguments
+    },
+        response = OB.Utilities.callAction(actionObject),
+        isEscape = isc.EH.getKey() === 'Escape' && !isc.EH.ctrlKeyDown() && !isc.EH.altKeyDown() && !isc.EH.shiftKeyDown();
+
+    if (isEscape && this.isPickListShown()) {
+      this.hidePicker();
+      response = false;
     }
     return response;
   };
 
+  /* isc.Page.setEvent('keyPress', 'OB.KeyboardManager.Shortcuts.monitor('Canvas')'); // Discart due to Chrome event propagation problems http://forums.smartclient.com/showthread.php?p=65578 */
+  isc.Canvas.getPrototype()._originalKeyDown = isc.Canvas.getPrototype().keyDown;
+  isc.Canvas.getPrototype().keyDown = function () {
+    var actionObject = {
+      target: this,
+      method: this._originalKeyDown,
+      parameters: arguments
+    },
+        response;
+
+    if (isc.Event.getKey() === 'Space') {
+      OB.KeyboardManager.Shortcuts.isSpacePressed = true;
+    }
+    response = OB.KeyboardManager.Shortcuts.monitor('Canvas');
+    if (response !== false) { // To ensure that if a previous keyDown was set in the Canvas it is executed if the action KeyboardManager.action should be propagated
+      response = OB.Utilities.callAction(actionObject);
+    }
+    return response;
+  };
+
+  isc.Canvas.getPrototype()._originalKeyUp = isc.Canvas.getPrototype().keyUp;
+  isc.Canvas.getPrototype().keyUp = function () {
+    var actionObject = {
+      target: this,
+      method: this._originalKeyUp,
+      parameters: arguments
+    };
+    if (isc.Event.getKey() === 'Space') {
+      OB.KeyboardManager.Shortcuts.isSpacePressed = false;
+    }
+    return OB.Utilities.callAction(actionObject);
+  };
+
 }(OB, isc));
\ No newline at end of file
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities-date.js	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities-date.js	Wed Oct 17 18:29:21 2012 +0200
@@ -23,7 +23,6 @@
 // = Openbravo Date Utilities =
 // Defines utility methods related to handling date, incl. formatting.
 OB.Utilities.Date = {};
-
 // ** {{{ OB.Utilities.Date.centuryReference }}} **
 // For a two-digit year display format, it establishes where is the frontier
 // between the 20th and the 21st century
@@ -116,6 +115,12 @@
   var minutes = dateFormat.indexOf('%M') !== -1 ? OBDate.substring(dateFormat.indexOf('%M'), dateFormat.indexOf('%M') + 2) : 0;
   var seconds = dateFormat.indexOf('%S') !== -1 ? OBDate.substring(dateFormat.indexOf('%S'), dateFormat.indexOf('%S') + 2) : 0;
 
+  // Check that really all date parts (if they are present) are numbers
+  var digitRegExp = ['^\\d+$', 'gm'];
+  if ((year && !(new RegExp(digitRegExp[0], digitRegExp[1]).test(year))) || (fullYear && !(new RegExp(digitRegExp[0], digitRegExp[1]).test(fullYear))) || (month && !(new RegExp(digitRegExp[0], digitRegExp[1]).test(month))) || (day && !(new RegExp(digitRegExp[0], digitRegExp[1]).test(day))) || (hours && !(new RegExp(digitRegExp[0], digitRegExp[1]).test(hours))) || (minutes && !(new RegExp(digitRegExp[0], digitRegExp[1]).test(minutes))) || (seconds && !(new RegExp(digitRegExp[0], digitRegExp[1]).test(seconds)))) {
+    return null;
+  }
+
   month = parseInt(month, 10);
   day = parseInt(day, 10);
   hours = parseInt(hours, 10);
@@ -255,21 +260,31 @@
 // * {{{newData}}}: records to be converted
 // * {{{allFields}}}: array with the fields of the records
 // Return:
-// * Nothing. newData is modified, its time fields are converted from UTC to local time
+// * Nothing. newData, after converting its time fields from UTC timezone the the client side timezone
 OB.Utilities.Date.convertUTCTimeToLocalTime = function (newData, allFields) {
-  var textField, fieldToDate, i, j, newDataLength = newData.length,
-      UTCHourOffset = isc.Time.getUTCHoursDisplayOffset(new Date()),
-      UTCMinuteOffset = isc.Time.getUTCMinutesDisplayOffset(new Date()),
+  var textField, fieldToDate, i, j, UTCOffsetInMiliseconds = OB.Utilities.Date.getUTCOffsetInMiliseconds(),
       timeFields = OB.Utilities.Date.getTimeFields(allFields),
-      timeFieldsLength = timeFields.length;
+      timeFieldsLength = timeFields.length,
+      convertedData = isc.clone(newData),
+      convertedDataLength = convertedData.length;
   for (i = 0; i < timeFieldsLength; i++) {
-    for (j = 0; j < newDataLength; j++) {
-      textField = newData[j][timeFields[i]];
+    for (j = 0; j < convertedDataLength; j++) {
+      textField = convertedData[j][timeFields[i]];
       if (textField && textField.length > 0) {
         fieldToDate = isc.Time.parseInput(textField);
-        fieldToDate.setTime(fieldToDate.getTime() + (UTCHourOffset * 60 * 60 * 1000) + (UTCMinuteOffset * 60 * 1000));
-        newData[j][timeFields[i]] = fieldToDate.getHours() + ':' + fieldToDate.getMinutes() + ':' + fieldToDate.getSeconds();
+        fieldToDate.setTime(fieldToDate.getTime() + UTCOffsetInMiliseconds);
+        convertedData[j][timeFields[i]] = fieldToDate.getHours() + ':' + fieldToDate.getMinutes() + ':' + fieldToDate.getSeconds();
       }
     }
   }
+  return convertedData;
+};
+
+//** {{{ OB.Utilities.Date.getUTCOffsetInMiliseconds }}} **
+//
+// Return the offset with UTC measured in miliseconds
+OB.Utilities.Date.getUTCOffsetInMiliseconds = function () {
+  var UTCHourOffset = isc.Time.getUTCHoursDisplayOffset(new Date()),
+      UTCMinuteOffset = isc.Time.getUTCMinutesDisplayOffset(new Date());
+  return (UTCHourOffset * 60 * 60 * 1000) + (UTCMinuteOffset * 60 * 1000);
 };
\ No newline at end of file
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities.js	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities.js	Wed Oct 17 18:29:21 2012 +0200
@@ -237,6 +237,8 @@
 // If action is null/undefined then nothing is done and undefined is returned.
 // When the action is called the result of the action is returned.
 OB.Utilities.callAction = function (action) {
+  var response;
+
   function IEApplyHack(method, object, parameters) {
     if (!object) {
       object = window;
@@ -262,18 +264,19 @@
     return result;
   }
 
-  if (!action) {
+  if (!action || !action.method) {
     return;
   }
   if (action.callback) {
     action.callback();
   } else {
     if (navigator.userAgent.toUpperCase().indexOf("MSIE") !== -1) {
-      IEApplyHack(action.method, action.target, action.parameters);
+      response = IEApplyHack(action.method, action.target, action.parameters);
     } else {
-      action.method.apply(action.target, action.parameters);
+      response = action.method.apply(action.target, action.parameters);
     }
   }
+  return response;
 };
 
 // ** {{{OB.Utilities.replaceNullStringValue}}} **
@@ -379,7 +382,7 @@
 // ** {{{OB.Utilities.openView}}} **
 // Open a view taking into account if a specific window should be opened in classic mode or not.
 // Returns the object used to open the window.
-OB.Utilities.openView = function (windowId, tabId, tabTitle, recordId, command, icon, readOnly, singleRecord, direct) {
+OB.Utilities.openView = function (windowId, tabId, tabTitle, recordId, command, icon, readOnly, singleRecord, direct, editOrDeleteOnly) {
   var isClassicEnvironment = OB.Utilities.useClassicMode(windowId);
 
   var openObject;
@@ -406,7 +409,8 @@
       tabTitle: tabTitle,
       windowId: windowId,
       readOnly: readOnly,
-      singleRecord: singleRecord
+      singleRecord: singleRecord,
+      editOrDeleteOnly: editOrDeleteOnly
     };
   } else {
     openObject = {
@@ -417,7 +421,8 @@
       windowId: windowId,
       icon: icon,
       readOnly: readOnly,
-      singleRecord: singleRecord
+      singleRecord: singleRecord,
+      editOrDeleteOnly: editOrDeleteOnly
     };
   }
   if (command) {
--- a/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/Default/org.openbravo.client.application/ob-form-styles.css	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/Default/org.openbravo.client.application/ob-form-styles.css	Wed Oct 17 18:29:21 2012 +0200
@@ -107,6 +107,7 @@
 .OBFormFieldSelectInputDisabled,
 .OBFormFieldSelectInputFocused,
 .OBFormFieldSelectInputError,
+.OBFormFieldSelectInputErrorFocused,
 .OBFormFieldSelectInputHint,
 
 .OBFormFieldSelectInputPending,
@@ -194,6 +195,7 @@
 
 .OBFormFieldSelectInput,
 .OBFormFieldSelectInputError,
+.OBFormFieldSelectInputErrorFocused,
 .OBFormFieldSelectInputFocused,
 .OBFormFieldSelectInputHint,
 
@@ -268,6 +270,7 @@
 .OBFormFieldNumberInputRequiredError,
 .OBFormFieldInputError,
 .OBFormFieldSelectInputError,
+.OBFormFieldSelectInputErrorFocused,
 .OBFormFieldDateInputError,
 .OBFormFieldLabelError { 
   color: red; /*#204268;*/
@@ -312,6 +315,8 @@
 .OBFormFieldSelectInputFocused,
 .OBFormFieldSelectInputSelectedFocused,
 .OBFormFieldSelectInput:focus,
+.OBFormFieldSelectInputError:focus,
+.OBFormFieldSelectInputErrorFocused,
 .OBFormFieldDateInput:focus,
 .OBFormFieldDateInputFocused,
 .OBFormFieldDateInputSelectedFocused
@@ -326,6 +331,7 @@
 
 .OBFormFieldSelectInput,
 .OBFormFieldSelectInputError,
+.OBFormFieldSelectInputErrorFocused,
 .OBFormFieldSelectInputSelectedFocused,
 .OBFormFieldSelectInputFocused,
 .OBFormFieldSelectInputDisabled,
--- a/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/Default/org.openbravo.client.application/ob-form-styles.js	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/Default/org.openbravo.client.application/ob-form-styles.js	Wed Oct 17 18:29:21 2012 +0200
@@ -428,6 +428,8 @@
   cellStyle: 'OBFormField',
   titleStyle: 'OBFormFieldLabel',
   textBoxStyle: 'OBFormFieldSelectInput',
+  textBoxStyleNormal: 'OBFormFieldSelectInput',
+  textBoxStyleError: 'OBFormFieldSelectInputError',
   controlStyle: 'OBFormFieldSelectControl',
   pickerIconSrc: OB.Styles.skinsPath + 'Default/org.openbravo.client.application/images/form/comboBoxPicker.png',
   pickerIconWidth: 21,
--- a/modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE.xml	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE.xml	Wed Oct 17 18:29:21 2012 +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.17839]]></VERSION>
+<!--D393BE6F22BB44B7B728259B34FC795A-->  <VERSION><![CDATA[1.0.18223]]></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	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Oct 17 18:29:21 2012 +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.17839]]></STARTVERSION>
+<!--DCE798FBC5B648F7A3C81A6941720A57-->  <STARTVERSION><![CDATA[2.1.18223]]></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	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE.xml	Wed Oct 17 18:29:21 2012 +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.17839]]></VERSION>
+<!--4B828F4D03264080AA1D2057B13F613C-->  <VERSION><![CDATA[2.1.18223]]></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	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Oct 17 18:29:21 2012 +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.17839]]></STARTVERSION>
+<!--26B041893E844A53AFA58BC326C4F0D7-->  <STARTVERSION><![CDATA[3.0.18223]]></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.17839]]></STARTVERSION>
+<!--3AB045DA35ED4CA58EF7EB5BF04CDE3F-->  <STARTVERSION><![CDATA[1.1.18223]]></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.17839]]></STARTVERSION>
+<!--D7BA4BB0844942C58DC46B9E23CF8E67-->  <STARTVERSION><![CDATA[2.0.18223]]></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	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE.xml	Wed Oct 17 18:29:21 2012 +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.17839]]></VERSION>
+<!--2758CD25B2704AF6BBAD10365FC82C06-->  <VERSION><![CDATA[2.1.18223]]></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	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Oct 17 18:29:21 2012 +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.17839]]></STARTVERSION>
+<!--15F51F03882F444CAB6593B4566DC929-->  <STARTVERSION><![CDATA[2.1.18223]]></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.17839]]></STARTVERSION>
+<!--E71B28FC949D481D9F59C17D01E46EF9-->  <STARTVERSION><![CDATA[3.0.18223]]></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.myob/web/org.openbravo.client.myob/js/ob-myopenbravo.js	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.myob/web/org.openbravo.client.myob/js/ob-myopenbravo.js	Wed Oct 17 18:29:21 2012 +0200
@@ -450,7 +450,7 @@
           });
           entryLayout.addMember(lbl);
           // if a standard window then show the new icon
-          if (recent.windowId && !recent.singleRecord && !recent.readOnly) {
+          if (recent.windowId && !recent.singleRecord && !recent.readOnly && !recent.editOrDeleteOnly) {
             // make a copy
             newRecent = isc.addProperties({}, recent);
             newRecent.command = 'NEW';
--- a/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE.xml	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE.xml	Wed Oct 17 18:29:21 2012 +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.17839]]></VERSION>
+<!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <VERSION><![CDATA[1.0.18223]]></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	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Oct 17 18:29:21 2012 +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.17839]]></STARTVERSION>
+<!--26558497C31140BFAB067BA4BC47D799-->  <STARTVERSION><![CDATA[2.1.18223]]></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.querylist/web/org.openbravo.client.querylist/js/ob-querylist-widget.js	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.querylist/web/org.openbravo.client.querylist/js/ob-querylist-widget.js	Wed Oct 17 18:29:21 2012 +0200
@@ -314,7 +314,8 @@
     var field = this.getField(colNum);
     if (field.isLink) {
       if (field.OB_TabId && field.OB_LinkExpression) {
-        OB.Utilities.openDirectView(field.OB_WindowId, field.OB_keyColumnName, field.OB_entityName, record[field.OB_LinkExpression]);
+        //To open the tab provided in the widget column. Refer https://issues.openbravo.com/view.php?id=17411.
+        OB.Utilities.openDirectTab(field.OB_TabId, record[field.OB_LinkExpression]);
       }
     }
   },
--- a/modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE.xml	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE.xml	Wed Oct 17 18:29:21 2012 +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.17839]]></VERSION>
+<!--FF8080812D842086012D844F3CC0003E-->  <VERSION><![CDATA[0.0.18223]]></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	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Oct 17 18:29:21 2012 +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.17839]]></STARTVERSION>
+<!--FF8080812D842086012D845002070046-->  <STARTVERSION><![CDATA[2.1.18223]]></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	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE.xml	Wed Oct 17 18:29:21 2012 +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.17839]]></VERSION>
+<!--2A5EE903D7974AC298C0504FBC4501A7-->  <VERSION><![CDATA[3.0.18223]]></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	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Oct 17 18:29:21 2012 +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.17839]]></STARTVERSION>
+<!--A3B449C4D5FE4D688CC58236FE33B802-->  <STARTVERSION><![CDATA[3.0.18223]]></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.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReport.html	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReport.html	Wed Oct 17 18:29:21 2012 +0200
@@ -277,9 +277,9 @@
         var myframe = getFrame('LayoutMDI') || top.opener;
         if (myframe) {
             if (isReceipt==='Y') {
-               myframe.OB.Utilities.openDirectTab('EB0466B2A22343F28773B356D292BC7E', recordId);
+               myframe.OB.Utilities.openDirectTab('60825C9E68644DBC9C530DDCABE05A6E', recordId);
             } else {
-               myframe.OB.Utilities.openDirectTab('A94442B27F664A41BF64735DFA76FB4D', recordId);
+               myframe.OB.Utilities.openDirectTab('7A8D43541F8C49F1BD8A431A0041BF89', recordId);
             }
         }
      }
--- a/modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE.xml	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE.xml	Wed Oct 17 18:29:21 2012 +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.17839]]></VERSION>
+<!--3A3A943684D64DEF9EC39F588A656848-->  <VERSION><![CDATA[1.1.18223]]></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	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Oct 17 18:29:21 2012 +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.17839]]></STARTVERSION>
+<!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <STARTVERSION><![CDATA[3.0.18223]]></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	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE.xml	Wed Oct 17 18:29:21 2012 +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.17839]]></VERSION>
+<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <VERSION><![CDATA[2.1.18223]]></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	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Oct 17 18:29:21 2012 +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.17839]]></STARTVERSION>
+<!--0BA071C783CC4984AC9C03BB7CAA87C7-->  <STARTVERSION><![CDATA[1.1.18223]]></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.17839]]></STARTVERSION>
+<!--3E531F0CD0A54130996F5AF3B6A2D01B-->  <STARTVERSION><![CDATA[2.0.18223]]></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.17839]]></STARTVERSION>
+<!--4FCE95802A854F7E8623AFF7C33D13EE-->  <STARTVERSION><![CDATA[3.0.18223]]></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.17839]]></STARTVERSION>
+<!--54AF8B39C55E4E7496902893ECD82786-->  <STARTVERSION><![CDATA[2.1.18223]]></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.17839]]></STARTVERSION>
+<!--D03C56D8A4E14F45A5466350E05C631F-->  <STARTVERSION><![CDATA[8.1.18223]]></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/DataSourceServlet.java	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DataSourceServlet.java	Wed Oct 17 18:29:21 2012 +0200
@@ -25,6 +25,7 @@
 import java.text.DecimalFormat;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
+import java.util.Calendar;
 import java.util.Date;
 import java.util.Enumeration;
 import java.util.HashMap;
@@ -262,6 +263,7 @@
     List<String> dateTimeCols = new ArrayList<String>();
     List<String> numericCols = new ArrayList<String>();
     Map<String, DecimalFormat> formats = new HashMap<String, DecimalFormat>();
+    int clientUTCOffsetMiliseconds;
 
     public QueryJSONWriterToCSV(HttpServletRequest request, HttpServletResponse response,
         Map<String, String> parameters, Entity entity) {
@@ -301,6 +303,11 @@
           log.warn("Warning: CSV Field separator is identical to the decimal separator. Changing the field separator to "
               + fieldSeparator + " to avoid generating a wrong CSV file");
         }
+        if (parameters.get("_UTCOffsetMiliseconds").length() > 0) {
+          clientUTCOffsetMiliseconds = Integer.parseInt(parameters.get("_UTCOffsetMiliseconds"));
+        } else {
+          clientUTCOffsetMiliseconds = 0;
+        }
         fieldProperties = new ArrayList<String>();
         if (parameters.get("viewState") != null
             && !parameters.get("viewState").toString().equals("undefined")) {
@@ -326,28 +333,39 @@
         // Now we calculate ref lists and nice property names
         final String userLanguageId = OBContext.getOBContext().getLanguage().getId();
         if (entity != null) {
+          final Map<String, Property> properties = new HashMap<String, Property>();
           for (Property prop : entity.getProperties()) {
             if (!fieldProperties.contains(prop.getName())) {
               continue;
             }
+            properties.put(prop.getName(), prop);
+          }
+          for (String fieldProperty : fieldProperties) {
+            if (fieldProperty.contains(DalUtil.FIELDSEPARATOR)) {
+              properties.put(fieldProperty, DalUtil.getPropertyFromPath(entity, fieldProperty));
+            }
+          }
+
+          for (String propKey : properties.keySet()) {
+            final Property prop = properties.get(propKey);
             Column col = OBDal.getInstance().get(Column.class, prop.getColumnId());
 
             if (prop.isAuditInfo()) {
               Element element = null;
-              if ("creationDate".equals(prop.getName())) {
+              if ("creationDate".equals(propKey)) {
                 element = OBViewUtil.createdElement;
-              } else if ("createdBy".equals(prop.getName())) {
+              } else if ("createdBy".equals(propKey)) {
                 element = OBViewUtil.createdByElement;
-              } else if ("updated".equals(prop.getName())) {
+              } else if ("updated".equals(propKey)) {
                 element = OBViewUtil.updatedElement;
-              } else if ("updatedBy".equals(prop.getName())) {
+              } else if ("updatedBy".equals(propKey)) {
                 element = OBViewUtil.updatedByElement;
               }
               if (element != null) {
-                niceFieldProperties.put(prop.getName(),
+                niceFieldProperties.put(propKey,
                     OBViewUtil.getLabel(element, element.getADElementTrlList()));
               } else {
-                niceFieldProperties.put(prop.getName(), col.getName());
+                niceFieldProperties.put(propKey, col.getName());
               }
             } else if (parameters.get("tab") != null && !parameters.get("tab").equals("")) {
               Tab tab = OBDal.getInstance().get(Tab.class, parameters.get("tab"));
@@ -355,21 +373,31 @@
                 if (field.getColumn() == null || !field.getColumn().getId().equals(col.getId())) {
                   continue;
                 }
-                niceFieldProperties.put(prop.getName(), field.getName());
+                niceFieldProperties.put(propKey, field.getName());
                 for (FieldTrl fieldTrl : field.getADFieldTrlList()) {
                   if (fieldTrl.getLanguage().getId().equals(userLanguageId)) {
-                    niceFieldProperties.put(prop.getName(), fieldTrl.getName());
+                    niceFieldProperties.put(propKey, fieldTrl.getName());
                   }
                 }
               }
             } else {
-              niceFieldProperties.put(prop.getName(), col.getName());
+              niceFieldProperties.put(propKey, col.getName());
             }
             UIDefinition uiDef = UIDefinitionController.getInstance().getUIDefinition(col.getId());
             if (uiDef instanceof NumberUIDefinition) {
-              formats.put(prop.getName(),
+              formats.put(propKey,
                   Utility.getFormat(vars, ((NumberUIDefinition) uiDef).getFormat()));
             }
+
+            // We also store the date properties
+            if (prop.isDate()) {
+              dateCols.add(propKey);
+            } else if (prop.isDatetime()) {
+              dateTimeCols.add(propKey);
+            } else if (prop.isPrimitive() && prop.isNumericType()) {
+              numericCols.add(propKey);
+            }
+
             if (!(prop.getDomainType() instanceof EnumerateDomainType)) {
               continue;
             }
@@ -393,19 +421,8 @@
               final Object[] row = (Object[]) o;
               reflists.put(row[0].toString(), row[1].toString());
             }
-            refListCols.add(prop.getName());
-            refLists.put(prop.getName(), reflists);
-          }
-
-          // We also store the date properties
-          for (Property prop : entity.getProperties()) {
-            if (prop.isDate()) {
-              dateCols.add(prop.getName());
-            } else if (prop.isDatetime()) {
-              dateTimeCols.add(prop.getName());
-            } else if (prop.isPrimitive() && prop.isNumericType()) {
-              numericCols.add(prop.getName());
-            }
+            refListCols.add(propKey);
+            refLists.put(propKey, reflists);
           }
         }
         if (fieldProperties.size() > 0) {
@@ -414,8 +431,10 @@
             if (i > 0) {
               writer.append(fieldSeparator);
             }
-            writer.append("\"").append(niceFieldProperties.get(fieldProperties.get(i)))
-                .append("\"");
+            if (niceFieldProperties.get(fieldProperties.get(i)) != null) {
+              writer.append("\"").append(niceFieldProperties.get(fieldProperties.get(i)))
+                  .append("\"");
+            }
           }
           propertiesWritten = true;
         }
@@ -515,12 +534,13 @@
           } else if (dateTimeCols.contains(key) && keyValue != null
               && !keyValue.toString().equals("null")) {
             final String repairedString = JsonUtils.convertFromXSDToJavaFormat(keyValue.toString());
-            Date date = JsonUtils.createDateTimeFormat().parse(repairedString);
+            Date localDate = JsonUtils.createDateTimeFormat().parse(repairedString);
+            Date clientTimezoneDate = convertFromLocalToClientTimezone(localDate);
             String pattern = RequestContext.get().getSessionAttribute("#AD_JAVADATETIMEFORMAT")
                 .toString();
             SimpleDateFormat dateFormat = new SimpleDateFormat(pattern);
             dateFormat.setLenient(true);
-            keyValue = dateFormat.format(date);
+            keyValue = dateFormat.format(clientTimezoneDate);
           }
 
           if (keyValue != null && !keyValue.toString().equals("null")) {
@@ -537,6 +557,22 @@
         throw new OBException("Error while exporting CSV information", e);
       }
     }
+
+    private Date convertFromLocalToClientTimezone(Date localDate) {
+      Calendar now = Calendar.getInstance();
+      Calendar calendar = Calendar.getInstance();
+      calendar.setTime(localDate);
+      calendar.set(Calendar.DATE, now.get(Calendar.DATE));
+      calendar.set(Calendar.MONTH, now.get(Calendar.MONTH));
+      calendar.set(Calendar.YEAR, now.get(Calendar.YEAR));
+
+      int gmtMillisecondOffset = (now.get(Calendar.ZONE_OFFSET) + now.get(Calendar.DST_OFFSET));
+      calendar.add(Calendar.MILLISECOND, -gmtMillisecondOffset);
+
+      calendar.add(Calendar.MILLISECOND, clientUTCOffsetMiliseconds);
+
+      return calendar.getTime();
+    }
   }
 
   private void handleException(Exception e, HttpServletResponse response) throws IOException {
--- a/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DefaultDataSourceService.java	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DefaultDataSourceService.java	Wed Oct 17 18:29:21 2012 +0200
@@ -230,11 +230,11 @@
           .createQuery(
               Field.class,
               "as f where f.tab.id = :tabId"
-                  + " and (exists (from f.aDFieldAccessList fa where fa.tabAccess.windowAccess.role.id = :roleId and fa.editableField = false and fa.ischeckonsave = true)"
-                  + "      or (not exists (from f.aDFieldAccessList fa where fa.tabAccess.windowAccess.role.id = :roleId)"
-                  + "          and exists (from f.tab.aDTabAccessList ta where ta.windowAccess.role.id = :roleId and ta.editableField = false)"
-                  + "          or not exists (from f.tab.aDTabAccessList  ta where  ta.windowAccess.role.id = :roleId)"
-                  + "          and exists (from ADWindowAccess wa where f.tab.window = wa.window and wa.role.id = :roleId and wa.editableField = false)))");
+                  + " and (exists (from f.aDFieldAccessList fa where fa.tabAccess.windowAccess.role.id = :roleId and fa.editableField = false and fa.active = true and fa.ischeckonsave = true)"
+                  + "      or (not exists (from f.aDFieldAccessList fa where fa.tabAccess.windowAccess.role.id = :roleId and fa.active = true)"
+                  + "          and exists (from f.tab.aDTabAccessList ta where ta.windowAccess.role.id = :roleId and ta.editableField = false and ta.active = true)"
+                  + "          or not exists (from f.tab.aDTabAccessList  ta where  ta.windowAccess.role.id = :roleId and ta.active = true)"
+                  + "          and exists (from ADWindowAccess wa where f.tab.window = wa.window and wa.role.id = :roleId and wa.editableField = false and wa.active = true)))");
       fieldQuery.setNamedParameter("tabId", tab.getId());
       fieldQuery.setNamedParameter("roleId", roleId);
       final Entity entity = ModelProvider.getInstance().getEntity(entityName);
--- a/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/ReadOnlyDataSourceService.java	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/ReadOnlyDataSourceService.java	Wed Oct 17 18:29:21 2012 +0200
@@ -63,8 +63,7 @@
     if (endRowStr != null) {
       doCount = true;
     }
-    boolean preventCountOperation = !parameters.containsKey(JsonConstants.NOCOUNT_PARAMETER)
-        || "true".equals(parameters.get(JsonConstants.NOCOUNT_PARAMETER));
+    boolean preventCountOperation = "true".equals(parameters.get(JsonConstants.NOCOUNT_PARAMETER));
 
     final List<JSONObject> jsonObjects = fetchJSONObject(parameters);
 
--- a/modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE.xml	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE.xml	Wed Oct 17 18:29:21 2012 +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.17839]]></VERSION>
+<!--FF8080813129ADA401312CA1222A0005-->  <VERSION><![CDATA[0.1.18223]]></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	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Oct 17 18:29:21 2012 +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.17839]]></STARTVERSION>
+<!--FF8080813141B198013141BA0F7D0012-->  <STARTVERSION><![CDATA[0.1.18223]]></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.17839]]></STARTVERSION>
+<!--FF8080813151AEE1013151C4ACE6001B-->  <STARTVERSION><![CDATA[2.1.18223]]></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.google/src-db/database/sourcedata/AD_TREENODE.xml	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_TREENODE.xml	Wed Oct 17 18:29:21 2012 +0200
@@ -8,7 +8,7 @@
 <!--3478924D8D8D4282A076A83565AFABAE-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--3478924D8D8D4282A076A83565AFABAE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--3478924D8D8D4282A076A83565AFABAE-->  <PARENT_ID><![CDATA[156]]></PARENT_ID>
-<!--3478924D8D8D4282A076A83565AFABAE-->  <SEQNO><![CDATA[160]]></SEQNO>
+<!--3478924D8D8D4282A076A83565AFABAE-->  <SEQNO><![CDATA[70]]></SEQNO>
 <!--3478924D8D8D4282A076A83565AFABAE--></AD_TREENODE>
 
 <!--C6C17508B4344449982EF8BE76D34966--><AD_TREENODE>
--- a/modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE.xml	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE.xml	Wed Oct 17 18:29:21 2012 +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.17839]]></VERSION>
+<!--FF8080813141B198013141B86DD70003-->  <VERSION><![CDATA[0.1.18223]]></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	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Oct 17 18:29:21 2012 +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.17839]]></STARTVERSION>
+<!--FF8080813141B198013141B8B21B0006-->  <STARTVERSION><![CDATA[3.0.18223]]></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	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.service.json/src-db/database/sourcedata/AD_MODULE.xml	Wed Oct 17 18:29:21 2012 +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.17839]]></VERSION>
+<!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <VERSION><![CDATA[2.0.18223]]></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	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.service.json/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Oct 17 18:29:21 2012 +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.17839]]></STARTVERSION>
+<!--9E3E7B42DB16405FB794496D309D7044-->  <STARTVERSION><![CDATA[3.0.18223]]></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.userinterface.selector/src-db/database/sourcedata/AD_MODULE.xml	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODULE.xml	Wed Oct 17 18:29:21 2012 +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.17839]]></VERSION>
+<!--5EB4F15C80684ACA904756BDC12ADBE5-->  <VERSION><![CDATA[2.1.18223]]></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	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Oct 17 18:29:21 2012 +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.17839]]></STARTVERSION>
+<!--38825CAED43941D38CA0C78DB04FCFA0-->  <STARTVERSION><![CDATA[8.1.18223]]></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.17839]]></STARTVERSION>
+<!--6DDE7B1A70174242AF82B5022FB89279-->  <STARTVERSION><![CDATA[2.1.18223]]></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.17839]]></STARTVERSION>
+<!--94F9CD2CB5EF4467A67475C786C984A7-->  <STARTVERSION><![CDATA[2.1.18223]]></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.17839]]></STARTVERSION>
+<!--BCCB5A08EC0446DE8BCE191C6BC607A4-->  <STARTVERSION><![CDATA[1.1.18223]]></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.17839]]></STARTVERSION>
+<!--C8DAC574B88649D08C9468521B343F12-->  <STARTVERSION><![CDATA[3.0.18223]]></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.17839]]></STARTVERSION>
+<!--F14EB17946BE4724A46F80CB1A47EC70-->  <STARTVERSION><![CDATA[2.1.18223]]></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/web/org.openbravo.userinterface.selector/js/ob-selector-item.js	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js	Wed Oct 17 18:29:21 2012 +0200
@@ -527,6 +527,7 @@
           if (record) {
             value = record[i];
             if (typeof value === 'undefined') {
+              form.hiddenInputs[this.outHiddenInputPrefix + outFields[i].suffix] = '';
               continue;
             }
             if (isc.isA.Number(value)) {
@@ -618,6 +619,11 @@
       requestProperties.params[OB.Constants.ORG_PARAMETER] = requestProperties.params.inpadOrgId;
     }
 
+    if (this.form.getFocusItem() !== this && !this.form.view.isShowingForm && this.getEnteredValue() === '' && this.savedEnteredValue) {
+      this.setElementValue(this.savedEnteredValue);
+      delete this.savedEnteredValue;
+    }
+
     var criteria = this.getPickListFilterCriteria(),
         i;
     for (i = 0; i < criteria.criteria.length; i++) {
@@ -708,6 +714,9 @@
         return '';
       }
     }
+    if (value && value !== '' && ret === '') {
+      this.savedEnteredValue = value;
+    }
     return ret;
   },
 
--- a/modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE.xml	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE.xml	Wed Oct 17 18:29:21 2012 +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.17839]]></VERSION>
+<!--96998CBC42744B3DBEE28AC8095C9335-->  <VERSION><![CDATA[2.0.18223]]></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	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Oct 17 18:29:21 2012 +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.17839]]></STARTVERSION>
+<!--39BF75AD9AB3453698BF5DE29E727AA9-->  <STARTVERSION><![CDATA[3.0.18223]]></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	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.userinterface.smartclient/src-db/database/sourcedata/AD_MODULE.xml	Wed Oct 17 18:29:21 2012 +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.17839]]></VERSION>
+<!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <VERSION><![CDATA[8.1.18223]]></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	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.userinterface.smartclient/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Oct 17 18:29:21 2012 +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.17839]]></STARTVERSION>
+<!--086331E18477496B8AC74D2CFEBD1307-->  <STARTVERSION><![CDATA[3.0.18223]]></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.17839]]></STARTVERSION>
+<!--DC5D4EF450244482BD2B458DAA496333-->  <STARTVERSION><![CDATA[2.1.18223]]></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.17839]]></STARTVERSION>
+<!--F2AF15C0AF5540E393D96BE506E20648-->  <STARTVERSION><![CDATA[1.1.18223]]></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.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js	Wed Oct 17 18:29:21 2012 +0200
@@ -567,6 +567,20 @@
   }
 });
 
+// To fix issue https://issues.openbravo.com/view.php?id=21786
+isc.ComboBoxItem.addProperties({
+  isPickListShown: function () {
+    return (this.pickList ? (this.pickList.isDrawn() && this.pickList.isVisible()) : false);
+  },
+
+  hidePicker: function () {
+    if (this.pickList) {
+      this.pickList.hideClickMask();
+      this.pickList.hide();
+    }
+  }
+});
+
 // overridden to never show a prompt. A prompt can be created manually 
 // when overriding for example the DataSource (see the OBStandardView).
 isc.RPCManager.showPrompt = false;
--- a/modules/org.openbravo.v3.datasets/src-db/database/sourcedata/AD_MODULE.xml	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.v3.datasets/src-db/database/sourcedata/AD_MODULE.xml	Wed Oct 17 18:29:21 2012 +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.17839]]></VERSION>
+<!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <VERSION><![CDATA[3.0.18223]]></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	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.v3.datasets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Oct 17 18:29:21 2012 +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.17839]]></STARTVERSION>
+<!--148A000EE9A04A3CA653B1296A00B8E6-->  <STARTVERSION><![CDATA[3.0.18223]]></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.17839]]></STARTVERSION>
+<!--30F966407A6F4E15965821BAEE34D25B-->  <STARTVERSION><![CDATA[3.0.18223]]></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.17839]]></STARTVERSION>
+<!--F93CE30003B24F8F8886510B0065EECC-->  <STARTVERSION><![CDATA[1.1.18223]]></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	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.v3.framework/src-db/database/sourcedata/AD_MODULE.xml	Wed Oct 17 18:29:21 2012 +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.17839]]></VERSION>
+<!--7E48CDD73B7E493A8BED4F7253E7C989-->  <VERSION><![CDATA[2.1.18223]]></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	Wed Oct 17 16:39:43 2012 +0200
+++ b/modules/org.openbravo.v3.framework/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Oct 17 18:29:21 2012 +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.17839]]></STARTVERSION>
+<!--01E1BCCEC9114DE0960538DF34E30E6F-->  <STARTVERSION><![CDATA[2.1.18223]]></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.17839]]></STARTVERSION>
+<!--025B181F63CA47B48A920F6983242390-->  <STARTVERSION><![CDATA[3.0.18223]]></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.17839]]></STARTVERSION>
+<!--054B4FEAF919478AA3FF27098A46D1D6-->  <STARTVERSION><![CDATA[2.1.18223]]></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.17839]]></STARTVERSION>
+<!--1FA6BAA6DC3A4434A6E62A0D1319A9D7-->  <STARTVERSION><![CDATA[1.0.18223]]></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.17839]]></STARTVERSION>
+<!--224754C3EF674C93B0D468F47BAAB824-->  <STARTVERSION><![CDATA[2.1.18223]]></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.17839]]></STARTVERSION>
+<!--5B72D24032DD4879A950194139D961B6-->  <STARTVERSION><![CDATA[2.1.18223]]></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.17839]]></STARTVERSION>
+<!--8730CA6A4224439D82E0DD31B3806E36-->  <STARTVERSION><![CDATA[1.0.18223]]></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.17839]]></STARTVERSION>
+<!--98C47FF058F8413B8A2B26036061446E-->  <STARTVERSION><![CDATA[8.1.18223]]></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.17839]]></STARTVERSION>
+<!--A6D7BA917B3B4DEABD7CA1BA00B01E8A-->  <STARTVERSION><![CDATA[2.0.18223]]></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.17839]]></STARTVERSION>
+<!--A9CB99330AF34944877F889DD8A0AB3C-->  <STARTVERSION><![CDATA[2.1.18223]]></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>