Merge temporary head for 3.0MP15.1
authorRM packaging bot <staff.rm@openbravo.com>
Fri, 05 Oct 2012 07:18:23 +0000
changeset 18129 c2ddbdabe555
parent 18122 c067ea513614 (diff)
parent 18128 f2f5c9c694d7 (current diff)
child 18130 1cd80d4b32bb
child 18147 04bea3d8f425
Merge temporary head for 3.0MP15.1
.hgsigs
.hgtags
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java
modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.service.json/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.service.json/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.userinterface.smartclient/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.userinterface.smartclient/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.v3.datasets/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.v3.datasets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.v3.framework/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.v3.framework/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.v3/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.v3/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
src-db/database/sourcedata/AD_COLUMN.xml
src-db/database/sourcedata/AD_MODULE.xml
--- a/.hgsigs	Wed Oct 03 17:45:21 2012 +0000
+++ b/.hgsigs	Fri Oct 05 07:18:23 2012 +0000
@@ -78,5 +78,8 @@
 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
--- a/.hgtags	Wed Oct 03 17:45:21 2012 +0000
+++ b/.hgtags	Fri Oct 05 07:18:23 2012 +0000
@@ -89,5 +89,8 @@
 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
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_GEN_PAYMENTSCHEDULE_INV.xml	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_GEN_PAYMENTSCHEDULE_INV.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -76,6 +76,9 @@
 v_invoiceno_trl AD_Message.MsgText%TYPE;
 v_payment_desc AD_OrgInfo.em_aprm_payment_desc%TYPE;
 v_description_first BOOLEAN := TRUE;
+v_finacct_currency VARCHAR2(32);
+v_rate NUMBER;
+v_PricePr NUMBER;
 
 TYPE RECORD IS REF CURSOR;
 Cur_Params RECORD;
@@ -590,7 +593,8 @@
                 CASE WHEN v_IsSOTrx='Y' THEN AUTOMATIC_DEPOSIT ELSE AUTOMATIC_WITHDRAWN END AS CreateFinTransaction,
                 CASE WHEN v_IsSOTrx='Y' THEN payin_execution_type ELSE payout_execution_type END AS ExecutionType,
                 CASE WHEN v_IsSOTrx='Y' THEN payin_deferred ELSE payout_deferred END AS deferred,
-                CASE WHEN v_IsSOTrx='Y' THEN payin_execution_process_id ELSE payout_execution_process_id END AS execution_process_id
+                CASE WHEN v_IsSOTrx='Y' THEN payin_execution_process_id ELSE payout_execution_process_id END AS execution_process_id,
+                CASE WHEN v_IsSoTrx='Y' THEN Payin_IsMulticurrency ELSE Payout_IsMulticurrency END AS multicurrency
               FROM FIN_FINACC_PAYMENTMETHOD
               WHERE FIN_FINACC_PAYMENTMETHOD.FIN_PAYMENTMETHOD_ID = cur_paymentschedule.FIN_PAYMENTMETHOD_ID
                 AND FIN_FINACC_PAYMENTMETHOD.FIN_FINANCIAL_ACCOUNT_ID = v_Financial_Account_ID
@@ -760,19 +764,41 @@
                 v_ResultStr:='Generating FIN_FINACC_TRANSACTION';
                 v_FIN_FINACC_TRANSACTION_ID := GET_UUID();
                 SELECT COALESCE(MAX(LINE),0) INTO v_Line FROM FIN_FINACC_TRANSACTION WHERE FIN_FINANCIAL_ACCOUNT_ID = v_Financial_Account_ID;
-                INSERT INTO fin_finacc_transaction(
-                  fin_finacc_transaction_id, ad_client_id, ad_org_id, created,
-                  createdby, updated, updatedby, isactive, c_currency_id, fin_financial_account_id,
-                  line, fin_payment_id, dateacct, c_glitem_id, status, paymentamt,
-                  depositamt, processed, processing, posted, c_project_id, c_campaign_id,
-                  c_activity_id, user1_id, user2_id, trxtype, statementdate, description,
-                  fin_reconciliation_id)
-                VALUES (v_FIN_FINACC_TRANSACTION_ID, v_client_id, cur_paymentschedule.AD_ORG_ID, now(), p_user,
-                  now(), p_user, 'Y', cur_paymentschedule.C_CURRENCY_ID, v_Financial_Account_ID,
-                  v_Line, v_FIN_PAYMENT_ID, cur_paymentschedule.DUEDATE, NULL, CASE WHEN v_IsSOTrx='Y' THEN 'RDNC' ELSE 'PWNC' END, CASE WHEN v_IsSOTrx='N' THEN cur_paymentschedule.OUTSTANDINGAMT ELSE 0 END,
-                  CASE WHEN v_IsSOTrx='Y' THEN cur_paymentschedule.OUTSTANDINGAMT ELSE 0 END, 'Y', 'N', 'N', v_project_id, v_campaign_id,
-                  v_activity_id, v_user1, v_user2, CASE WHEN v_IsSOTrx='N' THEN 'BPW' ELSE 'BPD' END, cur_paymentschedule.DUEDATE, 'Invoice No.: ' || v_documentno,
-                  NULL);
+                --check the currency of the invoice and the currency of the financial account
+                select c_currency_id into v_finacct_currency from FIN_Financial_Account where FIN_Financial_Account_id =v_Financial_Account_ID;
+                IF (v_finacct_currency<>cur_paymentschedule.C_CURRENCY_ID AND cur_finaccpaymentmethod.multicurrency='Y') THEN
+                  v_rate := C_CURRENCY_RATE(cur_paymentschedule.C_CURRENCY_ID, v_finacct_currency, cur_paymentschedule.DUEDATE, NULL, v_client_id, cur_paymentschedule.AD_ORG_ID );
+                  SELECT priceprecision into v_PricePr from C_CURRENCY where c_currency_id = v_finacct_currency;
+                  INSERT INTO fin_finacc_transaction(
+                    fin_finacc_transaction_id, ad_client_id, ad_org_id, created,
+                    createdby, updated, updatedby, isactive, c_currency_id, fin_financial_account_id,
+                    line, fin_payment_id, dateacct, c_glitem_id, status, paymentamt,
+                    depositamt, processed, processing, posted, c_project_id, c_campaign_id,
+                    c_activity_id, user1_id, user2_id, trxtype, statementdate, description,
+                    fin_reconciliation_id, foreign_currency_id, foreign_convert_rate, foreign_amount)
+                  VALUES (v_FIN_FINACC_TRANSACTION_ID, v_client_id, cur_paymentschedule.AD_ORG_ID, now(), p_user,
+                    now(), p_user, 'Y', v_finacct_currency, v_Financial_Account_ID,
+                    v_Line, v_FIN_PAYMENT_ID, cur_paymentschedule.DUEDATE, NULL, CASE WHEN v_IsSOTrx='Y' THEN 'RDNC' ELSE 'PWNC' END, CASE WHEN v_IsSOTrx='N' THEN ROUND(cur_paymentschedule.OUTSTANDINGAMT*v_rate, v_PricePr) ELSE 0 END,
+                    CASE WHEN v_IsSOTrx='Y' THEN ROUND(cur_paymentschedule.OUTSTANDINGAMT*v_rate, v_PricePr) ELSE 0 END, 'Y', 'N', 'N', v_project_id, v_campaign_id,
+                    v_activity_id, v_user1, v_user2, CASE WHEN v_IsSOTrx='N' THEN 'BPW' ELSE 'BPD' END, cur_paymentschedule.DUEDATE, 'Invoice No.: ' || v_documentno,
+                    NULL, cur_paymentschedule.C_CURRENCY_ID, v_rate , CASE WHEN v_IsSOTrx='N' THEN cur_paymentschedule.OUTSTANDINGAMT ELSE cur_paymentschedule.OUTSTANDINGAMT END);
+                ELSE
+                  INSERT INTO fin_finacc_transaction(
+                    fin_finacc_transaction_id, ad_client_id, ad_org_id, created,
+                    createdby, updated, updatedby, isactive, c_currency_id, fin_financial_account_id,
+                    line, fin_payment_id, dateacct, c_glitem_id, status, paymentamt,
+                    depositamt, processed, processing, posted, c_project_id, c_campaign_id,
+                    c_activity_id, user1_id, user2_id, trxtype, statementdate, description,
+                    fin_reconciliation_id)
+                  VALUES (v_FIN_FINACC_TRANSACTION_ID, v_client_id, cur_paymentschedule.AD_ORG_ID, now(), p_user,
+                    now(), p_user, 'Y', cur_paymentschedule.C_CURRENCY_ID, v_Financial_Account_ID,
+                    v_Line, v_FIN_PAYMENT_ID, cur_paymentschedule.DUEDATE, NULL, CASE WHEN v_IsSOTrx='Y' THEN 'RDNC' ELSE 'PWNC' END, CASE WHEN v_IsSOTrx='N' THEN cur_paymentschedule.OUTSTANDINGAMT ELSE 0 END,
+                    CASE WHEN v_IsSOTrx='Y' THEN cur_paymentschedule.OUTSTANDINGAMT ELSE 0 END, 'Y', 'N', 'N', v_project_id, v_campaign_id,
+                    v_activity_id, v_user1, v_user2, CASE WHEN v_IsSOTrx='N' THEN 'BPW' ELSE 'BPD' END, cur_paymentschedule.DUEDATE, 'Invoice No.: ' || v_documentno,
+                    NULL);
+                END IF;
+                
+                
                 UPDATE FIN_PAYMENT SET STATUS = CASE WHEN v_IsSOTrx='Y' THEN 'RDNC' ELSE 'PWNC' END
                   WHERE FIN_PAYMENT_ID = v_FIN_PAYMENT_ID;
                   --UPDATE FINANCIAL ACCOUNT CURRENT BALANCE
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_ELEMENT.xml	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_ELEMENT.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -599,8 +599,8 @@
 <!--C5BB574D9652494086707528FF8175D6-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--C5BB574D9652494086707528FF8175D6-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--C5BB574D9652494086707528FF8175D6-->  <COLUMNNAME><![CDATA[EM_Aprm_Payment_Proposal_Pe]]></COLUMNNAME>
-<!--C5BB574D9652494086707528FF8175D6-->  <NAME><![CDATA[Payment Proposal Pick and Edit Lines]]></NAME>
-<!--C5BB574D9652494086707528FF8175D6-->  <PRINTNAME><![CDATA[Payment Proposal Pick and Edit Lines]]></PRINTNAME>
+<!--C5BB574D9652494086707528FF8175D6-->  <NAME><![CDATA[Select Expected Payments]]></NAME>
+<!--C5BB574D9652494086707528FF8175D6-->  <PRINTNAME><![CDATA[Select Expected Payments]]></PRINTNAME>
 <!--C5BB574D9652494086707528FF8175D6-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--C5BB574D9652494086707528FF8175D6-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--C5BB574D9652494086707528FF8175D6--></AD_ELEMENT>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -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>
@@ -13009,6 +13009,7 @@
 <!--BC1D6E2C80084926A4C0C50D50231568-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
 <!--BC1D6E2C80084926A4C0C50D50231568-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
 <!--BC1D6E2C80084926A4C0C50D50231568-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--BC1D6E2C80084926A4C0C50D50231568-->  <EM_OBUIAPP_VALIDATOR><![CDATA[OB.APRM.validatePaymentProposalPickAndEdit]]></EM_OBUIAPP_VALIDATOR>
 <!--BC1D6E2C80084926A4C0C50D50231568-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--BC1D6E2C80084926A4C0C50D50231568--></AD_FIELD>
 
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MESSAGE.xml	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MESSAGE.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -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>
@@ -231,6 +242,17 @@
 <!--49C16126D1A141C398175B0632C08F95-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--49C16126D1A141C398175B0632C08F95--></AD_MESSAGE>
 
+<!--4EA449F1999B4B01B02840DC7AF832D9--><AD_MESSAGE>
+<!--4EA449F1999B4B01B02840DC7AF832D9-->  <AD_MESSAGE_ID><![CDATA[4EA449F1999B4B01B02840DC7AF832D9]]></AD_MESSAGE_ID>
+<!--4EA449F1999B4B01B02840DC7AF832D9-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--4EA449F1999B4B01B02840DC7AF832D9-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--4EA449F1999B4B01B02840DC7AF832D9-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--4EA449F1999B4B01B02840DC7AF832D9-->  <VALUE><![CDATA[APRM_NotAllowWriteOff]]></VALUE>
+<!--4EA449F1999B4B01B02840DC7AF832D9-->  <MSGTEXT><![CDATA[This action is not allowed, write off limit exceeded]]></MSGTEXT>
+<!--4EA449F1999B4B01B02840DC7AF832D9-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--4EA449F1999B4B01B02840DC7AF832D9-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--4EA449F1999B4B01B02840DC7AF832D9--></AD_MESSAGE>
+
 <!--53ED8846C7984389AF83AC1DE983859E--><AD_MESSAGE>
 <!--53ED8846C7984389AF83AC1DE983859E-->  <AD_MESSAGE_ID><![CDATA[53ED8846C7984389AF83AC1DE983859E]]></AD_MESSAGE_ID>
 <!--53ED8846C7984389AF83AC1DE983859E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE.xml	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -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.17889]]></VERSION>
+<!--A918E3331C404B889D69AA9BFAFB23AC-->  <VERSION><![CDATA[3.0.18121]]></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>
@@ -25,7 +25,7 @@
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <UPDATEINFO><![CDATA[Fixed issue with document sequence numbers reset in case of applying dataset second time.
 Fixed issue 15305.]]></UPDATEINFO>
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <REFERENCEDATAINFO><![CDATA[Document types and default algorithm for bank statement auto matching]]></REFERENCEDATAINFO>
-<!--A918E3331C404B889D69AA9BFAFB23AC-->  <VERSION_LABEL><![CDATA[MP15.1]]></VERSION_LABEL>
+<!--A918E3331C404B889D69AA9BFAFB23AC-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--A918E3331C404B889D69AA9BFAFB23AC--></AD_MODULE>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -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.17889]]></STARTVERSION>
+<!--89326AE95DAD449D85DFAB2C5B1C6683-->  <STARTVERSION><![CDATA[2.1.18121]]></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.17889]]></STARTVERSION>
+<!--B97FC854C6DD41E692161585645A900F-->  <STARTVERSION><![CDATA[3.0.18121]]></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_PROCESS_PARA.xml	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_PROCESS_PARA.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -123,7 +123,7 @@
 <!--8BEBA07E78124B2B92B764D9B452B209-->  <FIELDLENGTH><![CDATA[100]]></FIELDLENGTH>
 <!--8BEBA07E78124B2B92B764D9B452B209-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
 <!--8BEBA07E78124B2B92B764D9B452B209-->  <ISRANGE><![CDATA[N]]></ISRANGE>
-<!--8BEBA07E78124B2B92B764D9B452B209-->  <DEFAULTVALUE><![CDATA[@C_GLItem_ID@]]></DEFAULTVALUE>
+<!--8BEBA07E78124B2B92B764D9B452B209-->  <DEFAULTVALUE><![CDATA[@SQL=SELECT name FROM C_GLItem WHERE C_GLItem_ID=@C_GLItem_ID@]]></DEFAULTVALUE>
 <!--8BEBA07E78124B2B92B764D9B452B209-->  <AD_ELEMENT_ID><![CDATA[800080]]></AD_ELEMENT_ID>
 <!--8BEBA07E78124B2B92B764D9B452B209--></AD_PROCESS_PARA>
 
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_TAB.xml	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_TAB.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -304,7 +304,7 @@
 <!--9380E9AFB1074FB98030E5549D7FF346-->  <SEQNO><![CDATA[50]]></SEQNO>
 <!--9380E9AFB1074FB98030E5549D7FF346-->  <TABLEVEL><![CDATA[1]]></TABLEVEL>
 <!--9380E9AFB1074FB98030E5549D7FF346-->  <ISSINGLEROW><![CDATA[N]]></ISSINGLEROW>
