CI: promote changesets from pi to main
authorRM packaging bot <staff.rm@openbravo.com>
Wed, 26 Sep 2012 17:00:16 +0200
changeset 18017 b780e90c6452
parent 17888 2459d2903ba5 (current diff)
parent 18016 11b96b578718 (diff)
child 18051 74734fd26fcf
CI: promote changesets from pi to main
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-db/database/sourcedata/AD_VAL_RULE.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.application/web/org.openbravo.client.application/js/form/ob-view-form.js
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.service.json/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.service.json/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.userinterface.smartclient/src-db/database/sourcedata/AD_MODULE.xml
modules/org.openbravo.userinterface.smartclient/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
modules/org.openbravo.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/model/functions/C_INVOICE_POST.xml
src-db/database/model/functions/M_INOUT_POST.xml
src-db/database/sourcedata/AD_MODULE.xml
src-db/database/sourcedata/AD_REF_LIST.xml
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_GEN_PAYMENTSCHEDULE_INV.xml	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_GEN_PAYMENTSCHEDULE_INV.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_ELEMENT.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MESSAGE.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -231,6 +231,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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -6,7 +6,7 @@
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <NAME><![CDATA[Advanced Payables and Receivables Mngmt]]></NAME>
-<!--A918E3331C404B889D69AA9BFAFB23AC-->  <VERSION><![CDATA[3.0.17885]]></VERSION>
+<!--A918E3331C404B889D69AA9BFAFB23AC-->  <VERSION><![CDATA[3.0.17992]]></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]]></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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -7,7 +7,7 @@
 <!--89326AE95DAD449D85DFAB2C5B1C6683-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--89326AE95DAD449D85DFAB2C5B1C6683-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--89326AE95DAD449D85DFAB2C5B1C6683-->  <AD_DEPENDENT_MODULE_ID><![CDATA[5EB4F15C80684ACA904756BDC12ADBE5]]></AD_DEPENDENT_MODULE_ID>
-<!--89326AE95DAD449D85DFAB2C5B1C6683-->  <STARTVERSION><![CDATA[2.1.17885]]></STARTVERSION>
+<!--89326AE95DAD449D85DFAB2C5B1C6683-->  <STARTVERSION><![CDATA[2.1.17992]]></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.17885]]></STARTVERSION>
+<!--B97FC854C6DD41E692161585645A900F-->  <STARTVERSION><![CDATA[3.0.17992]]></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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_PROCESS_PARA.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_TAB.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_TEXTINTERFACES.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -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/OBUIAPP_PARAMETER.xml	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/OBUIAPP_PARAMETER.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/PaymentProposalPickEditLines.java	Wed Sep 26 17:00:16 2012 +0200
@@ -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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.html	Wed Sep 26 17:00:16 2012 +0200
@@ -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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.java	Wed Sep 26 17:00:16 2012 +0200
@@ -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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.html	Wed Sep 26 17:00:16 2012 +0200
@@ -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,
@@ -259,6 +261,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 +379,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 +442,7 @@
     displayLogicElement('paramUseCreditContainer', hasCredit );
     displayLogicElement('rowCredit', hasCredit );
     displayMulticurrencyControls();
+    
     if (isTrue('isReceipt')) {
         setWindowElementFocus(frm.inpActualPayment);
     } else {
@@ -447,6 +469,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 +889,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 +1121,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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.java	Wed Sep 26 17:00:16 2012 +0200
@@ -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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromInvoice.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromTransaction.html	Wed Sep 26 17:00:16 2012 +0200
@@ -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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromTransaction.java	Wed Sep 26 17:00:16 2012 +0200
@@ -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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddPaymentFromTransaction.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/MatchTransaction.java	Wed Sep 26 17:00:16 2012 +0200
@@ -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/algorithm/StandardMatchingAlgorithm.java	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/algorithm/StandardMatchingAlgorithm.java	Wed Sep 26 17:00:16 2012 +0200
@@ -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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/AdvPaymentMngtDao.java	Wed Sep 26 17:00:16 2012 +0200
@@ -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/utility/FIN_BankStatementImport.java	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_BankStatementImport.java	Wed Sep 26 17:00:16 2012 +0200
@@ -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/web/org.openbravo.advpaymentmngt/FIN_Utilities.js	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/FIN_Utilities.js	Wed Sep 26 17:00:16 2012 +0200
@@ -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,14 @@
   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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-utilities.js	Wed Sep 26 17:00:16 2012 +0200
@@ -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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -6,7 +6,7 @@
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <NAME><![CDATA[JBoss Weld]]></NAME>
-<!--C70732EA90A14EC0916078B85CC33D2D-->  <VERSION><![CDATA[1.1.17885]]></VERSION>
+<!--C70732EA90A14EC0916078B85CC33D2D-->  <VERSION><![CDATA[1.1.17992]]></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]]></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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -7,7 +7,7 @@
 <!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <AD_MODULE_ID><![CDATA[C70732EA90A14EC0916078B85CC33D2D]]></AD_MODULE_ID>
 <!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <STARTVERSION><![CDATA[3.0.17885]]></STARTVERSION>
+<!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <STARTVERSION><![CDATA[3.0.17992]]></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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.client.application/src-db/database/model/tables/OBUIAPP_NOTE.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -6,7 +6,7 @@
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <NAME><![CDATA[User Interface Application]]></NAME>
-<!--9BA0836A3CD74EE4AB48753A47211BCC-->  <VERSION><![CDATA[2.1.17885]]></VERSION>
+<!--9BA0836A3CD74EE4AB48753A47211BCC-->  <VERSION><![CDATA[2.1.17992]]></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]]></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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -7,7 +7,7 @@
 <!--15D7CE8D95D043189162DBABA54A1F61-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--15D7CE8D95D043189162DBABA54A1F61-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
 <!--15D7CE8D95D043189162DBABA54A1F61-->  <AD_DEPENDENT_MODULE_ID><![CDATA[A44B9BA75C354D8FB2E3F7D6EB6BFDC4]]></AD_DEPENDENT_MODULE_ID>
-<!--15D7CE8D95D043189162DBABA54A1F61-->  <STARTVERSION><![CDATA[2.1.17885]]></STARTVERSION>
+<!--15D7CE8D95D043189162DBABA54A1F61-->  <STARTVERSION><![CDATA[2.1.17992]]></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.17885]]></STARTVERSION>
+<!--60A170212F36499D83B8AD38D01F46B3-->  <STARTVERSION><![CDATA[2.1.17992]]></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.17885]]></STARTVERSION>
+<!--824D60CB352E4099B1D8C903CA139DAE-->  <STARTVERSION><![CDATA[3.0.17992]]></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.17885]]></STARTVERSION>
+<!--E8FD820AFE3D4FE08C02FC47769026AD-->  <STARTVERSION><![CDATA[8.1.17992]]></STARTVERSION>
 <!--E8FD820AFE3D4FE08C02FC47769026AD-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--E8FD820AFE3D4FE08C02FC47769026AD-->  <DEPENDANT_MODULE_NAME><![CDATA[Smartclient]]></DEPENDANT_MODULE_NAME>
 <!--E8FD820AFE3D4FE08C02FC47769026AD-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/MenuManager.java	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/MenuManager.java	Wed Sep 26 17:00:16 2012 +0200
@@ -85,6 +85,7 @@
         linkForms();
 
         removeInvisibleNodes();
+        removeInaccessibleNodes();
 
         // set the globals
         final MenuOption localCachedRoot = new MenuOption();
@@ -339,6 +340,44 @@
     menuOptions.removeAll(toRemove);
   }
 