-<!--9380E9AFB1074FB98030E5549D7FF346-->  <ISINFOTAB><![CDATA[Y]]></ISINFOTAB>
+<!--9380E9AFB1074FB98030E5549D7FF346-->  <ISINFOTAB><![CDATA[N]]></ISINFOTAB>
 <!--9380E9AFB1074FB98030E5549D7FF346-->  <ISTRANSLATIONTAB><![CDATA[N]]></ISTRANSLATIONTAB>
 <!--9380E9AFB1074FB98030E5549D7FF346-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--9380E9AFB1074FB98030E5549D7FF346-->  <HASTREE><![CDATA[N]]></HASTREE>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_TEXTINTERFACES.xml	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_TEXTINTERFACES.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -407,6 +407,17 @@
 <!--3E2658BC7DB84BA5927989BB52FD1BF0-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--3E2658BC7DB84BA5927989BB52FD1BF0--></AD_TEXTINTERFACES>
 
+<!--3ED793E7D0FE4C098FE79C589C292B6E--><AD_TEXTINTERFACES>
+<!--3ED793E7D0FE4C098FE79C589C292B6E-->  <AD_TEXTINTERFACES_ID><![CDATA[3ED793E7D0FE4C098FE79C589C292B6E]]></AD_TEXTINTERFACES_ID>
+<!--3ED793E7D0FE4C098FE79C589C292B6E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--3ED793E7D0FE4C098FE79C589C292B6E-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--3ED793E7D0FE4C098FE79C589C292B6E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--3ED793E7D0FE4C098FE79C589C292B6E-->  <TEXT><![CDATA[Write off the difference (Above limit)]]></TEXT>
+<!--3ED793E7D0FE4C098FE79C589C292B6E-->  <FILENAME><![CDATA[/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.html]]></FILENAME>
+<!--3ED793E7D0FE4C098FE79C589C292B6E-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--3ED793E7D0FE4C098FE79C589C292B6E-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--3ED793E7D0FE4C098FE79C589C292B6E--></AD_TEXTINTERFACES>
+
 <!--3F26CEA4A0D9445EBC5B92785185D207--><AD_TEXTINTERFACES>
 <!--3F26CEA4A0D9445EBC5B92785185D207-->  <AD_TEXTINTERFACES_ID><![CDATA[3F26CEA4A0D9445EBC5B92785185D207]]></AD_TEXTINTERFACES_ID>
 <!--3F26CEA4A0D9445EBC5B92785185D207-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -869,6 +880,17 @@
 <!--745D4AD864BB431BB56352040E0E9C84-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--745D4AD864BB431BB56352040E0E9C84--></AD_TEXTINTERFACES>
 
+<!--753CC44B776D4A55901CAD9D92D458AE--><AD_TEXTINTERFACES>
+<!--753CC44B776D4A55901CAD9D92D458AE-->  <AD_TEXTINTERFACES_ID><![CDATA[753CC44B776D4A55901CAD9D92D458AE]]></AD_TEXTINTERFACES_ID>
+<!--753CC44B776D4A55901CAD9D92D458AE-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--753CC44B776D4A55901CAD9D92D458AE-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--753CC44B776D4A55901CAD9D92D458AE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--753CC44B776D4A55901CAD9D92D458AE-->  <TEXT><![CDATA[Write off the difference (Above limit)]]></TEXT>
+<!--753CC44B776D4A55901CAD9D92D458AE-->  <FILENAME><![CDATA[/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromTransaction.html]]></FILENAME>
+<!--753CC44B776D4A55901CAD9D92D458AE-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--753CC44B776D4A55901CAD9D92D458AE-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--753CC44B776D4A55901CAD9D92D458AE--></AD_TEXTINTERFACES>
+
 <!--756D726BEF3D402985AAD12657C5898D--><AD_TEXTINTERFACES>
 <!--756D726BEF3D402985AAD12657C5898D-->  <AD_TEXTINTERFACES_ID><![CDATA[756D726BEF3D402985AAD12657C5898D]]></AD_TEXTINTERFACES_ID>
 <!--756D726BEF3D402985AAD12657C5898D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -2871,4 +2893,15 @@
 <!--FDC49CBE576447578B4648FB57C3C89C-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--FDC49CBE576447578B4648FB57C3C89C--></AD_TEXTINTERFACES>
 
+<!--FE926BB57B7C496CB4859FC079AFA1BA--><AD_TEXTINTERFACES>
+<!--FE926BB57B7C496CB4859FC079AFA1BA-->  <AD_TEXTINTERFACES_ID><![CDATA[FE926BB57B7C496CB4859FC079AFA1BA]]></AD_TEXTINTERFACES_ID>
+<!--FE926BB57B7C496CB4859FC079AFA1BA-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FE926BB57B7C496CB4859FC079AFA1BA-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FE926BB57B7C496CB4859FC079AFA1BA-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FE926BB57B7C496CB4859FC079AFA1BA-->  <TEXT><![CDATA[Write off the difference (Above limit)]]></TEXT>
+<!--FE926BB57B7C496CB4859FC079AFA1BA-->  <FILENAME><![CDATA[/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.html]]></FILENAME>
+<!--FE926BB57B7C496CB4859FC079AFA1BA-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--FE926BB57B7C496CB4859FC079AFA1BA-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--FE926BB57B7C496CB4859FC079AFA1BA--></AD_TEXTINTERFACES>
+
 </data>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_VAL_RULE.xml	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_VAL_RULE.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -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-db/database/sourcedata/OBUIAPP_PARAMETER.xml	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/OBUIAPP_PARAMETER.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -146,7 +146,7 @@
 <!--BC5E638E184C4F3AB36B9DA574E0E8BB-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--BC5E638E184C4F3AB36B9DA574E0E8BB-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--BC5E638E184C4F3AB36B9DA574E0E8BB-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
-<!--BC5E638E184C4F3AB36B9DA574E0E8BB-->  <NAME><![CDATA[Payment Proposal Pick and Edit Lines]]></NAME>
+<!--BC5E638E184C4F3AB36B9DA574E0E8BB-->  <NAME><![CDATA[Select Expected Payments]]></NAME>
 <!--BC5E638E184C4F3AB36B9DA574E0E8BB-->  <SEQNO><![CDATA[10]]></SEQNO>
 <!--BC5E638E184C4F3AB36B9DA574E0E8BB-->  <AD_REFERENCE_ID><![CDATA[FF80818132D8F0F30132D9BC395D0038]]></AD_REFERENCE_ID>
 <!--BC5E638E184C4F3AB36B9DA574E0E8BB-->  <AD_REFERENCE_VALUE_ID><![CDATA[FB9C3B9C927A4AE5A554B952D67FAFED]]></AD_REFERENCE_VALUE_ID>
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/PaymentProposalPickEditLines.java	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/PaymentProposalPickEditLines.java	Fri Oct 05 07:18:23 2012 +0000
@@ -21,6 +21,7 @@
 
 import java.math.BigDecimal;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 import org.apache.log4j.Logger;
@@ -34,6 +35,7 @@
 import org.openbravo.client.kernel.RequestContext;
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.service.OBDal;
+import org.openbravo.dal.service.OBDao;
 import org.openbravo.erpCommon.utility.OBMessageUtils;
 import org.openbravo.model.financialmgmt.payment.FIN_PaymentMethod;
 import org.openbravo.model.financialmgmt.payment.FIN_PaymentPropDetail;
@@ -63,20 +65,19 @@
       FIN_PaymentMethod paymentMethod = OBDal.getInstance().get(FIN_PaymentMethod.class,
           strPaymentMethodId);
 
-      if (cleanPaymentProposalDetails(paymentProposal)) {
-        HashMap<String, String> map = createPaymentProposalDetails(jsonRequest, paymentMethod);
-        jsonRequest = new JSONObject();
+      List<String> idList = OBDao.getIDListFromOBObject(paymentProposal
+          .getFINPaymentPropDetailList());
+      HashMap<String, String> map = createPaymentProposalDetails(jsonRequest, paymentMethod, idList);
+      jsonRequest = new JSONObject();
 
-        JSONObject errorMessage = new JSONObject();
-        errorMessage.put("severity", "success");
-        errorMessage.put("text", OBMessageUtils.messageBD("Success"));
-        if (map.get("DifferentPaymentMethod").equals("true")) {
-          errorMessage.put("severity", "warning");
-          errorMessage.put("text",
-              OBMessageUtils.messageBD("APRM_Different_PaymentMethod_Selected"));
-        }
-        jsonRequest.put("message", errorMessage);
+      JSONObject errorMessage = new JSONObject();
+      errorMessage.put("severity", "success");
+      errorMessage.put("text", OBMessageUtils.messageBD("Success"));
+      if (map.get("DifferentPaymentMethod").equals("true")) {
+        errorMessage.put("severity", "warning");
+        errorMessage.put("text", OBMessageUtils.messageBD("APRM_Different_PaymentMethod_Selected"));
       }
+      jsonRequest.put("message", errorMessage);
 
     } catch (Exception e) {
       OBDal.getInstance().rollbackAndClose();
@@ -100,40 +101,21 @@
     return jsonRequest;
   }
 
-  private boolean cleanPaymentProposalDetails(FIN_PaymentProposal paymentProposal) {
-    if (paymentProposal == null) {
-      return false;
-    } else if (paymentProposal.getFINPaymentPropDetailList().isEmpty()) {
-      // nothing to delete.
-      return true;
-    }
-    try {
-      paymentProposal.getFINPaymentPropDetailList().clear();
-      paymentProposal.setAmount(BigDecimal.ZERO);
-      paymentProposal.setWriteoffAmount(BigDecimal.ZERO);
-      OBDal.getInstance().save(paymentProposal);
-      OBDal.getInstance().flush();
-    } catch (Exception e) {
-      log.error(e.getMessage(), e);
-      return false;
-    }
-    return true;
-  }
-
   private HashMap<String, String> createPaymentProposalDetails(JSONObject jsonRequest,
-      FIN_PaymentMethod paymentMethod) throws JSONException, OBException {
+      FIN_PaymentMethod paymentMethod, List<String> idList) throws JSONException, OBException {
 
     HashMap<String, String> map = new HashMap<String, String>();
     map.put("DifferentPaymentMethod", "false");
     map.put("Count", "0");
     JSONArray selectedLines = jsonRequest.getJSONArray("_selection");
-    // if no lines selected don't do anything.
-    if (selectedLines.length() == 0) {
-      return map;
-    }
     final String strPaymentProposalId = jsonRequest.getString("Fin_Payment_Proposal_ID");
     FIN_PaymentProposal paymentProposal = OBDal.getInstance().get(FIN_PaymentProposal.class,
         strPaymentProposalId);
+    // if no lines selected don't do anything.
+    if (selectedLines.length() == 0) {
+      removeNonSelectedLines(idList, paymentProposal);
+      return map;
+    }
     BigDecimal totalAmount = BigDecimal.ZERO, totalWriteOff = BigDecimal.ZERO;
     int cont = 0;
     String differentPaymentMethod = "false";
@@ -148,7 +130,17 @@
         if (!paymentMethod.equals(linePaymentMethod)) {
           differentPaymentMethod = "true";
         }
-        FIN_PaymentPropDetail newPPD = OBProvider.getInstance().get(FIN_PaymentPropDetail.class);
+
+        FIN_PaymentPropDetail newPPD = null;
+        String strPpdId = selectedLine.getString("id");
+        boolean notExistsPayPropLine = idList.contains(strPpdId);
+        if (notExistsPayPropLine) {
+          newPPD = OBDal.getInstance().get(FIN_PaymentPropDetail.class, strPpdId);
+          idList.remove(strPpdId);
+        } else {
+          newPPD = OBProvider.getInstance().get(FIN_PaymentPropDetail.class);
+        }
+
         newPPD.setOrganization(paymentProposal.getOrganization());
         newPPD.setClient(paymentProposal.getClient());
         newPPD.setCreatedBy(paymentProposal.getCreatedBy());
@@ -172,6 +164,8 @@
       }
     }
 
+    removeNonSelectedLines(idList, paymentProposal);
+
     paymentProposal.setAmount(totalAmount);
     paymentProposal.setWriteoffAmount(totalWriteOff);
     OBDal.getInstance().save(paymentProposal);
@@ -179,4 +173,16 @@
     map.put("Count", Integer.toString(cont));
     return map;
   }
+
+  private void removeNonSelectedLines(List<String> idList, FIN_PaymentProposal paymentProposal) {
+    if (idList.size() > 0) {
+      for (String id : idList) {
+        FIN_PaymentPropDetail ppd = OBDal.getInstance().get(FIN_PaymentPropDetail.class, id);
+        paymentProposal.getFINPaymentPropDetailList().remove(ppd);
+        OBDal.getInstance().remove(ppd);
+      }
+      OBDal.getInstance().save(paymentProposal);
+      OBDal.getInstance().flush();
+    }
+  }
 }
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.html	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.html	Fri Oct 05 07:18:23 2012 +0000
@@ -48,6 +48,7 @@
 <script language="JavaScript" src="../../../../../web/js/jscalendar/lang/calendar-es.js" type="text/javascript" id="fieldCalendar"></script>
 <script language="JavaScript" src="../../../../../web/js/default/DateTextBox.js" type="text/javascript"></script>
 <script language="JavaScript" src="../../../../../web/org.openbravo.advpaymentmngt/FIN_Utilities.js" type="text/javascript"></script>
+<script language="JavaScript" src="../../../../../web/js/appStatus.js" type="text/javascript"></script>
 <script type="text/javascript">
   window.onunload = reloadOpener; // reloads opener on closing
 </script>
@@ -61,6 +62,74 @@
 </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++) {
+      if (chk[i].checked && keepSelection) {
+        continue;
+      }
+      scheduledPaymentDetailId = frm.elements["inpRecordId" + i].value;
+      outstandingAmount = frm.elements["inpRecordAmt" + scheduledPaymentDetailId].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)) {
@@ -339,6 +408,14 @@
   var display = ( invCurrency && accountCurrency && invCurrency != accountCurrency );
 
   displayLogicElement('multiCurrencyRow', display );
+  if (document.frmMain.strNotAllowExchange.value === 'Y' && display) {  
+      readOnlyLogicElement('paramExchangeRate', true);
+      readOnlyLogicElement('paramActualConverted', true);
+   }
+  else {
+      readOnlyLogicElement('paramExchangeRate', false);
+      readOnlyLogicElement('paramActualConverted', false);
+  }
 }
 </script>
 <script language="JavaScript" type="text/javascript">
@@ -412,7 +489,7 @@
         }
       }
       else{
-          updateData(chk[i].value, chk[i].checked, drivenByGrid,false);
+          updateData(chk[i].value, chk[i].checked, drivenByGrid,true);
       }
     }
   }
@@ -697,6 +774,11 @@
   <input type="hidden" name="strElement_AY" id="paramStrElement_AY" value=""/>
   <input type="hidden" name="strElement_SR" id="paramStrElement_SR" value=""/>
   <input type="hidden" name="strElement_MC" id="paramStrElement_MC" value=""/>