+  private void removeInaccessibleNodes() {
+    final List<MenuOption> toRemove = new ArrayList<MenuOption>();
+    for (MenuOption menuOption : menuOptions) {
+      if (!isAccessible(menuOption)) {
+        toRemove.add(menuOption);
+      }
+    }
+    for (MenuOption menuOption : toRemove) {
+      if (menuOption.getParentMenuOption() != null) {
+        menuOption.getParentMenuOption().getChildren().remove(menuOption);
+      }
+    }
+    menuOptions.removeAll(toRemove);
+  }
+
+  private boolean isAccessible(MenuOption menuOption) {
+    // In order to be accessible, all its menu entry parents must be active;
+    MenuOption parentMenuOption = menuOption;
+    TreeNode treeNode = menuOption.getTreeNode();
+    Menu menuEntry = OBDal.getInstance().get(Menu.class, treeNode.getNode());
+    while (menuEntry != null && menuEntry.isActive()) {
+      parentMenuOption = parentMenuOption.getParentMenuOption();
+      if (parentMenuOption == null) {
+        treeNode = null;
+        menuEntry = null;
+      } else {
+        treeNode = parentMenuOption.getTreeNode();
+        menuEntry = OBDal.getInstance().get(Menu.class, treeNode.getNode());
+      }
+    }
+    if (menuEntry == null) {
+      // All its ancestors are active
+      return true;
+    } else {
+      return menuEntry.isActive();
+    }
+  }
+
   private void createInitialMenuList() {
     Role role = OBDal.getInstance().get(Role.class, roleId);
     final Tree tree;
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java	Wed Sep 26 17:00:16 2012 +0200
@@ -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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewFieldHandler.java	Wed Sep 26 17:00:16 2012 +0200
@@ -206,6 +206,10 @@
         continue;
       }
 
+      if (field.isStartnewline()) {
+        colNum = 1;
+      }
+
       if (field.getColumn() == null) {
         final OBClientClassField viewField = new OBClientClassField();
 
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-date.js	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-date.js	Wed Sep 26 17:00:16 2012 +0200
@@ -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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-list.js	Wed Sep 26 17:00:16 2012 +0200
@@ -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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-minidaterange.js	Wed Sep 26 17:00:16 2012 +0200
@@ -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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form-attachments.js	Wed Sep 26 17:00:16 2012 +0200
@@ -367,7 +367,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 +427,9 @@
       }
     });
     hLayout.addMember(downloadAllButton);
-    hLayout.addMember(removeAllButton);
+    if (!this.getForm().view.viewForm.readOnly) {
+      hLayout.addMember(removeAllButton);
+    }
 
     var downloadActions;
     downloadActions = function () {
@@ -495,7 +499,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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js	Wed Sep 26 17:00:16 2012 +0200
@@ -1493,6 +1493,11 @@
           return;
         }
 
+        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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-grid.js	Wed Sep 26 17:00:16 2012 +0200
@@ -279,19 +279,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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js	Wed Sep 26 17:00:16 2012 +0200
@@ -305,6 +305,19 @@
       this.contextMenu = this.getMenuConstructor().create({
         items: menuItems
       });
+      this.contextMenu.show = function () {
+        var me = this;
+        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 +1013,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 +1044,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 +2207,12 @@
       return;
     }
 
+    // If leaving the row...
+    if (editCompletionEvent === 'enter' || editCompletionEvent === 'arrow_up' || editCompletionEvent === 'arrow_down') {
+      // See issue https://issues.openbravo.com/view.php?id=19830
+      this.view.standardWindow.getDirtyEditForm().validateForm();
+    }
+
     this._leavingCell = true;
 
     if (newValue) {
@@ -2266,8 +2292,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 +2303,24 @@
 
     // 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.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);
@@ -2346,10 +2384,6 @@
         isc.Log.logDebug('hideInlineEditor has NO record and editColumnLayout', 'OB');
       }
       this.view.isEditingGrid = false;
-      // Update the tab title after the record has been saved or canceled
-      // to get rid of the '*' in the tab title
-      // See https://issues.openbravo.com/view.php?id=21709
-      this.view.updateTabTitle();
     }
 
     // always hide the clickmask, as it needs to be re-applied
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js	Wed Sep 26 17:00:16 2012 +0200
@@ -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,21 @@
       me.viewForm.refresh();
     };
 
+    if (!newRecordsToBeIncluded) {
+      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 +2072,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/process/ob-pick-and-execute-grid.js	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-grid.js	Wed Sep 26 17:00:16 2012 +0200
@@ -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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-action-button.js	Wed Sep 26 17:00:16 2012 +0200
@@ -162,10 +162,7 @@
         // 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];
-        }
-        currentView.refresh(null, autosaveDone, currentRecordId);
+        currentView.refresh(null, autosaveDone, currentView.newRecordsAfterRefresh);
       }
     };
 
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js	Wed Sep 26 17:00:16 2012 +0200
@@ -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-utilities.js	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities.js	Wed Sep 26 17:00:16 2012 +0200
@@ -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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -6,7 +6,7 @@
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <NAME><![CDATA[HTML Widget]]></NAME>
-<!--D393BE6F22BB44B7B728259B34FC795A-->  <VERSION><![CDATA[1.0.17885]]></VERSION>
+<!--D393BE6F22BB44B7B728259B34FC795A-->  <VERSION><![CDATA[1.0.17992]]></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]]></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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -7,7 +7,7 @@
 <!--DCE798FBC5B648F7A3C81A6941720A57-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--DCE798FBC5B648F7A3C81A6941720A57-->  <AD_MODULE_ID><![CDATA[D393BE6F22BB44B7B728259B34FC795A]]></AD_MODULE_ID>
 <!--DCE798FBC5B648F7A3C81A6941720A57-->  <AD_DEPENDENT_MODULE_ID><![CDATA[2758CD25B2704AF6BBAD10365FC82C06]]></AD_DEPENDENT_MODULE_ID>
-<!--DCE798FBC5B648F7A3C81A6941720A57-->  <STARTVERSION><![CDATA[2.1.17885]]></STARTVERSION>
+<!--DCE798FBC5B648F7A3C81A6941720A57-->  <STARTVERSION><![CDATA[2.1.17992]]></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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -6,7 +6,7 @@
 <!--4B828F4D03264080AA1D2057B13F613C-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--4B828F4D03264080AA1D2057B13F613C-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--4B828F4D03264080AA1D2057B13F613C-->  <NAME><![CDATA[User Interface Client Kernel]]></NAME>
-<!--4B828F4D03264080AA1D2057B13F613C-->  <VERSION><![CDATA[2.1.17885]]></VERSION>
+<!--4B828F4D03264080AA1D2057B13F613C-->  <VERSION><![CDATA[2.1.17992]]></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]]></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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -7,7 +7,7 @@
 <!--26B041893E844A53AFA58BC326C4F0D7-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--26B041893E844A53AFA58BC326C4F0D7-->  <AD_MODULE_ID><![CDATA[4B828F4D03264080AA1D2057B13F613C]]></AD_MODULE_ID>
 <!--26B041893E844A53AFA58BC326C4F0D7-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--26B041893E844A53AFA58BC326C4F0D7-->  <STARTVERSION><![CDATA[3.0.17885]]></STARTVERSION>
+<!--26B041893E844A53AFA58BC326C4F0D7-->  <STARTVERSION><![CDATA[3.0.17992]]></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.17885]]></STARTVERSION>
+<!--3AB045DA35ED4CA58EF7EB5BF04CDE3F-->  <STARTVERSION><![CDATA[1.1.17992]]></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.17885]]></STARTVERSION>
+<!--D7BA4BB0844942C58DC46B9E23CF8E67-->  <STARTVERSION><![CDATA[2.0.17992]]></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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -6,7 +6,7 @@
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <NAME><![CDATA[Workspace & Widgets]]></NAME>
-<!--2758CD25B2704AF6BBAD10365FC82C06-->  <VERSION><![CDATA[2.1.17885]]></VERSION>
+<!--2758CD25B2704AF6BBAD10365FC82C06-->  <VERSION><![CDATA[2.1.17992]]></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]]></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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -7,7 +7,7 @@
 <!--15F51F03882F444CAB6593B4566DC929-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--15F51F03882F444CAB6593B4566DC929-->  <AD_MODULE_ID><![CDATA[2758CD25B2704AF6BBAD10365FC82C06]]></AD_MODULE_ID>
 <!--15F51F03882F444CAB6593B4566DC929-->  <AD_DEPENDENT_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_DEPENDENT_MODULE_ID>