+  <input type="hidden" name="strNotAllowExchange" id="paramStrNotAllowExchange" value=""/>
+  <input type="hidden" name="strWriteOffLimit" id="paramStrWriteOffLimit" value=""/>
+  <input type="hidden" name="strtypewriteoff" id="paramStrtypewriteoff" value=""/>
+  <input type="hidden" name="strAmountwriteoff" id="paramStrAmountwriteoff" value=""/>
+  
   <div class="Popup_ContentPane_CircleLogo">
     <div class="Popup_WindowLogo">
       <img class="Popup_WindowLogo_Icon Popup_WindowLogo_Icon_process" src="../../../../../web/images/blank.gif" border=0/></img>
@@ -1468,6 +1550,12 @@
                             </td>
                             <td><span class="LabelText">Write off the difference</span></td>
                           </tr>
+                           <tr id="writeofflimit">
+                            <td class="Radio_Check_ContentCell" >
+                              <input type="radio" name="inpDifferenceAction" value="writeofflimit" id="radiolimit" DISABLED/>
+                            </td>
+                            <td><span class="LabelText">Write off the difference (Above limit)</span></td>
+                          </tr>       
                         </table>
                       </td>
                     </tr>
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.java	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.java	Fri Oct 05 07:18:23 2012 +0000
@@ -60,6 +60,7 @@
 import org.openbravo.model.common.enterprise.Organization;
 import org.openbravo.model.common.plm.Product;
 import org.openbravo.model.financialmgmt.gl.GLItem;
+import org.openbravo.model.financialmgmt.payment.FIN_FinancialAccount;
 import org.openbravo.model.financialmgmt.payment.FIN_Payment;
 import org.openbravo.model.financialmgmt.payment.FIN_PaymentDetail;
 import org.openbravo.model.financialmgmt.payment.FIN_PaymentScheduleDetail;
@@ -84,8 +85,9 @@
       String strTabId = vars.getGlobalVariable("inpTabId", "AddOrderOrInvoice|Tab_ID");
       String strPaymentId = vars.getGlobalVariable("inpfinPaymentId", strWindowId + "|"
           + "FIN_Payment_ID");
+      String strFinancialAccountId = vars.getStringParameter("inpfinFinancialAccountId");
 
-      printPage(response, vars, strPaymentId, strWindowId, strTabId);
+      printPage(response, vars, strPaymentId, strWindowId, strTabId, strFinancialAccountId);
 
     } else if (vars.commandIn("GRIDLIST")) {
       String strBusinessPartnerId = vars.getRequestGlobalVariable("inpBusinessPartnerId", "");
@@ -337,8 +339,8 @@
   }
 
   private void printPage(HttpServletResponse response, VariablesSecureApp vars,
-      String strPaymentId, String strWindowId, String strTabId) throws IOException,
-      ServletException {
+      String strPaymentId, String strWindowId, String strTabId, String strFinancialAccountId)
+      throws IOException, ServletException {
     log4j.debug("Output: Add Payment button pressed on Make / Receipt Payment windows");
 
     FIN_Payment payment = new AdvPaymentMngtDao().getObject(FIN_Payment.class, strPaymentId);
@@ -466,12 +468,12 @@
         // Amounts
         if (payment.isReceipt()) {
           glItem.put("glitemPaidOutAmt", psdGLItem.getAmount().signum() < 0 ? psdGLItem.getAmount()
-              : BigDecimal.ZERO);
+              .abs() : BigDecimal.ZERO);
           glItem.put("glitemReceivedInAmt",
               psdGLItem.getAmount().signum() > 0 ? psdGLItem.getAmount() : BigDecimal.ZERO);
         } else {
-          glItem.put("glitemReceivedInAmt",
-              psdGLItem.getAmount().signum() < 0 ? psdGLItem.getAmount() : BigDecimal.ZERO);
+          glItem.put("glitemReceivedInAmt", psdGLItem.getAmount().signum() < 0 ? psdGLItem
+              .getAmount().abs() : BigDecimal.ZERO);
           glItem.put("glitemPaidOutAmt", psdGLItem.getAmount().signum() > 0 ? psdGLItem.getAmount()
               : BigDecimal.ZERO);
         }
@@ -517,6 +519,29 @@
     // If UsedCredit is not equal zero, check Use available credit
     xmlDocument.setParameter("useCredit", payment.getUsedCredit().signum() != 0 ? "Y" : "N");
 
+    // Not allow to change exchange rate and amount
+    final String strNotAllowExchange = Utility.getContext(this, vars, "NotAllowChangeExchange",
+        strWindowId);
+    xmlDocument.setParameter("strNotAllowExchange", strNotAllowExchange);
+
+    dao = new AdvPaymentMngtDao();
+    FIN_FinancialAccount financialAccount = dao.getObject(FIN_FinancialAccount.class,
+        strFinancialAccountId);
+
+    if (financialAccount.getWriteofflimit() != null) {
+      final String strtypewriteoff;
+      final String strAmountwriteoff;
+
+      strtypewriteoff = financialAccount.getTypewriteoff();
+      strAmountwriteoff = financialAccount.getWriteofflimit().toString();
+      xmlDocument.setParameter("strtypewriteoff", strtypewriteoff);
+      xmlDocument.setParameter("strAmountwriteoff", strAmountwriteoff);
+
+      // Not allow to write off
+      final String strWriteOffLimit = Utility.getContext(this, vars, "WriteOffLimitPreference",
+          strWindowId);
+      xmlDocument.setParameter("strWriteOffLimit", strWriteOffLimit);
+    }
     response.setContentType("text/html; charset=UTF-8");
     PrintWriter out = response.getWriter();
     out.println(xmlDocument.print());
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.xml	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -72,6 +72,16 @@
     
     <PARAMETER id="paramUseCreditChecked" name="check" default="Y"/>
     <PARAMETER id="paramUseCredit" name="useCredit" boolean="checked" withId="paramUseCreditChecked"/>
+    
+     <!-- Not allow to change exchange rate and amount -->
+    <PARAMETER id="paramStrNotAllowExchange" name="strNotAllowExchange" attribute="value"/>
+    
+    <!-- Not allow to change Write Off-->
+    <PARAMETER id="paramStrWriteOffLimit" name="strWriteOffLimit" attribute="value"/>
+    <PARAMETER id="paramStrtypewriteoff" name="strtypewriteoff" attribute="value"/>
+    <PARAMETER id="paramStrAmountwriteoff" name="strAmountwriteoff" attribute="value"/>
+    
 
     <DISCARD id="discard"/>
 </REPORT>
+
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.html	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.html	Fri Oct 05 07:18:23 2012 +0000
@@ -47,6 +47,7 @@
 <script language="JavaScript" src="../../../../../web/js/jscalendar/lang/calendar-es.js" type="text/javascript" id="fieldCalendar"></script>
 <script language="JavaScript" src="../../../../../web/js/default/DateTextBox.js" type="text/javascript"></script>
 <script language="JavaScript" src="../../../../../web/org.openbravo.advpaymentmngt/FIN_Utilities.js" type="text/javascript"></script>
+<script language="JavaScript" src="../../../../../web/js/appStatus.js" type="text/javascript"></script>
 <script type="text/javascript">
   window.onunload = reloadOpener; // reloads opener on closing
 </script>
@@ -55,6 +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 (frm.inpDocNumber.value==null || frm.inpDocNumber.value=="") {
       setWindowElementFocus(frm.inpDocNumber);
       showJSMessage(7);
@@ -83,16 +95,6 @@
       setWindowElementFocus(frm.inpPaymentDate);
       showJSMessage(7);
       return false;
-    } else 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;
-      }
     } else {
       var diffAction = frm.inpDifferenceAction,
           i,
@@ -148,7 +150,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];
@@ -188,7 +226,9 @@
       }
     }
   }
-  updateTotal();
+  if(!all){
+    updateTotal();
+  }
 
   return true;
 }
@@ -259,6 +299,16 @@
   displayLogicElement('lblExpectedConverted', display );
   displayLogicElement('paramActualConvertedCell', display );
   displayLogicElement('lblActualConverted', display );
+  if (document.frmMain.strNotAllowExchange.value === 'Y' && display) {  
+      readOnlyLogicElement('paramExchangeRate', true);
+      readOnlyLogicElement('paramActualConverted', true);
+      displayLogicElement('actualConvertedCal', false );
+   }
+  else {
+      readOnlyLogicElement('paramExchangeRate', false);
+      readOnlyLogicElement('paramActualConverted', false);
+      displayLogicElement('actualConvertedCal', true );
+  }
 }
 
 
@@ -367,6 +417,15 @@
         } else {
           document.getElementById('paramExchangeRate').value = '';
         }
+        if (resp.twriteoff) {
+            document.getElementById('paramStrtypewriteoff').value = applyFormatJSToOBMasked(resp.twriteoff, resp.formatOutput);
+            document.getElementById('paramStrAmountwriteoff').value = applyFormatJSToOBMasked(resp.awriteoff, resp.formatOutput);
+        }
+        else{
+            document.getElementById('paramStrtypewriteoff').value = '';
+            document.getElementById('paramStrAmountwriteoff').value = '';
+        }
+        updateDifference();
       }
       displayMulticurrencyControls();
       updateConvertedAmounts();
@@ -421,6 +480,7 @@
     displayLogicElement('paramUseCreditContainer', hasCredit );
     displayLogicElement('rowCredit', hasCredit );
     displayMulticurrencyControls();
+    
     if (isTrue('isReceipt')) {
         setWindowElementFocus(frm.inpActualPayment);
     } else {
@@ -447,6 +507,10 @@
   <input type="hidden" name="inpTabId" value="" id="fieldTabId"/>
   <input type="hidden" name="isReceipt" value="" id="fieldReceipt"/>
   <input type="hidden" name="isFirstLoad" value="true"/>
+  <input type="hidden" name="strNotAllowExchange" id="paramStrNotAllowExchange" value=""/>
+  <input type="hidden" name="strWriteOffLimit" id="paramStrWriteOffLimit" value=""/>
+  <input type="hidden" name="strtypewriteoff" id="paramStrtypewriteoff" value=""/>
+  <input type="hidden" name="strAmountwriteoff" id="paramStrAmountwriteoff" value=""/>
   <div class="Popup_ContentPane_CircleLogo">
     <div class="Popup_WindowLogo">
       <img class="Popup_WindowLogo_Icon Popup_WindowLogo_Icon_process" src="../../../../../web/images/blank.gif" border=0/></img>
@@ -863,7 +927,7 @@
                       </span>
                       </td>
                       <td class="FieldButton_ContentCell">
-                      <a class="FieldButtonLink" href="#" onfocus="setWindowElementFocus(this); window.status='Amount From'; return true;" onblur=" window.status=''; return true;" onkeypress="this.className='FieldButtonLink_active'; return true;" onkeyup="this.className='FieldButtonLink_focus'; return true;"  onclick="calculator('frmMain.inpActualConverted', document.frmMain.inpActualConverted.value, false);return false;">
+                      <a id="actualConvertedCal" class="FieldButtonLink" href="#" onfocus="setWindowElementFocus(this); window.status='Amount From'; return true;" onblur=" window.status=''; return true;" onkeypress="this.className='FieldButtonLink_active'; return true;" onkeyup="this.className='FieldButtonLink_focus'; return true;"  onclick="calculator('frmMain.inpActualConverted', document.frmMain.inpActualConverted.value, false);return false;">
                       <table class="FieldButton" onmouseout="this.className='FieldButton';window.status='';return true;" onmouseover="this.className='FieldButton_hover';window.status='';return true;" onmousedown="this.className='FieldButton_active';return true;" onmouseup="this.className='FieldButton';return true;" id="NoPackageslinkCalc">
                           <tr>
                             <td class="FieldButton_bg">
@@ -1095,6 +1159,12 @@
                             </td>
                             <td><span class="LabelText">Write off the difference</span></td>
                           </tr>
+                          <tr id="writeofflimit">
+                            <td class="Radio_Check_ContentCell" >
+                              <input type="radio" name="inpDifferenceAction" value="writeofflimit" id="radiolimit" DISABLED/>
+                            </td>
+                            <td><span class="LabelText">Write off the difference (Above limit)</span></td>
+                          </tr>
                         </table>
                       </td>
                     </tr>
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.java	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.java	Fri Oct 05 07:18:23 2012 +0000
@@ -357,11 +357,35 @@
     }
     xmlDocument.setParameter("sectionDetailFinancialAccount", finAccountComboHtml);
 
+    final String strtypewriteoff;
+    final String strAmountwriteoff;
     if (account != null) {
       if (!financialAccounts.contains(account)) {
         strFinancialAccountId = financialAccounts.get(0).getId();
+        if (financialAccounts.get(0).getWriteofflimit() != null) {
+          strtypewriteoff = financialAccounts.get(0).getTypewriteoff();
+          strAmountwriteoff = financialAccounts.get(0).getWriteofflimit().toString();
+          xmlDocument.setParameter("strtypewriteoff", strtypewriteoff);
+          xmlDocument.setParameter("strAmountwriteoff", strAmountwriteoff);
+        }
+
+      } else {
+        if (account.getWriteofflimit() != null) {
+          strtypewriteoff = account.getTypewriteoff();
+          strAmountwriteoff = account.getWriteofflimit().toString();
+          xmlDocument.setParameter("strtypewriteoff", strtypewriteoff);
+          xmlDocument.setParameter("strAmountwriteoff", strAmountwriteoff);
+        }
+      }
+    } else {
+      if (financialAccounts.get(0).getWriteofflimit() != null) {
+        strtypewriteoff = financialAccounts.get(0).getTypewriteoff();
+        strAmountwriteoff = financialAccounts.get(0).getWriteofflimit().toString();
+        xmlDocument.setParameter("strtypewriteoff", strtypewriteoff);
+        xmlDocument.setParameter("strAmountwriteoff", strAmountwriteoff);
       }
     }
+
     // Currency
     xmlDocument.setParameter("CurrencyId", strCurrencyId);
     final Currency paymentCurrency = dao.getObject(Currency.class, strCurrencyId);
@@ -414,6 +438,15 @@
     } catch (Exception ex) {
       throw new ServletException(ex);
     }
+    // Not allow to change exchange rate and amount
+    final String strNotAllowExchange = Utility.getContext(this, vars, "NotAllowChangeExchange",
+        strWindowId);
+    xmlDocument.setParameter("strNotAllowExchange", strNotAllowExchange);
+
+    // Not allow to write off
+    final String strWriteOffLimit = Utility.getContext(this, vars, "WriteOffLimitPreference",
+        strWindowId);
+    xmlDocument.setParameter("strWriteOffLimit", strWriteOffLimit);
 
     response.setContentType("text/html; charset=UTF-8");
     PrintWriter out = response.getWriter();
@@ -473,8 +506,8 @@
     response.setContentType("text/html; charset=UTF-8");
     PrintWriter out = response.getWriter();
     out.println(paymentMethodComboHtml.replaceAll("\"", "\\'"));
+
     out.close();
-
   }
 
   private void refreshFinancialAccountCombo(HttpServletResponse response, VariablesSecureApp vars,
@@ -498,13 +531,23 @@
         FIN_Utility.getDate(paymentDate), OBDal.getInstance().get(Organization.class, strOrgId),
         conversionRatePrecision);
 
+    FIN_FinancialAccount financialAccount = dao.getObject(FIN_FinancialAccount.class,
+        strFinancialAccountId);
+
     JSONObject msg = new JSONObject();
     try {
+      if (financialAccount.getWriteofflimit() != null) {
+        msg.put("twriteoff", financialAccount.getTypewriteoff());
+        msg.put("awriteoff", financialAccount.getWriteofflimit().toString());
+      }
       msg.put("combo", finAccountComboHtml);
-      msg.put("financialAccountCurrencyId", financialAccountCurrency.getId());
+      if (financialAccountCurrency != null) {
+        msg.put("financialAccountCurrencyId", financialAccountCurrency.getId());
+        msg.put("financialAccountCurrencyPrecision",
+            financialAccountCurrency.getStandardPrecision());
+      }
       msg.put("exchangeRate", exchangeRate == null ? "" : exchangeRate);
       msg.put("formatOutput", formatOutput);
-      msg.put("financialAccountCurrencyPrecision", financialAccountCurrency.getStandardPrecision());
     } catch (JSONException e) {
       log4j.error("JSON object error" + msg.toString());
     }
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.xml	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -63,6 +63,14 @@
     <PARAMETER id="sectionDetailPaymentMethod" name="sectionDetailPaymentMethod"/>
     <PARAMETER id="sectionDetailFinancialAccount" name="sectionDetailFinancialAccount"/>
     
+    <!-- Not allow to change exchange rate and amount -->
+    <PARAMETER id="paramStrNotAllowExchange" name="strNotAllowExchange" attribute="value"/>
+    
+     <!-- Not allow to change Write Off-->
+    <PARAMETER id="paramStrWriteOffLimit" name="strWriteOffLimit" attribute="value"/>
+    <PARAMETER id="paramStrtypewriteoff" name="strtypewriteoff" attribute="value"/>
+    <PARAMETER id="paramStrAmountwriteoff" name="strAmountwriteoff" attribute="value"/>
+    
     <SUBREPORT id="reportC_Currency_ID" name="reportC_Currency_ID" report="org/openbravo/erpCommon/reference/List">
       <ARGUMENT name="parameterListSelected" withId="paramC_Currency_ID"/>
     </SUBREPORT>
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromTransaction.html	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromTransaction.html	Fri Oct 05 07:18:23 2012 +0000
@@ -48,6 +48,7 @@
 <script language="JavaScript" src="../../../../../web/js/jscalendar/lang/calendar-es.js" type="text/javascript" id="fieldCalendar"></script>
 <script language="JavaScript" src="../../../../../web/js/default/DateTextBox.js" type="text/javascript"></script>
 <script language="JavaScript" src="../../../../../web/org.openbravo.advpaymentmngt/FIN_Utilities.js" type="text/javascript"></script>
+<script language="JavaScript" src="../../../../../web/js/appStatus.js" type="text/javascript"></script>
 <script language="JavaScript" type="text/javascript">
   OB.APRM = OB.APRM || {};
   OB.APRM.APFT_GLItems = [];
@@ -368,6 +369,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 (frm.inpActualPayment.value === null || frm.inpActualPayment.value === '') {
       setWindowElementFocus(frm.inpActualPayment);
       showJSMessage(7);
@@ -388,17 +400,7 @@
       setWindowElementFocus(frm.inpPaymentDate);
       showJSMessage(7);
       return false;
-    } else 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;
-      }
-    } else {
+    }  else {
       var diffAction = frm.inpDifferenceAction,
           selectedAction = null, i, actionSelected = false;
       for (i = 0; i < diffAction.length; i++) {
@@ -625,6 +627,16 @@
   displayLogicElement('lblExpectedConverted', display );
   displayLogicElement('paramActualConvertedCell', display );
   displayLogicElement('lblActualConverted', display );
+  if (document.frmMain.strNotAllowExchange.value === 'Y' && display) {  
+	  readOnlyLogicElement('paramExchangeRate', true);
+      readOnlyLogicElement('paramActualConverted', true);
+      displayLogicElement('actualConvertedCal', false );
+   }
+  else {
+	  readOnlyLogicElement('paramExchangeRate', false);
+      readOnlyLogicElement('paramActualConvertedCell', false);
+      displayLogicElement('actualConvertedCal', true );
+  }
 }
 
 function currencyOnChange() {
@@ -659,6 +671,7 @@
 function currencyOnChangeOnLoad() {
   if( isPaymentMethodMulticurrency() ) {
     changeClass('paramCurrencyId','ComboKeyReadOnly ', 'ComboKey dojoValidateValid required ',true);
+    
   } else {
     changeClass('paramCurrencyId', 'ComboKey dojoValidateValid required ', 'ComboKeyReadOnly ',true);
   }
@@ -815,6 +828,12 @@
   <input type="hidden" name="strElement_AY" id="paramStrElement_AY" value=""/>
   <input type="hidden" name="strElement_SR" id="paramStrElement_SR" value=""/>
   <input type="hidden" name="strElement_MC" id="paramStrElement_MC" value=""/>
+  <input type="hidden" name="strNotAllowExchange" id="paramStrNotAllowExchange" value=""/>
+  <input type="hidden" name="strWriteOffLimit" id="paramStrWriteOffLimit" value=""/>
+  <input type="hidden" name="strtypewriteoff" id="paramStrtypewriteoff" value=""/>
+  <input type="hidden" name="strAmountwriteoff" id="paramStrAmountwriteoff" value=""/>
+  
+  
   <div class="Popup_ContentPane_CircleLogo">
     <div class="Popup_WindowLogo">
       <img class="Popup_WindowLogo_Icon Popup_WindowLogo_Icon_process" src="../../../../../web/images/blank.gif" border=0/></img>
@@ -1212,7 +1231,7 @@
                       </span>
                       </td>
                       <td class="FieldButton_ContentCell">
-                      <a class="FieldButtonLink" href="#" onfocus="setWindowElementFocus(this); window.status='Amount From'; return true;" onblur=" window.status=''; return true;" onkeypress="this.className='FieldButtonLink_active'; return true;" onkeyup="this.className='FieldButtonLink_focus'; return true;"  onclick="calculator('frmMain.inpActualConverted', document.frmMain.inpActualConverted.value, false);return false;">
+                      <a id="actualConvertedCal" class="FieldButtonLink" href="#" onfocus="setWindowElementFocus(this); window.status='Amount From'; return true;" onblur=" window.status=''; return true;" onkeypress="this.className='FieldButtonLink_active'; return true;" onkeyup="this.className='FieldButtonLink_focus'; return true;"  onclick="calculator('frmMain.inpActualConverted', document.frmMain.inpActualConverted.value, false);return false;">
                       <table class="FieldButton" onmouseout="this.className='FieldButton';window.status='';return true;" onmouseover="this.className='FieldButton_hover';window.status='';return true;" onmousedown="this.className='FieldButton_active';return true;" onmouseup="this.className='FieldButton';return true;" id="NoPackageslinkCalc">
                           <tr>
                             <td class="FieldButton_bg">
@@ -1849,6 +1868,12 @@
                             </td>
                             <td><span class="LabelText">Write off the difference</span></td>
                           </tr>
+                           <tr id="writeofflimit">
+                            <td class="Radio_Check_ContentCell" >
+                              <input type="radio" name="inpDifferenceAction" value="writeofflimit" id="radiolimit" DISABLED/>
+                            </td>
+                            <td><span class="LabelText">Write off the difference (Above limit)</span></td>
+                          </tr>  
                         </table>
                       </td>
                     </tr>
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromTransaction.java	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromTransaction.java	Fri Oct 05 07:18:23 2012 +0000
@@ -384,12 +384,12 @@
             BusinessPartner.class);
         obcBP.add(Restrictions.eq(BusinessPartner.PROPERTY_NAME, bsline.getBpartnername()));
         if (obcBP.list() != null && obcBP.list().size() > 0) {
-          xmlDocument.setParameter("businessPartner", obcBP.list().get(0).getId());
+          xmlDocument.setParameter("businessPartner", obcBP.list().get(0).getIdentifier());
           defaultPaymentMethod = (obcBP.list().get(0).getPaymentMethod() != null) ? obcBP.list()
               .get(0).getPaymentMethod().getId() : "";
         }
       } else {
-        xmlDocument.setParameter("businessPartner", bsline.getBusinessPartner().getId());
+        xmlDocument.setParameter("businessPartner", bsline.getBusinessPartner().getIdentifier());
       }
     }
     // Take payment date from the add transaction popup
@@ -529,6 +529,25 @@
     xmlDocument.setParameter("strElement_SR", strElement_SR);
     xmlDocument.setParameter("strElement_MC", strElement_MC);
 
+    // Not allow to change exchange rate and amount
+    final String strNotAllowExchange = Utility.getContext(this, vars, "NotAllowChangeExchange",
+        strWindowId);
+    xmlDocument.setParameter("strNotAllowExchange", strNotAllowExchange);
+
+    if (financialAccount.getWriteofflimit() != null) {
+      final String strtypewriteoff;
+      final String strAmountwriteoff;
+
+      strtypewriteoff = financialAccount.getTypewriteoff();
+      strAmountwriteoff = financialAccount.getWriteofflimit().toString();
+      xmlDocument.setParameter("strtypewriteoff", strtypewriteoff);
+      xmlDocument.setParameter("strAmountwriteoff", strAmountwriteoff);
+
+      final String strWriteOffLimit = Utility.getContext(this, vars, "WriteOffLimitPreference",
+          strWindowId);
+      xmlDocument.setParameter("strWriteOffLimit", strWriteOffLimit);
+    }
+
     response.setContentType("text/html; charset=UTF-8");
     PrintWriter out = response.getWriter();
     out.println(xmlDocument.print());
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromTransaction.xml	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromTransaction.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -88,7 +88,15 @@
     <PARAMETER id="paramStrElement_AY" name="strElement_AY" attribute="value"/>
     <PARAMETER id="paramStrElement_SR" name="strElement_SR" attribute="value"/>
     <PARAMETER id="paramStrElement_MC" name="strElement_MC" attribute="value"/>  
-
+    
+    <!-- Not allow to change exchange rate and amount -->
+    <PARAMETER id="paramStrNotAllowExchange" name="strNotAllowExchange" attribute="value"/>
+    
+    <!-- Not allow to change Write Off-->
+    <PARAMETER id="paramStrWriteOffLimit" name="strWriteOffLimit" attribute="value"/>
+    <PARAMETER id="paramStrtypewriteoff" name="strtypewriteoff" attribute="value"/>
+    <PARAMETER id="paramStrAmountwriteoff" name="strAmountwriteoff" attribute="value"/>
+    
     <DISCARD id="discard"/>
     
 </REPORT>
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/MatchTransaction.java	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/MatchTransaction.java	Fri Oct 05 07:18:23 2012 +0000
@@ -372,6 +372,7 @@
     FIN_FinancialAccount financial = OBDal.getInstance().get(FIN_FinancialAccount.class,
         strFinancialAccountId);
     try {
+      OBContext.setAdminMode(true);
       new FIN_MatchingTransaction(financial.getMatchingAlgorithm().getJavaClassName());
     } catch (Exception ex) {
       OBDal.getInstance().rollbackAndClose();
@@ -380,6 +381,8 @@
       vars.setMessage(strTabId, message);
       printPageClosePopUp(response, vars, Utility.getTabURL(strTabId, "R", true));
       return;
+    } finally {
+      OBContext.restorePreviousMode();
     }
     try {
       ComboTableData comboTableData = new ComboTableData(vars, this, "LIST", "",
@@ -408,8 +411,16 @@
     XmlDocument xmlDocument = xmlEngine.readXmlTemplate(
         "org/openbravo/advpaymentmngt/ad_actionbutton/MatchTransactionGrid").createXmlDocument();
 
-    FieldProvider[] data = getMatchedBankStatementLinesData(vars, strFinancialAccountId,
-        strReconciliationId, strPaymentTypeFilter, strShowCleared, strHideDate);
+    FieldProvider[] data = null;
+    try {
+      OBContext.setAdminMode(true);
+      data = getMatchedBankStatementLinesData(vars, strFinancialAccountId, strReconciliationId,
+          strPaymentTypeFilter, strShowCleared, strHideDate);
+    } catch (Exception e) {
+      log4j.debug("Output: Exception ocurred while retrieving Bank Statement Lines.");
+    } finally {
+      OBContext.restorePreviousMode();
+    }
 
     xmlDocument.setData("structure", data);
 
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/ProcessInvoice.java	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/ProcessInvoice.java	Fri Oct 05 07:18:23 2012 +0000
@@ -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 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/Reconciliation.java	Fri Oct 05 07:18:23 2012 +0000
@@ -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/algorithm/StandardMatchingAlgorithm.java	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/algorithm/StandardMatchingAlgorithm.java	Fri Oct 05 07:18:23 2012 +0000
@@ -34,12 +34,14 @@
   public FIN_MatchedTransaction match(FIN_BankStatementLine line,
       List<FIN_FinaccTransaction> excluded) throws ServletException {
     List<FIN_FinaccTransaction> transactions = MatchTransactionDao.getMatchingFinancialTransaction(
-        line.getBankStatement().getAccount().getId(), line.getReferenceNo(),
-        (line.getCramount().subtract(line.getDramount())), line.getBpartnername(), excluded);
+        line.getBankStatement().getAccount().getId(), line.getTransactionDate(),
+        line.getReferenceNo(), (line.getCramount().subtract(line.getDramount())),
+        line.getBpartnername(), excluded);
     if (!transactions.isEmpty())
       return new FIN_MatchedTransaction(transactions.get(0), FIN_MatchedTransaction.STRONG);
     transactions = MatchTransactionDao.getMatchingFinancialTransaction(line.getBankStatement()
-        .getAccount().getId(), line.getCramount().subtract(line.getDramount()), excluded);
+        .getAccount().getId(), line.getTransactionDate(),
+        line.getCramount().subtract(line.getDramount()), excluded);
     if (!transactions.isEmpty())
       return new FIN_MatchedTransaction(transactions.get(0), FIN_MatchedTransaction.WEAK);
 
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/AdvPaymentMngtDao.java	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/AdvPaymentMngtDao.java	Fri Oct 05 07:18:23 2012 +0000
@@ -1322,6 +1322,8 @@
       Criterion crit = exp.getCriterion();
       if (crit != null) {
         obc.add(crit);
+      } else {
+        return new ArrayList<FIN_FinancialAccount>();
       }
     }
     return obc.list();
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java	Fri Oct 05 07:18:23 2012 +0000
@@ -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());
                   }
                 }
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_TransactionProcess.java	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_TransactionProcess.java	Fri Oct 05 07:18:23 2012 +0000
@@ -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_BankStatementImport.java	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_BankStatementImport.java	Fri Oct 05 07:18:23 2012 +0000
@@ -261,7 +261,7 @@
 
   private BusinessPartner matchBusinessPartnerByName(String partnername, Organization organization,
       FIN_FinancialAccount account) {
-    if (partnername == null || "".equals(partnername)) {
+    if (partnername == null || "".equals(partnername.trim())) {
       return null;
     }
     final StringBuilder whereClause = new StringBuilder();
@@ -296,7 +296,7 @@
   }
 
   private BusinessPartner finBPByName(String partnername, Organization organization) {
-    if (partnername == null || "".equals(partnername)) {
+    if (partnername == null || "".equals(partnername.trim())) {
       return null;
     }
     final StringBuilder whereClause = new StringBuilder();
@@ -329,7 +329,7 @@
 
   private BusinessPartner matchBusinessPartnerByNameTokens(String partnername,
       Organization organization) {
-    if (partnername == null || "".equals(partnername)) {
+    if (partnername == null || "".equals(partnername.trim())) {
       return null;
     }
     StringTokenizer st = new StringTokenizer(partnername);
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_Utility.java	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_Utility.java	Fri Oct 05 07:18:23 2012 +0000
@@ -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;
@@ -1029,4 +1031,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 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/FIN_Utilities.js	Fri Oct 05 07:18:23 2012 +0000
@@ -342,6 +342,7 @@
       total = (frm.inpTotal && frm.inpTotal.value) ? frm.inpTotal.value : applyFormat('0'),
       amount = total,
       invoicedAmount = total;
+  var exchangeRate = frm.inpExchangeRate;
 
   if (isGLItemEnabled) {
     invoicedAmount = frm.inpInvoiceAmount.value;
@@ -363,7 +364,13 @@
   document.getElementById('paramDifference').innerHTML = frm.inpDifference.value;
   displayLogicElement('sectionDifference', (compare(expected, '!=', total) || compareWithSign(amount, '>', total)));
   displayLogicElement('sectionDifferenceBox', (compare(expected, '!=', total) || (isCreditAllowed && compareWithSign(amount, '>', total))));
-  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));
   displayLogicElement('refund', isCreditAllowed && isReceipt && compareWithSign(amount, '>', total));
--- a/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-utilities.js	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-utilities.js	Fri Oct 05 07:18:23 2012 +0000
@@ -129,11 +129,21 @@
       break;
     }
   }
+  var contextInfo = null;
+  contextInfo = item.grid.view.parentWindow.activeView.getContextInfo(false, true, true, true);
 
   // When possible to capture on change event, move this code to another method
   if (row) {
     row.difference = Number(outstanding.subtract(paidamount));
     row.payment = Number(record.payment);
+    if (contextInfo.inplimitwriteoff !== "") {
+      var differencewriteoff = OB.Utilities.Number.JSToOBMasked((row.difference * contextInfo.inpfinaccTxnConvertRate), OB.Format.defaultNumericMask, OB.Format.defaultDecimalSymbol, OB.Format.defaultGroupingSymbol, OB.Format.defaultGroupingSize);
+      if (differencewriteoff > contextInfo.inplimitwriteoff && record.writeoff === true) {
+        isc.warn(OB.I18N.getLabel('APRM_NotAllowWriteOff'));
+        return false;
+      }
+    }
+
   } else {
     return false;
   }
--- a/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE.xml	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -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.17889]]></VERSION>
+<!--C70732EA90A14EC0916078B85CC33D2D-->  <VERSION><![CDATA[1.1.18121]]></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>
@@ -22,7 +22,7 @@
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <UPDATEINFO><![CDATA[Bug fixing.]]></UPDATEINFO>
-<!--C70732EA90A14EC0916078B85CC33D2D-->  <VERSION_LABEL><![CDATA[MP15.1]]></VERSION_LABEL>
+<!--C70732EA90A14EC0916078B85CC33D2D-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--C70732EA90A14EC0916078B85CC33D2D--></AD_MODULE>
--- a/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -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.17889]]></STARTVERSION>
+<!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <STARTVERSION><![CDATA[3.0.18121]]></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/model/tables/OBUIAPP_NOTE.xml	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.client.application/src-db/database/model/tables/OBUIAPP_NOTE.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -51,7 +51,7 @@
       <foreign-key foreignTable="AD_ORG" name="OBUIAPP_NOTE_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="AD_TABLE" name="OBUIAPP_NOTE_AD_TABLE">