-<!--15F51F03882F444CAB6593B4566DC929-->  <STARTVERSION><![CDATA[2.1.17885]]></STARTVERSION>
+<!--15F51F03882F444CAB6593B4566DC929-->  <STARTVERSION><![CDATA[2.1.17992]]></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.17885]]></STARTVERSION>
+<!--E71B28FC949D481D9F59C17D01E46EF9-->  <STARTVERSION><![CDATA[3.0.17992]]></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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -6,7 +6,7 @@
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <NAME><![CDATA[Query/List Widget]]></NAME>
-<!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <VERSION><![CDATA[1.0.17885]]></VERSION>
+<!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <VERSION><![CDATA[1.0.17992]]></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]]></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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -7,7 +7,7 @@
 <!--26558497C31140BFAB067BA4BC47D799-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--26558497C31140BFAB067BA4BC47D799-->  <AD_MODULE_ID><![CDATA[0A060B2AF1974E8EAA8DB61388E9AECC]]></AD_MODULE_ID>
 <!--26558497C31140BFAB067BA4BC47D799-->  <AD_DEPENDENT_MODULE_ID><![CDATA[2758CD25B2704AF6BBAD10365FC82C06]]></AD_DEPENDENT_MODULE_ID>
-<!--26558497C31140BFAB067BA4BC47D799-->  <STARTVERSION><![CDATA[2.1.17885]]></STARTVERSION>
+<!--26558497C31140BFAB067BA4BC47D799-->  <STARTVERSION><![CDATA[2.1.17992]]></STARTVERSION>
 <!--26558497C31140BFAB067BA4BC47D799-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--26558497C31140BFAB067BA4BC47D799-->  <DEPENDANT_MODULE_NAME><![CDATA[My Openbravo Tab]]></DEPENDANT_MODULE_NAME>
 <!--26558497C31140BFAB067BA4BC47D799-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE.xml	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -6,7 +6,7 @@
 <!--FF8080812D842086012D844F3CC0003E-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--FF8080812D842086012D844F3CC0003E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF8080812D842086012D844F3CC0003E-->  <NAME><![CDATA[Widgets Collection]]></NAME>
-<!--FF8080812D842086012D844F3CC0003E-->  <VERSION><![CDATA[0.0.17885]]></VERSION>
+<!--FF8080812D842086012D844F3CC0003E-->  <VERSION><![CDATA[0.0.17992]]></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]]></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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -7,7 +7,7 @@
 <!--FF8080812D842086012D845002070046-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF8080812D842086012D845002070046-->  <AD_MODULE_ID><![CDATA[FF8080812D842086012D844F3CC0003E]]></AD_MODULE_ID>
 <!--FF8080812D842086012D845002070046-->  <AD_DEPENDENT_MODULE_ID><![CDATA[2758CD25B2704AF6BBAD10365FC82C06]]></AD_DEPENDENT_MODULE_ID>
-<!--FF8080812D842086012D845002070046-->  <STARTVERSION><![CDATA[2.1.17885]]></STARTVERSION>
+<!--FF8080812D842086012D845002070046-->  <STARTVERSION><![CDATA[2.1.17992]]></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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -6,7 +6,7 @@
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <NAME><![CDATA[Payment Report]]></NAME>
-<!--2A5EE903D7974AC298C0504FBC4501A7-->  <VERSION><![CDATA[3.0.17885]]></VERSION>
+<!--2A5EE903D7974AC298C0504FBC4501A7-->  <VERSION><![CDATA[3.0.17992]]></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]]></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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -7,7 +7,7 @@
 <!--A3B449C4D5FE4D688CC58236FE33B802-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--A3B449C4D5FE4D688CC58236FE33B802-->  <AD_MODULE_ID><![CDATA[2A5EE903D7974AC298C0504FBC4501A7]]></AD_MODULE_ID>
 <!--A3B449C4D5FE4D688CC58236FE33B802-->  <AD_DEPENDENT_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_DEPENDENT_MODULE_ID>
-<!--A3B449C4D5FE4D688CC58236FE33B802-->  <STARTVERSION><![CDATA[3.0.17885]]></STARTVERSION>
+<!--A3B449C4D5FE4D688CC58236FE33B802-->  <STARTVERSION><![CDATA[3.0.17992]]></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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -6,7 +6,7 @@
 <!--3A3A943684D64DEF9EC39F588A656848-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--3A3A943684D64DEF9EC39F588A656848-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--3A3A943684D64DEF9EC39F588A656848-->  <NAME><![CDATA[Orders Awaiting Delivery]]></NAME>