+      <foreign-key foreignTable="AD_TABLE" name="OBUIAPP_NOTE_AD_TABLE" onDelete="cascade">
         <reference local="AD_TABLE_ID" foreign="AD_TABLE_ID"/>
       </foreign-key>
       <index name="OBUIAPP_NOTE_AD_TABLE" unique="false">
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE.xml	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -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.17889]]></VERSION>
+<!--9BA0836A3CD74EE4AB48753A47211BCC-->  <VERSION><![CDATA[2.1.18121]]></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>
@@ -22,7 +22,7 @@
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <UPDATEINFO><![CDATA[Styling bugfixing]]></UPDATEINFO>
-<!--9BA0836A3CD74EE4AB48753A47211BCC-->  <VERSION_LABEL><![CDATA[MP15.1]]></VERSION_LABEL>
+<!--9BA0836A3CD74EE4AB48753A47211BCC-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--9BA0836A3CD74EE4AB48753A47211BCC--></AD_MODULE>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -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.17889]]></STARTVERSION>
+<!--15D7CE8D95D043189162DBABA54A1F61-->  <STARTVERSION><![CDATA[2.1.18121]]></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.17889]]></STARTVERSION>
+<!--60A170212F36499D83B8AD38D01F46B3-->  <STARTVERSION><![CDATA[2.1.18121]]></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.17889]]></STARTVERSION>
+<!--824D60CB352E4099B1D8C903CA139DAE-->  <STARTVERSION><![CDATA[3.0.18121]]></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.17889]]></STARTVERSION>
+<!--E8FD820AFE3D4FE08C02FC47769026AD-->  <STARTVERSION><![CDATA[8.1.18121]]></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 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_PREFERENCE.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -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 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/AlertActionHandler.java	Fri Oct 05 07:18:23 2012 +0000
@@ -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 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/MenuManager.java	Fri Oct 05 07:18:23 2012 +0000
@@ -85,6 +85,7 @@
         linkForms();
 
         removeInvisibleNodes();
+        removeInaccessibleNodes();
 
         // set the globals
         final MenuOption localCachedRoot = new MenuOption();
@@ -339,6 +340,21 @@
     menuOptions.removeAll(toRemove);
   }
 
+  private void removeInaccessibleNodes() {
+    final List<MenuOption> toRemove = new ArrayList<MenuOption>();
+    for (MenuOption menuOption : menuOptions) {
+      if (!menuOption.isAccessible()) {
+        toRemove.add(menuOption);
+      }
+    }
+    for (MenuOption menuOption : toRemove) {
+      if (menuOption.getParentMenuOption() != null) {
+        menuOption.getParentMenuOption().getChildren().remove(menuOption);
+      }
+    }
+    menuOptions.removeAll(toRemove);
+  }
+
   private void createInitialMenuList() {
     Role role = OBDal.getInstance().get(Role.class, roleId);
     final Tree tree;
@@ -459,6 +475,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	Fri Oct 05 07:18:23 2012 +0000
@@ -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");
+    }
+  }
+}
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java	Fri Oct 05 07:18:23 2012 +0000
@@ -446,7 +446,7 @@
         finalObject.put("dynamicCols", new JSONArray(changeEventCols));
       }
 
-      if (mode.equals("EDIT") && row != null) {
+      if ((mode.equals("EDIT") || mode.equals("CHANGE")) && row != null) {
         if ((row instanceof ClientEnabled && ((ClientEnabled) row).getClient() != null)) {
           final String rowClientId = ((ClientEnabled) row).getClient().getId();
           final String currentClientId = OBContext.getOBContext().getCurrentClient().getId();
@@ -632,8 +632,7 @@
           }
         }
       } catch (Exception e) {
-        throw new OBException(
-            "Couldn't get data for column " + field.getColumn().getDBColumnName(), e);
+        log.error("Couldn't get data for column " + field.getColumn().getDBColumnName(), e);
       }
     }
 
@@ -1019,27 +1018,32 @@
       currentValue = obj.get(prop.getName());
     }
 
-    if (currentValue != null && !currentValue.toString().equals("null")) {
-      if (currentValue instanceof BaseOBObject) {
-        if (prop.getReferencedProperty() != null) {
-          currentValue = ((BaseOBObject) currentValue).get(prop.getReferencedProperty().getName());
+    try {
+      if (currentValue != null && !currentValue.toString().equals("null")) {
+        if (currentValue instanceof BaseOBObject) {
+          if (prop.getReferencedProperty() != null) {
+            currentValue = ((BaseOBObject) currentValue)
+                .get(prop.getReferencedProperty().getName());
+          } else {
+            currentValue = ((BaseOBObject) currentValue).getId();
+          }
         } else {
-          currentValue = ((BaseOBObject) currentValue).getId();
+          currentValue = UIDefinitionController.getInstance().getUIDefinition(prop.getColumnId())
+              .convertToClassicString(currentValue);
         }
-      } else {
-        currentValue = UIDefinitionController.getInstance().getUIDefinition(prop.getColumnId())
-            .convertToClassicString(currentValue);
+        if (currentValue != null && currentValue.equals("null")) {
+          currentValue = null;
+        }
+        if (currentValue == null) {
+          RequestContext.get().setRequestParameter(
+              "inp" + Sqlc.TransformaNombreColumna(columnName), null);
+        } else {
+          RequestContext.get().setRequestParameter(
+              "inp" + Sqlc.TransformaNombreColumna(columnName), currentValue.toString());
+        }
       }
-      if (currentValue != null && currentValue.equals("null")) {
-        currentValue = null;
-      }
-      if (currentValue == null) {
-        RequestContext.get().setRequestParameter("inp" + Sqlc.TransformaNombreColumna(columnName),
-            null);
-      } else {
-        RequestContext.get().setRequestParameter("inp" + Sqlc.TransformaNombreColumna(columnName),
-            currentValue.toString());
-      }
+    } catch (Exception e) {
+      log.error("Couldn't get the value for column " + columnName);
     }
   }
 
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewFieldHandler.java	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewFieldHandler.java	Fri Oct 05 07:18:23 2012 +0000
@@ -206,6 +206,10 @@
         continue;
       }
 
+      if (field.isStartnewline()) {
+        colNum = 1;
+      }
+
       if (field.getColumn() == null) {
         final OBClientClassField viewField = new OBClientClassField();
 
@@ -384,8 +388,6 @@
       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);
@@ -1298,7 +1300,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 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/alert-management/ob-alert-management-view.js	Fri Oct 05 07:18:23 2012 +0000
@@ -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/form/formitem/ob-formitem-date.js	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-date.js	Fri Oct 05 07:18:23 2012 +0000
@@ -30,10 +30,6 @@
   pickerConstructor: 'OBDateChooser',
   useSharedPicker: true,
 
-  // ** {{{ dateFormat }}} **
-  // Dateformat function
-  dateFormat: OB.Format.date,
-
   // ** {{{ useTextField }}} **
   // use text field for date entry
   useTextField: true,
@@ -47,12 +43,13 @@
   validateOnChange: false,
   stopOnError: false,
 
-  dateParts: [],
-
-  doInit: function () {
+  setDateParams: function () {
     var i, dateFormatUpper, index = 0,
         length, currentTime;
 
+    this.dateFormat = OB.Format.date;
+    this.dateParts = [];
+
     dateFormatUpper = this.dateFormat.toUpperCase();
     length = dateFormatUpper.length;
     this.dateSeparator = this.dateFormat.toUpperCase().replace(/D/g, '').replace(/M/g, '').replace(/Y/g, '').substr(0, 1);
@@ -74,6 +71,10 @@
       this.currentDay = '0' + this.currentDay;
     }
     this.currentYear = String(currentTime.getFullYear());
+  },
+
+  doInit: function () {
+    this.setDateParams();
 
     this.Super('init', arguments);
 
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-list.js	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-list.js	Fri Oct 05 07:18:23 2012 +0000
@@ -63,12 +63,22 @@
   // is overridden to keep track that a value has been explicitly picked
   pickValue: function (value) {
     this._pickedValue = true;
+    // force the update of the list
+    // if the user has entered with the keyboard the exact content of a list option,
+    // its callout would not be called because the change would not be detected
+    // see issue https://issues.openbravo.com/view.php?id=21491
+    this._value = (this.value) ? this._value.concat(Math.random()) : Math.random();
     this.Super('pickValue', arguments);
     delete this._pickedValue;
     if (this.moveFocusOnPickValue && this.form.focusInNextItem) {
       // update the display before moving the focus
       this.updateValueMap(true);
-      this.form.focusInNextItem(this.name);
+      // Only focus in the next item if the key that triggered the event is
+      // not the tab key, so the focus is not moved twice
+      // See issue https://issues.openbravo.com/view.php?id=21419
+      if (isc.EH.getKeyName() !== 'Tab') {
+        this.form.focusInNextItem(this.name);
+      }
     }
   },
 
@@ -137,6 +147,7 @@
   mapValueToDisplay: function (value) {
     var ret = this.Super('mapValueToDisplay', arguments);
     if (this.valueMap && this.valueMap[value]) {
+      this.lastSelectedValue = value;
       return this.valueMap[value];
     }
 
@@ -157,11 +168,18 @@
     return ret;
   },
 
-  mapDisplayToValue: function (value) {
-    if (value === '') {
+  mapDisplayToValue: function (display) {
+    if (display === '') {
       return null;
     }
-    return this.Super('mapDisplayToValue', arguments);
+    if (this.lastSelectedValue && display === this.mapValueToDisplay(this.lastSelectedValue)) {
+      // Prevents mapDisplayToValue from failing when there are several
+      // entries in the valuemap with the same value
+      // See issue https://issues.openbravo.com/view.php?id=21553
+      return this.lastSelectedValue;
+    } else {
+      return this.Super('mapDisplayToValue', arguments);
+    }
   }
 
 });
\ No newline at end of file
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-minidaterange.js	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-minidaterange.js	Fri Oct 05 07:18:23 2012 +0000
@@ -50,6 +50,50 @@
     "+1w": OB.I18N.getLabel('OBUIAPP_Current_day_of_next_week'),
     "-1m": OB.I18N.getLabel('OBUIAPP_Current_day_of_last_month'),
     "+1m": OB.I18N.getLabel('OBUIAPP_Current_day_of_next_month')
+  },
+
+  // Function to load just needed OB.DateItemProperties properties, since all of them can not be loaded
+  // because there are some parameters like "init", "pickerDataChanged", ... that cannot be overwritten
+  // because SmartClient also overwrites them while creating this isc.RelativeDateItem definition.
+  // Fixes issue: https://issues.openbravo.com/view.php?id=21552
+  addDateItemProperties: function () {
+    this.setDateParams = OB.DateItemProperties.setDateParams;
+    this.parseValue = OB.DateItemProperties.parseValue;
+    this.expandPart = OB.DateItemProperties.expandPart;
+    this.reachedLength = OB.DateItemProperties.reachedLength;
+    this.isNumber = OB.DateItemProperties.isNumber;
+    this.isSeparator = OB.DateItemProperties.isSeparator;
+    this.setDateParams();
+  },
+
+  areDateItemPropertiesSet: false,
+
+  blurValue: function () {
+    if (this.editor && this.editor.items[0] && this.editor.items[0].getElementValue) {
+      return this.editor.items[0].getElementValue();
+    } else {
+      return null;
+    }
+  },
+
+  blur: function () {
+    var blurValue = this.blurValue(),
+        digitRegExp = new RegExp('^\\d+$', 'gm'),
+        areOnlyDigits = digitRegExp.test(blurValue),
+        newValue;
+
+    if (areOnlyDigits) {
+      if (!this.areDateItemPropertiesSet) {
+        this.addDateItemProperties();
+        this.areDateItemPropertiesSet = true;
+      }
+      newValue = this.parseValue();
+      if (newValue) {
+        this.setValue(OB.Utilities.Date.OBToJS(newValue, this.dateFormat));
+      }
+    }
+
+    this.Super('blur', arguments);
   }
 });
 
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form-attachments.js	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form-attachments.js	Fri Oct 05 07:18:23 2012 +0000
@@ -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,
@@ -367,7 +368,9 @@
         }
       }
     });
-    hLayout.addMember(addButton);
+    if (!this.getForm().view.viewForm.readOnly) {
+      hLayout.addMember(addButton);
+    }
     // If there are no attachments, we only display the "[Add]" button
     if (!attachments || attachments.length === 0) {
       this.getForm().getItem('_attachments_').setValue(OB.I18N.getLabel('OBUIAPP_AttachmentTitle'));
@@ -425,7 +428,9 @@
       }
     });
     hLayout.addMember(downloadAllButton);