-<!--3A3A943684D64DEF9EC39F588A656848-->  <VERSION><![CDATA[1.1.17885]]></VERSION>
+<!--3A3A943684D64DEF9EC39F588A656848-->  <VERSION><![CDATA[1.1.17992]]></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]]></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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -7,7 +7,7 @@
 <!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <AD_MODULE_ID><![CDATA[3A3A943684D64DEF9EC39F588A656848]]></AD_MODULE_ID>
 <!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <STARTVERSION><![CDATA[3.0.17885]]></STARTVERSION>
+<!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <STARTVERSION><![CDATA[3.0.17992]]></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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -6,7 +6,7 @@
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <NAME><![CDATA[JSON Datasource]]></NAME>
-<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <VERSION><![CDATA[2.1.17885]]></VERSION>
+<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <VERSION><![CDATA[2.1.17992]]></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]]></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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -7,7 +7,7 @@
 <!--0BA071C783CC4984AC9C03BB7CAA87C7-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--0BA071C783CC4984AC9C03BB7CAA87C7-->  <AD_MODULE_ID><![CDATA[A44B9BA75C354D8FB2E3F7D6EB6BFDC4]]></AD_MODULE_ID>
 <!--0BA071C783CC4984AC9C03BB7CAA87C7-->  <AD_DEPENDENT_MODULE_ID><![CDATA[C70732EA90A14EC0916078B85CC33D2D]]></AD_DEPENDENT_MODULE_ID>
-<!--0BA071C783CC4984AC9C03BB7CAA87C7-->  <STARTVERSION><![CDATA[1.1.17885]]></STARTVERSION>
+<!--0BA071C783CC4984AC9C03BB7CAA87C7-->  <STARTVERSION><![CDATA[1.1.17992]]></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.17885]]></STARTVERSION>
+<!--3E531F0CD0A54130996F5AF3B6A2D01B-->  <STARTVERSION><![CDATA[2.0.17992]]></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.17885]]></STARTVERSION>
+<!--4FCE95802A854F7E8623AFF7C33D13EE-->  <STARTVERSION><![CDATA[3.0.17992]]></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.17885]]></STARTVERSION>
+<!--54AF8B39C55E4E7496902893ECD82786-->  <STARTVERSION><![CDATA[2.1.17992]]></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.17885]]></STARTVERSION>
+<!--D03C56D8A4E14F45A5466350E05C631F-->  <STARTVERSION><![CDATA[8.1.17992]]></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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/ReadOnlyDataSourceService.java	Wed Sep 26 17:00:16 2012 +0200
@@ -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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -6,7 +6,7 @@
 <!--FF8080813129ADA401312CA1222A0005-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--FF8080813129ADA401312CA1222A0005-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF8080813129ADA401312CA1222A0005-->  <NAME><![CDATA[Integration with Google APIs]]></NAME>
-<!--FF8080813129ADA401312CA1222A0005-->  <VERSION><![CDATA[0.1.17885]]></VERSION>
+<!--FF8080813129ADA401312CA1222A0005-->  <VERSION><![CDATA[0.1.17992]]></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]]></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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -7,7 +7,7 @@
 <!--FF8080813141B198013141BA0F7D0012-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF8080813141B198013141BA0F7D0012-->  <AD_MODULE_ID><![CDATA[FF8080813129ADA401312CA1222A0005]]></AD_MODULE_ID>
 <!--FF8080813141B198013141BA0F7D0012-->  <AD_DEPENDENT_MODULE_ID><![CDATA[FF8080813141B198013141B86DD70003]]></AD_DEPENDENT_MODULE_ID>
-<!--FF8080813141B198013141BA0F7D0012-->  <STARTVERSION><![CDATA[0.1.17885]]></STARTVERSION>
+<!--FF8080813141B198013141BA0F7D0012-->  <STARTVERSION><![CDATA[0.1.17992]]></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.17885]]></STARTVERSION>
+<!--FF8080813151AEE1013151C4ACE6001B-->  <STARTVERSION><![CDATA[2.1.17992]]></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/org/openbravo/service/integration/google/GoogleAuthServlet.java	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.service.integration.google/src/org/openbravo/service/integration/google/GoogleAuthServlet.java	Wed Sep 26 17:00:16 2012 +0200
@@ -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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -6,7 +6,7 @@
 <!--FF8080813141B198013141B86DD70003-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--FF8080813141B198013141B86DD70003-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF8080813141B198013141B86DD70003-->  <NAME><![CDATA[OpenID Service Integration]]></NAME>
-<!--FF8080813141B198013141B86DD70003-->  <VERSION><![CDATA[0.1.17885]]></VERSION>
+<!--FF8080813141B198013141B86DD70003-->  <VERSION><![CDATA[0.1.17992]]></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]]></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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -7,7 +7,7 @@
 <!--FF8080813141B198013141B8B21B0006-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF8080813141B198013141B8B21B0006-->  <AD_MODULE_ID><![CDATA[FF8080813141B198013141B86DD70003]]></AD_MODULE_ID>
 <!--FF8080813141B198013141B8B21B0006-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--FF8080813141B198013141B8B21B0006-->  <STARTVERSION><![CDATA[3.0.17885]]></STARTVERSION>
+<!--FF8080813141B198013141B8B21B0006-->  <STARTVERSION><![CDATA[3.0.17992]]></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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.service.integration.openid/src/org/openbravo/service/integration/openid/OpenIDManager.java	Wed Sep 26 17:00:16 2012 +0200
@@ -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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.service.json/src-db/database/sourcedata/AD_MODULE.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -6,7 +6,7 @@
 <!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <NAME><![CDATA[JSON REST Webservice]]></NAME>
-<!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <VERSION><![CDATA[2.0.17885]]></VERSION>
+<!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <VERSION><![CDATA[2.0.17992]]></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]]></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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.service.json/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -7,7 +7,7 @@
 <!--9E3E7B42DB16405FB794496D309D7044-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--9E3E7B42DB16405FB794496D309D7044-->  <AD_MODULE_ID><![CDATA[F8D1B3ECB3474E8DA5C216473C840DF1]]></AD_MODULE_ID>
 <!--9E3E7B42DB16405FB794496D309D7044-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--9E3E7B42DB16405FB794496D309D7044-->  <STARTVERSION><![CDATA[3.0.17885]]></STARTVERSION>
+<!--9E3E7B42DB16405FB794496D309D7044-->  <STARTVERSION><![CDATA[3.0.17992]]></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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODULE.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -6,7 +6,7 @@
 <!--5EB4F15C80684ACA904756BDC12ADBE5-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--5EB4F15C80684ACA904756BDC12ADBE5-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--5EB4F15C80684ACA904756BDC12ADBE5-->  <NAME><![CDATA[User Interface Selector]]></NAME>
-<!--5EB4F15C80684ACA904756BDC12ADBE5-->  <VERSION><![CDATA[2.1.17885]]></VERSION>
+<!--5EB4F15C80684ACA904756BDC12ADBE5-->  <VERSION><![CDATA[2.1.17992]]></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]]></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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -7,7 +7,7 @@
 <!--38825CAED43941D38CA0C78DB04FCFA0-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--38825CAED43941D38CA0C78DB04FCFA0-->  <AD_MODULE_ID><![CDATA[5EB4F15C80684ACA904756BDC12ADBE5]]></AD_MODULE_ID>
 <!--38825CAED43941D38CA0C78DB04FCFA0-->  <AD_DEPENDENT_MODULE_ID><![CDATA[EC356CEE3D46416CA1EBEEB9AB82EDB9]]></AD_DEPENDENT_MODULE_ID>