-    hLayout.addMember(removeAllButton);
+    if (!this.getForm().view.viewForm.readOnly) {
+      hLayout.addMember(removeAllButton);
+    }
 
     var downloadActions;
     downloadActions = function () {
@@ -495,7 +500,9 @@
       buttonLayout.addMember(attachmentLabel);
       buttonLayout.addMember(attachmentBy);
       buttonLayout.addMember(downloadAttachment);
-      buttonLayout.addMember(removeAttachment);
+      if (!this.getForm().view.viewForm.readOnly) {
+        buttonLayout.addMember(removeAttachment);
+      }
       this.addMember(buttonLayout);
     }
   },
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js	Fri Oct 05 07:18:23 2012 +0000
@@ -1493,6 +1493,21 @@
           return;
         }
 
+        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]);
+        }
+
         // do this after doing autoSave as the setHasChanged will clean
         // the autosave info
         form.setHasChanged(false);
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-grid.js	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-grid.js	Fri Oct 05 07:18:23 2012 +0000
@@ -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);
@@ -279,19 +284,24 @@
     // issue 20722 (https://issues.openbravo.com/view.php?id=20722), remove the criteria
     // that makes reference to a specific id and return the original one
     removeSpecificIdFilter: function (criteria) {
+      var i, length;
       if (!criteria) {
         return criteria;
       }
       if (criteria.operator !== 'or') {
         return criteria;
       }
-      if (criteria.criteria && criteria.criteria.length !== 2) {
+      if (criteria.criteria && criteria.criteria.length < 2) {
         return criteria;
       }
-      if (criteria.criteria.get(0).fieldName !== 'id') {
-        return criteria;
+      // The original criteria is in the position 0, the rest are specific ids
+      length = criteria.criteria.length;
+      for (i = 1; i < length; i++) {
+        if (criteria.criteria.get(i).fieldName !== 'id') {
+          return criteria;
+        }
       }
-      return criteria.criteria.get(1);
+      return criteria.criteria.get(0);
     },
 
     // repair that filter criteria on fk fields can be 
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js	Fri Oct 05 07:18:23 2012 +0000
@@ -305,6 +305,24 @@
       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
+          grid.view.setAsActiveView(true);
+          setTimeout(function () {
+            me.Super('show', arguments);
+          }, 10);
+        } else {
+          me.Super('show', arguments);
+        }
+      };
     }
 
     var ret = this.Super('initWidget', arguments);
@@ -1000,13 +1018,14 @@
   },
 
   removeOrClause: function (criteria) {
-    // The original criteria is stored in the position #1
-    // The criteria to select the selected record is stored in position #0
-    return criteria.criteria.get(1);
+    // The original criteria is stored in the position #0
+    // The criteria to select the recently created records is stored in position #1..length-1
+    return criteria.criteria.get(0);
   },
 