-<!--38825CAED43941D38CA0C78DB04FCFA0-->  <STARTVERSION><![CDATA[8.1.17885]]></STARTVERSION>
+<!--38825CAED43941D38CA0C78DB04FCFA0-->  <STARTVERSION><![CDATA[8.1.17992]]></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.17885]]></STARTVERSION>
+<!--6DDE7B1A70174242AF82B5022FB89279-->  <STARTVERSION><![CDATA[2.1.17992]]></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.17885]]></STARTVERSION>
+<!--94F9CD2CB5EF4467A67475C786C984A7-->  <STARTVERSION><![CDATA[2.1.17992]]></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.17885]]></STARTVERSION>
+<!--BCCB5A08EC0446DE8BCE191C6BC607A4-->  <STARTVERSION><![CDATA[1.1.17992]]></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.17885]]></STARTVERSION>
+<!--C8DAC574B88649D08C9468521B343F12-->  <STARTVERSION><![CDATA[3.0.17992]]></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.17885]]></STARTVERSION>
+<!--F14EB17946BE4724A46F80CB1A47EC70-->  <STARTVERSION><![CDATA[2.1.17992]]></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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.userinterface.selector/src/org/openbravo/userinterface/selector/SelectorFieldPropertyDataSource.java	Wed Sep 26 17:00:16 2012 +0200
@@ -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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js	Wed Sep 26 17:00:16 2012 +0200
@@ -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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -6,7 +6,7 @@
 <!--96998CBC42744B3DBEE28AC8095C9335-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--96998CBC42744B3DBEE28AC8095C9335-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--96998CBC42744B3DBEE28AC8095C9335-->  <NAME><![CDATA[2.50 to 3.00 Compatibility Skin]]></NAME>
-<!--96998CBC42744B3DBEE28AC8095C9335-->  <VERSION><![CDATA[2.0.17885]]></VERSION>
+<!--96998CBC42744B3DBEE28AC8095C9335-->  <VERSION><![CDATA[2.0.17992]]></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]]></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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -7,7 +7,7 @@
 <!--39BF75AD9AB3453698BF5DE29E727AA9-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--39BF75AD9AB3453698BF5DE29E727AA9-->  <AD_MODULE_ID><![CDATA[96998CBC42744B3DBEE28AC8095C9335]]></AD_MODULE_ID>
 <!--39BF75AD9AB3453698BF5DE29E727AA9-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--39BF75AD9AB3453698BF5DE29E727AA9-->  <STARTVERSION><![CDATA[3.0.17885]]></STARTVERSION>
+<!--39BF75AD9AB3453698BF5DE29E727AA9-->  <STARTVERSION><![CDATA[3.0.17992]]></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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.userinterface.smartclient/src-db/database/sourcedata/AD_MODULE.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -6,7 +6,7 @@
 <!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <NAME><![CDATA[Smartclient]]></NAME>
-<!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <VERSION><![CDATA[8.1.17885]]></VERSION>
+<!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <VERSION><![CDATA[8.1.17992]]></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]]></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	Mon Sep 24 11:25:21 2012 +0000
+++ b/modules/org.openbravo.userinterface.smartclient/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Sep 26 17:00:16 2012 +0200
@@ -7,7 +7,7 @@
 <!--086331E18477496B8AC74D2CFEBD1307-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--086331E18477496B8AC74D2CFEBD1307-->  <AD_MODULE_ID><![CDATA[EC356CEE3D46416CA1EBEEB9AB82EDB9]]></AD_MODULE_ID>
 <!--086331E18477496B8AC74D2CFEBD1307-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--086331E18477496B8AC74D2CFEBD1307-->  <STARTVERSION><![CDATA[3.0.17885]]></STARTVERSION>
+<!--086331E18477496B8AC74D2CFEBD1307-->  <STARTVERSION><![CDATA[3.0.17992]]></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.17885]]></STARTVERSION>
+<!--DC5D4EF450244482BD2B458DAA496333-->  <STARTVERSION><![CDATA[2.1.17992]]></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.17885]]></STARTVERSION>
+<!--F2AF15C0AF5540E393D96BE506E20648-->  <STARTVERSION><![CDATA[1.1.17992]]></STARTVERSION>
 <!--F2AF15C0AF5540E393D96BE506E20648-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--F2AF15C0AF5540E393D96BE506E20648-->  <DEPENDANT_MODULE_NAME><![CDATA[JBoss Weld]]></DEPENDANT_MODULE_NAME>
 <!--F2AF15C0AF5540E393D96BE506E20648-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>