-  refreshGrid: function (callback, forceCurrentRecordID) {
-    var originalCriteria, criteria = {};
+  refreshGrid: function (callback, newRecordsToBeIncluded) {
+    var originalCriteria, criteria = {},
+        newRecordsCriteria, newRecordsLength, i;
     if (this.getSelectedRecord()) {
       this.targetRecordId = this.getSelectedRecord()[OB.Constants.ID];
       // as the record is already selected it is already in the filter
@@ -1030,18 +1049,24 @@
     // If a record has to be included in the refresh, it must be included
     // in the filter with an 'or' operator, along with the original filter,
     // but only if there is an original filter
-    if (forceCurrentRecordID && originalCriteria.criteria.length > 0) {
+    if (newRecordsToBeIncluded && newRecordsToBeIncluded.length > 0 && originalCriteria.criteria.length > 0) {
       // Adds the current record to the criteria
+      newRecordsCriteria = [];
+      newRecordsLength = newRecordsToBeIncluded.length;
+      for (i = 0; i < newRecordsLength; i++) {
+        newRecordsCriteria.push({
+          fieldName: 'id',
+          operator: 'equals',
+          value: newRecordsToBeIncluded[i]
+        });
+      }
+
+
       this._criteriaWithOrClause = true;
       criteria._constructor = 'AdvancedCriteria';
       criteria._OrExpression = true; // trick to get a really _or_ in the backend
       criteria.operator = 'or';
-      criteria.criteria = [{
-        fieldName: 'id',
-        operator: 'equals',
-        value: forceCurrentRecordID
-      }];
-      criteria.criteria.push(originalCriteria); // original filter
+      criteria.criteria = [originalCriteria].concat(newRecordsCriteria);
     } else {
       criteria = originalCriteria;
     }
@@ -2187,6 +2212,14 @@
       return;
     }
 
+    // If leaving the row...
+    if (editCompletionEvent === 'enter' || editCompletionEvent === 'arrow_up' || editCompletionEvent === 'arrow_down') {
+      // See issue https://issues.openbravo.com/view.php?id=19830
+      if (this.view.standardWindow.getDirtyEditForm()) {
+        this.view.standardWindow.getDirtyEditForm().validateForm();
+      }
+    }
+
     this._leavingCell = true;
 
     if (newValue) {
@@ -2266,8 +2299,8 @@
   // latest values. This can happen when the focus is in a field and the save action is
   // done, at that point first try to force a fic call (handleItemChange) and if that
   // indeed happens stop the saveEdit until the fic returns
-  saveEditedValues: function (rowNum, colNum, newValues, oldValues, editValuesID, editCompletionEvent, saveCallback, ficCallDone) {
-    var previousExplicitOffline;
+  saveEditedValues: function (rowNum, colNum, newValues, oldValues, editValuesID, editCompletionEvent, originalCallback, ficCallDone) {
+    var previousExplicitOffline, saveCallback;
     if (!rowNum && rowNum !== 0) {
       rowNum = this.getEditRow();
     }
@@ -2277,12 +2310,34 @@
 
     // nothing changed just fire the calback and bail
     if (!ficCallDone && this.getEditForm() && !this.getEditForm().hasChanged && !this.getEditForm().isNew) {
-      if (saveCallback) {
-        this.fireCallback(saveCallback, "rowNum,colNum,editCompletionEvent,success", [rowNum, colNum, editCompletionEvent]);
+      if (originalCallback) {
+        this.fireCallback(originalCallback, "rowNum,colNum,editCompletionEvent,success", [rowNum, colNum, editCompletionEvent]);
       }
       return true;
     }
 
+    saveCallback = function () {
+      if (originalCallback) {
+        if (this.getSelectedRecord() && this.getSelectedRecord()[OB.Constants.ID]) {
+          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.fireCallback(originalCallback, "rowNum,colNum,editCompletionEvent,success", [rowNum, colNum, editCompletionEvent]);
+      }
+    };
+
     if (ficCallDone) {
       // reset the new values as this can have changed because of a fic call
       newValues = this.getEditValues(rowNum);
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js	Fri Oct 05 07:18:23 2012 +0000
@@ -1384,9 +1384,9 @@
   // - refresh the current selected record without changing the selection
   // - refresh the parent/grand-parent in the same way without changing the selection
   // - recursive to children: refresh the children, put the children in grid mode and refresh
-  refresh: function (refreshCallback, autoSaveDone, forceCurrentRecordId) {
+  refresh: function (refreshCallback, autoSaveDone, newRecordsToBeIncluded) {
     // If a record should be visible after the refresh, even if it does not comply with the
-    // current filter, its ID should be entered in the forceCurrentRecordId parameter
+    // current filter, its ID should be entered in the newRecordsToBeIncluded parameter
     // See issue https://issues.openbravo.com/view.php?id=20722
     var me = this,
         view = this,
@@ -1397,7 +1397,7 @@
       actionObject = {
         target: this,
         method: this.refresh,
-        parameters: [refreshCallback, true, forceCurrentRecordId]
+        parameters: [refreshCallback, true, newRecordsToBeIncluded]
       };
       this.standardWindow.doActionAfterAutoSave(actionObject, false);
       return;
@@ -1414,18 +1414,25 @@
       me.viewForm.refresh();
     };
 
+    if (!newRecordsToBeIncluded) {
+      if (this.parentRecordId && this.newRecordsAfterRefresh) {
+        this.newRecordsAfterRefresh[this.parentRecordId] = [];
+      } else {
+        this.newRecordsAfterRefresh = [];
+      }
+    }
     if (!this.isShowingForm) {
-      this.viewGrid.refreshGrid(refreshCallback, forceCurrentRecordId);
+      this.viewGrid.refreshGrid(refreshCallback, newRecordsToBeIncluded);
     } else {
       if (this.viewForm.hasChanged) {
         callback = function (ok) {
           if (ok) {
-            view.viewGrid.refreshGrid(formRefresh, forceCurrentRecordId);
+            view.viewGrid.refreshGrid(formRefresh, newRecordsToBeIncluded);
           }
         };
         isc.ask(OB.I18N.getLabel('OBUIAPP_ConfirmRefresh'), callback);
       } else {
-        this.viewGrid.refreshGrid(formRefresh, forceCurrentRecordId);
+        this.viewGrid.refreshGrid(formRefresh, newRecordsToBeIncluded);
       }
     }
   },
@@ -2069,7 +2076,11 @@
         OB.Utilities.fixNull250(currentValues);
 
         try {
-          originalShowIfValue = this.originalShowIf(item, value, form, currentValues, context);
+          if (isc.isA.Function(this.originalShowIf)) {
+            originalShowIfValue = this.originalShowIf(item, value, form, currentValues, context);
+          } else {
+            originalShowIfValue = isc.JSON.decode(this.originalShowIf);
+          }
         } catch (_exception) {
           isc.warn(_exception + ' ' + _exception.message + ' ' + _exception.stack);
         }
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-tab.js	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-tab.js	Fri Oct 05 07:18:23 2012 +0000
@@ -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/process/ob-pick-and-execute-grid.js	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-grid.js	Fri Oct 05 07:18:23 2012 +0000
@@ -48,6 +48,8 @@
     width: 32
   },
 
+  //The Cell should be validated each time the focus is changed.
+  validateByCell: true,
   // default selection
   selectionProperty: 'obSelected',
 
@@ -98,6 +100,10 @@
 
     // required to show the funnel icon and to work
     this.filterClause = this.gridProperties.filterClause;
+    if (this.filterClause && this.gridProperties.filterName) {
+      this.view.messageBar.setMessage(isc.OBMessageBar.TYPE_INFO, '<div><div class="' + OB.Styles.MessageBar.leftMsgContainerStyle + '">' + this.gridProperties.filterName + '<br/>' + OB.I18N.getLabel('OBUIAPP_ClearFilters') + '</div></div>', ' ');
+      this.view.messageBar.hasFilterMessage = true;
+    }
 
     this.orderByClause = this.gridProperties.orderByClause;
 
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-action-button.js	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-action-button.js	Fri Oct 05 07:18:23 2012 +0000
@@ -146,7 +146,7 @@
     afterRefresh = function (doRefresh) {
       var undef, refresh = (doRefresh === undef || doRefresh),
           autosaveDone = false,
-          currentRecordId;
+          currentRecordId, recordsAfterRefresh;
 
       // Refresh context view
       contextView.getTabMessage();
@@ -162,10 +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
-        if (currentView.viewGrid.getSelectedRecord()) {
-          currentRecordId = currentView.viewGrid.getSelectedRecord()[OB.Constants.ID];
+        if (currentView.parentTabId) {
+          recordsAfterRefresh = currentView.newRecordsAfterRefresh[currentView.parentTabId];
+        } else {
+          recordsAfterRefresh = currentView.newRecordsAfterRefresh;
         }
-        currentView.refresh(null, autosaveDone, currentRecordId);
+        currentView.refresh(null, autosaveDone, recordsAfterRefresh);
       }
     };
 
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js	Fri Oct 05 07:18:23 2012 +0000
@@ -207,7 +207,9 @@
       if (this.view.isShowingForm) {
         this.setDisabled(false);
       } else {
-        this.setDisabled(!this.view.isEditingGrid);
+        // Only enabled when the grid is being edited or when
+        // the selected records have errors
+        this.setDisabled(!this.view.isEditingGrid && this.view.hasNotChanged());
       }
     },
     keyboardShortcutId: 'ToolBar_Undo'
@@ -356,6 +358,9 @@
         this.setDisabled(false);
       }
       this.resetBaseStyle();
+      if (this.view.viewForm.readOnly && !this.view.attachmentExists) {
+        this.setDisabled(true);
+      }
     },
     keyboardShortcutId: 'ToolBar_Attachments'
   },
@@ -518,19 +523,7 @@
 
     this.Super('initWidget', arguments);
 
-    function getRandomId() {
-      var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz',
-          stringLength = 8,
-          randomString = '',
-          i, rnum;
-      for (i = 0; i < stringLength; i++) {
-        rnum = Math.floor(Math.random() * chars.length);
-        randomString += chars.substring(rnum, rnum + 1);
-      }
-      return randomString;
-    }
-
-    this.randomId = getRandomId();
+    this.randomId = OB.Utilities.generateRandomString(8, true, true, true, false);
 
     this.members = null;
 
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-keyboard-manager.js	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-keyboard-manager.js	Fri Oct 05 07:18:23 2012 +0000
@@ -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;
               }
@@ -330,6 +350,9 @@
   /* 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 () {
+    if (isc.Event.getKey() === 'Space') {
+      OB.KeyboardManager.Shortcuts.isSpacePressed = true;
+    }
     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();
@@ -337,4 +360,12 @@
     return response;
   };
 
+  isc.Canvas.getPrototype()._originalKeyUp = isc.Canvas.getPrototype().keyUp;
+  isc.Canvas.getPrototype().keyUp = function () {
+    if (isc.Event.getKey() === 'Space') {
+      OB.KeyboardManager.Shortcuts.isSpacePressed = false;
+    }
+    return this._originalKeyUp();
+  };
+
 }(OB, isc));
\ No newline at end of file
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities.js	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities.js	Fri Oct 05 07:18:23 2012 +0000
@@ -922,6 +922,51 @@
   return object[property];
 };
 
+//** {{{ OB.Utilities.generateRandomString }}} **
+//
+// Generates a random string based on the arguments
+// Parameters:
+//  * {{{stringLength}}} Length of the generated random string
+//  * {{{allowLowerCaseChars}}} Boolean to check if lower case characters are allowed (true by default)
+//  * {{{allowUpperCaseChars}}} Boolean to check if upper case characters are allowed (true by default)
+//  * {{{allowDigits}}} Boolean to check if digits are allowed (false by default)
+//  * {{{allowSpecialChars}}} Boolean to check if special characters are allowed (false by default)
+OB.Utilities.generateRandomString = function (stringLength, allowLowerCaseChars, allowUpperCaseChars, allowDigits, allowSpecialChars) {
+  stringLength = parseInt(stringLength, 10);
+  if (!stringLength) {
+    stringLength = 1;
+  }
+  allowLowerCaseChars = (allowLowerCaseChars !== false ? true : false);
+  allowUpperCaseChars = (allowUpperCaseChars !== false ? true : false);
+  allowDigits = (allowDigits !== true ? false : true);
+  allowSpecialChars = (allowSpecialChars !== true ? false : true);
+
+  var chars = '',
+      randomString = '',
+      i, rnum;
+  if (allowLowerCaseChars) {
+    chars += 'abcdefghijklmnopqrstuvwxyz';
+  }
+  if (allowUpperCaseChars) {
+    chars += 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
+  }
+  if (allowDigits) {
+    chars += '0123456789';
+  }
+  if (allowSpecialChars) {
+    chars += '!@#$%^&*()+=-[]\\\';,./{}|\":<>?~_';
+  }
+  if (chars === '') {
+    return '';
+  }
+
+  for (i = 0; i < stringLength; i++) {
+    rnum = Math.floor(Math.random() * chars.length);
+    randomString += chars.substring(rnum, rnum + 1);
+  }
+  return randomString;
+};
+
 /* This function will return true if it receives a string parameter, and 
  * which complies with the OB UUID format (that is, its a
  * hexadecimal number of length 32)
--- a/modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE.xml	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -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.17889]]></VERSION>
+<!--D393BE6F22BB44B7B728259B34FC795A-->  <VERSION><![CDATA[1.0.18121]]></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>
@@ -21,7 +21,7 @@
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <HASCHARTOFACCOUNTS><![CDATA[N]]></HASCHARTOFACCOUNTS>
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
-<!--D393BE6F22BB44B7B728259B34FC795A-->  <VERSION_LABEL><![CDATA[MP15.1]]></VERSION_LABEL>
+<!--D393BE6F22BB44B7B728259B34FC795A-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--D393BE6F22BB44B7B728259B34FC795A--></AD_MODULE>
--- a/modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -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.17889]]></STARTVERSION>
+<!--DCE798FBC5B648F7A3C81A6941720A57-->  <STARTVERSION><![CDATA[2.1.18121]]></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 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -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.17889]]></VERSION>
+<!--4B828F4D03264080AA1D2057B13F613C-->  <VERSION><![CDATA[2.1.18121]]></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>
@@ -22,7 +22,7 @@
 <!--4B828F4D03264080AA1D2057B13F613C-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--4B828F4D03264080AA1D2057B13F613C-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
 <!--4B828F4D03264080AA1D2057B13F613C-->  <UPDATEINFO><![CDATA[Bug fix for issue 15289]]></UPDATEINFO>
-<!--4B828F4D03264080AA1D2057B13F613C-->  <VERSION_LABEL><![CDATA[MP15.1]]></VERSION_LABEL>
+<!--4B828F4D03264080AA1D2057B13F613C-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--4B828F4D03264080AA1D2057B13F613C-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--4B828F4D03264080AA1D2057B13F613C-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--4B828F4D03264080AA1D2057B13F613C--></AD_MODULE>
--- a/modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -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.17889]]></STARTVERSION>
+<!--26B041893E844A53AFA58BC326C4F0D7-->  <STARTVERSION><![CDATA[3.0.18121]]></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.17889]]></STARTVERSION>
+<!--3AB045DA35ED4CA58EF7EB5BF04CDE3F-->  <STARTVERSION><![CDATA[1.1.18121]]></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.17889]]></STARTVERSION>
+<!--D7BA4BB0844942C58DC46B9E23CF8E67-->  <STARTVERSION><![CDATA[2.0.18121]]></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 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -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.17889]]></VERSION>
+<!--2758CD25B2704AF6BBAD10365FC82C06-->  <VERSION><![CDATA[2.1.18121]]></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>
@@ -23,7 +23,7 @@
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <HASREFERENCEDATA><![CDATA[Y]]></HASREFERENCEDATA>
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <UPDATEINFO><![CDATA[Styling bugfixing]]></UPDATEINFO>
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <REFERENCEDATAINFO><![CDATA[Provides the infrastructure of workspace tab]]></REFERENCEDATAINFO>
-<!--2758CD25B2704AF6BBAD10365FC82C06-->  <VERSION_LABEL><![CDATA[MP15.1]]></VERSION_LABEL>
+<!--2758CD25B2704AF6BBAD10365FC82C06-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--2758CD25B2704AF6BBAD10365FC82C06--></AD_MODULE>
--- a/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -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.17889]]></STARTVERSION>
+<!--15F51F03882F444CAB6593B4566DC929-->  <STARTVERSION><![CDATA[2.1.18121]]></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.17889]]></STARTVERSION>
+<!--E71B28FC949D481D9F59C17D01E46EF9-->  <STARTVERSION><![CDATA[3.0.18121]]></STARTVERSION>
 <!--E71B28FC949D481D9F59C17D01E46EF9-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--E71B28FC949D481D9F59C17D01E46EF9-->  <DEPENDANT_MODULE_NAME><![CDATA[Core]]></DEPENDANT_MODULE_NAME>
 <!--E71B28FC949D481D9F59C17D01E46EF9-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE.xml	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -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.17889]]></VERSION>
+<!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <VERSION><![CDATA[1.0.18121]]></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>
@@ -21,7 +21,7 @@
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <HASCHARTOFACCOUNTS><![CDATA[N]]></HASCHARTOFACCOUNTS>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
-<!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <VERSION_LABEL><![CDATA[MP15.1]]></VERSION_LABEL>
+<!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC--></AD_MODULE>
--- a/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -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.17889]]></STARTVERSION>
+<!--26558497C31140BFAB067BA4BC47D799-->  <STARTVERSION><![CDATA[2.1.18121]]></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 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.client.querylist/web/org.openbravo.client.querylist/js/ob-querylist-widget.js	Fri Oct 05 07:18:23 2012 +0000
@@ -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 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -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.17889]]></VERSION>
+<!--FF8080812D842086012D844F3CC0003E-->  <VERSION><![CDATA[0.0.18121]]></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>
@@ -22,7 +22,7 @@
 <!--FF8080812D842086012D844F3CC0003E-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--FF8080812D842086012D844F3CC0003E-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
 <!--FF8080812D842086012D844F3CC0003E-->  <UPDATEINFO><![CDATA[Added Currency Converter. Added Google Docs]]></UPDATEINFO>
-<!--FF8080812D842086012D844F3CC0003E-->  <VERSION_LABEL><![CDATA[MP15.1]]></VERSION_LABEL>
+<!--FF8080812D842086012D844F3CC0003E-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--FF8080812D842086012D844F3CC0003E-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--FF8080812D842086012D844F3CC0003E-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--FF8080812D842086012D844F3CC0003E--></AD_MODULE>
--- a/modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -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.17889]]></STARTVERSION>
+<!--FF8080812D842086012D845002070046-->  <STARTVERSION><![CDATA[2.1.18121]]></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 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -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.17889]]></VERSION>
+<!--2A5EE903D7974AC298C0504FBC4501A7-->  <VERSION><![CDATA[3.0.18121]]></VERSION>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <DESCRIPTION><![CDATA[Payment Report]]></DESCRIPTION>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <URL><![CDATA[http://forge.openbravo.com/projects/paymentreport]]></URL>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <TYPE><![CDATA[M]]></TYPE>
@@ -22,7 +22,7 @@
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <HASCHARTOFACCOUNTS><![CDATA[N]]></HASCHARTOFACCOUNTS>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
-<!--2A5EE903D7974AC298C0504FBC4501A7-->  <VERSION_LABEL><![CDATA[MP15.1]]></VERSION_LABEL>
+<!--2A5EE903D7974AC298C0504FBC4501A7-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--2A5EE903D7974AC298C0504FBC4501A7--></AD_MODULE>
--- a/modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -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.17889]]></STARTVERSION>
+<!--A3B449C4D5FE4D688CC58236FE33B802-->  <STARTVERSION><![CDATA[3.0.18121]]></STARTVERSION>
 <!--A3B449C4D5FE4D688CC58236FE33B802-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--A3B449C4D5FE4D688CC58236FE33B802-->  <DEPENDANT_MODULE_NAME><![CDATA[Advanced Payables and Receivables Mngmt]]></DEPENDANT_MODULE_NAME>
 <!--A3B449C4D5FE4D688CC58236FE33B802-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE.xml	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -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.17889]]></VERSION>
+<!--3A3A943684D64DEF9EC39F588A656848-->  <VERSION><![CDATA[1.1.18121]]></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>
@@ -19,7 +19,7 @@
 <!--3A3A943684D64DEF9EC39F588A656848-->  <HASCHARTOFACCOUNTS><![CDATA[N]]></HASCHARTOFACCOUNTS>
 <!--3A3A943684D64DEF9EC39F588A656848-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--3A3A943684D64DEF9EC39F588A656848-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
-<!--3A3A943684D64DEF9EC39F588A656848-->  <VERSION_LABEL><![CDATA[MP15.1]]></VERSION_LABEL>
+<!--3A3A943684D64DEF9EC39F588A656848-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--3A3A943684D64DEF9EC39F588A656848-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--3A3A943684D64DEF9EC39F588A656848-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--3A3A943684D64DEF9EC39F588A656848--></AD_MODULE>
--- a/modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -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.17889]]></STARTVERSION>
+<!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <STARTVERSION><![CDATA[3.0.18121]]></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 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -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.17889]]></VERSION>
+<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <VERSION><![CDATA[2.1.18121]]></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>
@@ -22,7 +22,7 @@
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <UPDATEINFO><![CDATA[Bug fixing & new development for 3.0]]></UPDATEINFO>
-<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <VERSION_LABEL><![CDATA[MP15.1]]></VERSION_LABEL>
+<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4--></AD_MODULE>
--- a/modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -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.17889]]></STARTVERSION>
+<!--0BA071C783CC4984AC9C03BB7CAA87C7-->  <STARTVERSION><![CDATA[1.1.18121]]></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.17889]]></STARTVERSION>
+<!--3E531F0CD0A54130996F5AF3B6A2D01B-->  <STARTVERSION><![CDATA[2.0.18121]]></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.17889]]></STARTVERSION>
+<!--4FCE95802A854F7E8623AFF7C33D13EE-->  <STARTVERSION><![CDATA[3.0.18121]]></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.17889]]></STARTVERSION>
+<!--54AF8B39C55E4E7496902893ECD82786-->  <STARTVERSION><![CDATA[2.1.18121]]></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.17889]]></STARTVERSION>
+<!--D03C56D8A4E14F45A5466350E05C631F-->  <STARTVERSION><![CDATA[8.1.18121]]></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/ReadOnlyDataSourceService.java	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/ReadOnlyDataSourceService.java	Fri Oct 05 07:18:23 2012 +0000
@@ -63,6 +63,9 @@
     if (endRowStr != null) {
       doCount = true;
     }
+    boolean preventCountOperation = !parameters.containsKey(JsonConstants.NOCOUNT_PARAMETER)
+        || "true".equals(parameters.get(JsonConstants.NOCOUNT_PARAMETER));
+
     final List<JSONObject> jsonObjects = fetchJSONObject(parameters);
 
     // now jsonfy the data
@@ -72,7 +75,7 @@
       jsonResponse.put(JsonConstants.RESPONSE_STATUS, JsonConstants.RPCREQUEST_STATUS_SUCCESS);
       jsonResponse.put(JsonConstants.RESPONSE_STARTROW, startRow);
       jsonResponse.put(JsonConstants.RESPONSE_ENDROW, jsonObjects.size() + startRow - 1);
-      if (doCount) {
+      if (doCount && !preventCountOperation) {
         int num = getCount(parameters);
         if (num == -1) {
           int endRow = Integer.parseInt(endRowStr);
--- a/modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE.xml	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -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.17889]]></VERSION>
+<!--FF8080813129ADA401312CA1222A0005-->  <VERSION><![CDATA[0.1.18121]]></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.
@@ -18,7 +18,7 @@
 <!--FF8080813129ADA401312CA1222A0005-->  <HASCHARTOFACCOUNTS><![CDATA[N]]></HASCHARTOFACCOUNTS>
 <!--FF8080813129ADA401312CA1222A0005-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--FF8080813129ADA401312CA1222A0005-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
-<!--FF8080813129ADA401312CA1222A0005-->  <VERSION_LABEL><![CDATA[MP15.1]]></VERSION_LABEL>
+<!--FF8080813129ADA401312CA1222A0005-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--FF8080813129ADA401312CA1222A0005-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--FF8080813129ADA401312CA1222A0005-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--FF8080813129ADA401312CA1222A0005--></AD_MODULE>
--- a/modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -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.17889]]></STARTVERSION>
+<!--FF8080813141B198013141BA0F7D0012-->  <STARTVERSION><![CDATA[0.1.18121]]></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.17889]]></STARTVERSION>
+<!--FF8080813151AEE1013151C4ACE6001B-->  <STARTVERSION><![CDATA[2.1.18121]]></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 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_TREENODE.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -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.google/src/org/openbravo/service/integration/google/GoogleAuthServlet.java	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.service.integration.google/src/org/openbravo/service/integration/google/GoogleAuthServlet.java	Fri Oct 05 07:18:23 2012 +0000
@@ -142,7 +142,7 @@
 
       User user = OpenIDManager.getInstance().getUser(oid);
 
-      if (user == null) {
+      if (user == null && oid != null) {
         user = createUser(oid, req, resp);
         if (user == null) {
           return;
@@ -151,10 +151,12 @@
 
       req.getSession(true).removeAttribute("#Authenticated_user");
 
-      String sessionId = createDBSession(req, user.getUsername(), user.getId());
-      req.getSession(true).setAttribute("#Authenticated_user", user.getId());
-      vars.setSessionValue("#AD_SESSION_ID", sessionId);
-      vars.setSessionValue("#LOGGINGIN", "Y");
+      if (user != null) {
+        String sessionId = createDBSession(req, user.getUsername(), user.getId());
+        req.getSession(true).setAttribute("#Authenticated_user", user.getId());
+        vars.setSessionValue("#AD_SESSION_ID", sessionId);
+        vars.setSessionValue("#LOGGINGIN", "Y");
+      }
 
       resp.sendRedirect(strDireccion + "/security/Menu.html");
 
--- a/modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE.xml	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -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.17889]]></VERSION>
+<!--FF8080813141B198013141B86DD70003-->  <VERSION><![CDATA[0.1.18121]]></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.
@@ -19,7 +19,7 @@
 <!--FF8080813141B198013141B86DD70003-->  <HASCHARTOFACCOUNTS><![CDATA[N]]></HASCHARTOFACCOUNTS>
 <!--FF8080813141B198013141B86DD70003-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--FF8080813141B198013141B86DD70003-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
-<!--FF8080813141B198013141B86DD70003-->  <VERSION_LABEL><![CDATA[MP15.1]]></VERSION_LABEL>
+<!--FF8080813141B198013141B86DD70003-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--FF8080813141B198013141B86DD70003-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--FF8080813141B198013141B86DD70003-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--FF8080813141B198013141B86DD70003--></AD_MODULE>
--- a/modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -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.17889]]></STARTVERSION>
+<!--FF8080813141B198013141B8B21B0006-->  <STARTVERSION><![CDATA[3.0.18121]]></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.integration.openid/src/org/openbravo/service/integration/openid/OpenIDManager.java	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.service.integration.openid/src/org/openbravo/service/integration/openid/OpenIDManager.java	Fri Oct 05 07:18:23 2012 +0000
@@ -136,6 +136,11 @@
   public User getUser(Identifier oid) throws OBException {
     User u = null;
 
+    if (oid == null) {
+      log.error("No user has been associated with the Google account");
+      return null;
+    }
+
     OBCriteria<OBSOIDUserIdentifier> userCriteria = OBDal.getInstance().createCriteria(
         OBSOIDUserIdentifier.class);
     userCriteria
--- a/modules/org.openbravo.service.json/src-db/database/sourcedata/AD_MODULE.xml	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.service.json/src-db/database/sourcedata/AD_MODULE.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -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.17889]]></VERSION>
+<!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <VERSION><![CDATA[2.0.18121]]></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>
@@ -22,7 +22,7 @@
 <!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
 <!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <UPDATEINFO><![CDATA[Bug fixing & new development for 3.0]]></UPDATEINFO>
-<!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <VERSION_LABEL><![CDATA[MP15.1]]></VERSION_LABEL>
+<!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--F8D1B3ECB3474E8DA5C216473C840DF1--></AD_MODULE>
--- a/modules/org.openbravo.service.json/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.service.json/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -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.17889]]></STARTVERSION>
+<!--9E3E7B42DB16405FB794496D309D7044-->  <STARTVERSION><![CDATA[3.0.18121]]></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 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODULE.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -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.17889]]></VERSION>
+<!--5EB4F15C80684ACA904756BDC12ADBE5-->  <VERSION><![CDATA[2.1.18121]]></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>
@@ -22,7 +22,7 @@
 <!--5EB4F15C80684ACA904756BDC12ADBE5-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--5EB4F15C80684ACA904756BDC12ADBE5-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
 <!--5EB4F15C80684ACA904756BDC12ADBE5-->  <UPDATEINFO><![CDATA[Bug fixing & new development for 3.0]]></UPDATEINFO>
-<!--5EB4F15C80684ACA904756BDC12ADBE5-->  <VERSION_LABEL><![CDATA[MP15.1]]></VERSION_LABEL>
+<!--5EB4F15C80684ACA904756BDC12ADBE5-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--5EB4F15C80684ACA904756BDC12ADBE5-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--5EB4F15C80684ACA904756BDC12ADBE5-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--5EB4F15C80684ACA904756BDC12ADBE5--></AD_MODULE>
--- a/modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -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.17889]]></STARTVERSION>
+<!--38825CAED43941D38CA0C78DB04FCFA0-->  <STARTVERSION><![CDATA[8.1.18121]]></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.17889]]></STARTVERSION>
+<!--6DDE7B1A70174242AF82B5022FB89279-->  <STARTVERSION><![CDATA[2.1.18121]]></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.17889]]></STARTVERSION>
+<!--94F9CD2CB5EF4467A67475C786C984A7-->  <STARTVERSION><![CDATA[2.1.18121]]></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.17889]]></STARTVERSION>
+<!--BCCB5A08EC0446DE8BCE191C6BC607A4-->  <STARTVERSION><![CDATA[1.1.18121]]></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.17889]]></STARTVERSION>
+<!--C8DAC574B88649D08C9468521B343F12-->  <STARTVERSION><![CDATA[3.0.18121]]></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.17889]]></STARTVERSION>
+<!--F14EB17946BE4724A46F80CB1A47EC70-->  <STARTVERSION><![CDATA[2.1.18121]]></STARTVERSION>
 <!--F14EB17946BE4724A46F80CB1A47EC70-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--F14EB17946BE4724A46F80CB1A47EC70-->  <DEPENDANT_MODULE_NAME><![CDATA[JSON Datasource]]></DEPENDANT_MODULE_NAME>
 <!--F14EB17946BE4724A46F80CB1A47EC70-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/SelectorFieldPropertyDataSource.java	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/SelectorFieldPropertyDataSource.java	Fri Oct 05 07:18:23 2012 +0000
@@ -22,6 +22,7 @@
 import java.util.List;
 import java.util.Map;
 
+import org.apache.commons.lang.StringUtils;
 import org.openbravo.base.model.Entity;
 import org.openbravo.base.model.ModelProvider;
 import org.openbravo.base.model.Property;
@@ -74,6 +75,13 @@
       if (prop.isOneToMany()) {
         toRemove.add(prop);
       }
+      // Blob columns have been disabled because they are not supported by the new selectors
+      // See issue https://issues.openbravo.com/view.php?id=13147
+      if (prop.getReferencedProperty() != null) {
+        if (StringUtils.equals(prop.getReferencedProperty().getColumnName(), "AD_Image_ID")) {
+          toRemove.add(prop);
+        }
+      }
     }
     entityProperties.removeAll(toRemove);
     return entityProperties;
--- a/modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js	Fri Oct 05 07:18:23 2012 +0000
@@ -618,6 +618,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++) {
@@ -644,7 +649,8 @@
   },
 
   getPickListFilterCriteria: function () {
-    var crit = this.Super('getPickListFilterCriteria', arguments);
+    var crit = this.Super('getPickListFilterCriteria', arguments),
+        operator;
     this.pickList.data.useClientFiltering = false;
     var criteria = {
       operator: 'or',
@@ -670,16 +676,21 @@
       displayFieldValue = crit[this.displayField];
     }
     if (displayFieldValue !== null) {
+      if (this.textMatchStyle === 'substring') {
+        operator = 'iContains';
+      } else {
+        operator = 'iStartsWith';
+      }
       for (i = 0; i < this.extraSearchFields.length; i++) {
         criteria.criteria.push({
           fieldName: this.extraSearchFields[i],
-          operator: 'iContains',
+          operator: operator,
           value: displayFieldValue
         });
       }
       criteria.criteria.push({
         fieldName: this.displayField,
-        operator: 'iContains',
+        operator: operator,
         value: displayFieldValue
       });
     }
@@ -702,6 +713,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 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -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.17889]]></VERSION>
+<!--96998CBC42744B3DBEE28AC8095C9335-->  <VERSION><![CDATA[2.0.18121]]></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>
@@ -23,7 +23,7 @@
 <!--96998CBC42744B3DBEE28AC8095C9335-->  <HASCHARTOFACCOUNTS><![CDATA[N]]></HASCHARTOFACCOUNTS>
 <!--96998CBC42744B3DBEE28AC8095C9335-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--96998CBC42744B3DBEE28AC8095C9335-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
-<!--96998CBC42744B3DBEE28AC8095C9335-->  <VERSION_LABEL><![CDATA[MP15.1]]></VERSION_LABEL>
+<!--96998CBC42744B3DBEE28AC8095C9335-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--96998CBC42744B3DBEE28AC8095C9335-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--96998CBC42744B3DBEE28AC8095C9335-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--96998CBC42744B3DBEE28AC8095C9335--></AD_MODULE>
--- a/modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -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.17889]]></STARTVERSION>
+<!--39BF75AD9AB3453698BF5DE29E727AA9-->  <STARTVERSION><![CDATA[3.0.18121]]></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 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.userinterface.smartclient/src-db/database/sourcedata/AD_MODULE.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -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.17889]]></VERSION>
+<!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <VERSION><![CDATA[8.1.18121]]></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>
@@ -23,7 +23,7 @@
 <!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
 <!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <UPDATEINFO><![CDATA[Bug fixing & new development for 3.0
 Updated to new SmartClient 8.3d 26-May-2012]]></UPDATEINFO>
-<!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <VERSION_LABEL><![CDATA[MP15.1]]></VERSION_LABEL>
+<!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--EC356CEE3D46416CA1EBEEB9AB82EDB9--></AD_MODULE>
--- a/modules/org.openbravo.userinterface.smartclient/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.userinterface.smartclient/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -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.17889]]></STARTVERSION>
+<!--086331E18477496B8AC74D2CFEBD1307-->  <STARTVERSION><![CDATA[3.0.18121]]></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.17889]]></STARTVERSION>
+<!--DC5D4EF450244482BD2B458DAA496333-->  <STARTVERSION><![CDATA[2.1.18121]]></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.17889]]></STARTVERSION>
+<!--F2AF15C0AF5540E393D96BE506E20648-->  <STARTVERSION><![CDATA[1.1.18121]]></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.v3.datasets/src-db/database/sourcedata/AD_MODULE.xml	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.v3.datasets/src-db/database/sourcedata/AD_MODULE.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -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.17889]]></VERSION>
+<!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <VERSION><![CDATA[3.0.18121]]></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
@@ -28,7 +28,7 @@
 <!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <HASREFERENCEDATA><![CDATA[Y]]></HASREFERENCEDATA>
 <!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <REFERENCEDATAINFO><![CDATA[Pre-configured collection of standard ERP roles]]></REFERENCEDATAINFO>
-<!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <VERSION_LABEL><![CDATA[MP15.1]]></VERSION_LABEL>
+<!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--883B5872CA0548F9AF2BBBE7D2DDFA61--></AD_MODULE>
--- a/modules/org.openbravo.v3.datasets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.v3.datasets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -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.17889]]></STARTVERSION>
+<!--148A000EE9A04A3CA653B1296A00B8E6-->  <STARTVERSION><![CDATA[3.0.18121]]></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.17889]]></STARTVERSION>
+<!--30F966407A6F4E15965821BAEE34D25B-->  <STARTVERSION><![CDATA[3.0.18121]]></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.17889]]></STARTVERSION>
+<!--F93CE30003B24F8F8886510B0065EECC-->  <STARTVERSION><![CDATA[1.1.18121]]></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 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.v3.framework/src-db/database/sourcedata/AD_MODULE.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -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.17889]]></VERSION>
+<!--7E48CDD73B7E493A8BED4F7253E7C989-->  <VERSION><![CDATA[2.1.18121]]></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>
@@ -24,7 +24,7 @@
 <!--7E48CDD73B7E493A8BED4F7253E7C989-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--7E48CDD73B7E493A8BED4F7253E7C989-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
 <!--7E48CDD73B7E493A8BED4F7253E7C989-->  <UPDATEINFO><![CDATA[minor bugfix release to include latest client.application 2.0.1, client.myob 2.0.2 and client.kernel 2.0.1]]></UPDATEINFO>
-<!--7E48CDD73B7E493A8BED4F7253E7C989-->  <VERSION_LABEL><![CDATA[MP15.1]]></VERSION_LABEL>
+<!--7E48CDD73B7E493A8BED4F7253E7C989-->  <VERSION_LABEL><![CDATA[CI]]></VERSION_LABEL>
 <!--7E48CDD73B7E493A8BED4F7253E7C989-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--7E48CDD73B7E493A8BED4F7253E7C989-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--7E48CDD73B7E493A8BED4F7253E7C989--></AD_MODULE>
--- a/modules/org.openbravo.v3.framework/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.v3.framework/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -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.17889]]></STARTVERSION>
+<!--01E1BCCEC9114DE0960538DF34E30E6F-->  <STARTVERSION><![CDATA[2.1.18121]]></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.17889]]></STARTVERSION>
+<!--025B181F63CA47B48A920F6983242390-->  <STARTVERSION><![CDATA[3.0.18121]]></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.17889]]></STARTVERSION>
+<!--054B4FEAF919478AA3FF27098A46D1D6-->  <STARTVERSION><![CDATA[2.1.18121]]></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.17889]]></STARTVERSION>
+<!--1FA6BAA6DC3A4434A6E62A0D1319A9D7-->  <STARTVERSION><![CDATA[1.0.18121]]></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.17889]]></STARTVERSION>
+<!--224754C3EF674C93B0D468F47BAAB824-->  <STARTVERSION><![CDATA[2.1.18121]]></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.17889]]></STARTVERSION>
+<!--5B72D24032DD4879A950194139D961B6-->  <STARTVERSION><![CDATA[2.1.18121]]></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.17889]]></STARTVERSION>
+<!--8730CA6A4224439D82E0DD31B3806E36-->  <STARTVERSION><![CDATA[1.0.18121]]></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.17889]]></STARTVERSION>
+<!--98C47FF058F8413B8A2B26036061446E-->  <STARTVERSION><![CDATA[8.1.18121]]></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.17889]]></STARTVERSION>
+<!--A6D7BA917B3B4DEABD7CA1BA00B01E8A-->  <STARTVERSION><![CDATA[2.0.18121]]></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.17889]]></STARTVERSION>
+<!--A9CB99330AF34944877F889DD8A0AB3C-->  <STARTVERSION><![CDATA[2.1.18121]]></STARTVERSION>
 <!--A9CB99330AF34944877F889DD8A0AB3C-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--A9CB99330AF34944877F889DD8A0AB3C-->  <DEPENDANT_MODULE_NAME><![CDATA[User Interface Client Kernel]]></DEPENDANT_MODULE_NAME>
 <!--A9CB99330AF34944877F889DD8A0AB3C-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -147,7 +147,7 @@
 <!--E72A053A403C4A98A189C105B850ADB0-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--E72A053A403C4A98A189C105B850ADB0-->  <AD_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_MODULE_ID>
 <!--E72A053A403C4A98A189C105B850ADB0-->  <AD_DEPENDENT_MODULE_ID><![CDATA[C70732EA90A14EC0916078B85CC33D2D]]></AD_DEPENDENT_MODULE_ID>
-<!--E72A053A403C4A98A189C105B850ADB0-->  <STARTVERSION><![CDATA[1.1.17889]]></STARTVERSION>
+<!--E72A053A403C4A98A189C105B850ADB0-->  <STARTVERSION><![CDATA[1.1.18121]]></STARTVERSION>
 <!--E72A053A403C4A98A189C105B850ADB0-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--E72A053A403C4A98A189C105B850ADB0-->  <DEPENDANT_MODULE_NAME><![CDATA[JBoss Weld]]></DEPENDANT_MODULE_NAME>
 <!--E72A053A403C4A98A189C105B850ADB0-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -161,7 +161,7 @@
 <!--F62443FC17DA4C0E84FBCA9F2E5B68C0-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--F62443FC17DA4C0E84FBCA9F2E5B68C0-->  <AD_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_MODULE_ID>
 <!--F62443FC17DA4C0E84FBCA9F2E5B68C0-->  <AD_DEPENDENT_MODULE_ID><![CDATA[F8D1B3ECB3474E8DA5C216473C840DF1]]></AD_DEPENDENT_MODULE_ID>
-<!--F62443FC17DA4C0E84FBCA9F2E5B68C0-->  <STARTVERSION><![CDATA[2.0.17889]]></STARTVERSION>
+<!--F62443FC17DA4C0E84FBCA9F2E5B68C0-->  <STARTVERSION><![CDATA[2.0.18121]]></STARTVERSION>
 <!--F62443FC17DA4C0E84FBCA9F2E5B68C0-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--F62443FC17DA4C0E84FBCA9F2E5B68C0-->  <DEPENDANT_MODULE_NAME><![CDATA[JSON REST Webservice]]></DEPENDANT_MODULE_NAME>
 <!--F62443FC17DA4C0E84FBCA9F2E5B68C0-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.v3/src-db/database/configScript.xml	Wed Oct 03 17:45:21 2012 +0000
+++ b/modules/org.openbravo.v3/src-db/database/configScript.xml	Fri Oct 05 07:18:23 2012 +0000
@@ -953,10 +953,6 @@
       <oldValue><![CDATA[Y]]></oldValue>
       <newValue><![CDATA[N]]></newValue>
     </columnDataChange>
-    <columnDataChange tablename="AD_FIELD" columnname="ISDISPLAYED" pkRow="6190">
-      <oldValue><![CDATA[Y]]></oldValue>
-      <newValue><![CDATA[N]]></newValue>
-    </columnDataChange>
     <columnDataChange tablename="AD_FIELD" columnname="ISDISPLAYED" pkRow="6298">
       <oldValue><![CDATA[Y]]></oldValue>
       <newValue><![CDATA[N]]></newValue>
@@ -1633,10 +1629,6 @@
       <oldValue><![CDATA[Y]]></oldValue>
       <newValue><![CDATA[N]]></newValue>
     </columnDataChange>
-    <columnDataChange tablename="AD_FIELD" columnname="ISDISPLAYED" pkRow="1003700002">
-      <oldValue><![CDATA[Y]]></oldValue>
-      <newValue><![CDATA[N]]></newValue>
-    </columnDataChange>
     <columnDataChange tablename="AD_FIELD" columnname="ISDISPLAYED" pkRow="1004400024">
       <oldValue><![CDATA[Y]]></oldValue>
       <newValue><![CDATA[N]]></newValue>