[Process Group] Merge with PI
authorRafa de Miguel <rafael.demiguel@openbravo.com>
Fri, 13 Jun 2014 09:13:47 +0200
changeset 24028 03dab1a86f5f
parent 24027 951e93c9a305 (current diff)
parent 23478 3750b9712718 (diff)
child 24029 838907b3ec32
[Process Group] Merge with PI
src-db/database/sourcedata/AD_COLUMN.xml
src-db/database/sourcedata/AD_ELEMENT.xml
src-db/database/sourcedata/AD_FIELD.xml
src-db/database/sourcedata/AD_MESSAGE.xml
src-db/database/sourcedata/AD_REFERENCE.xml
src-db/database/sourcedata/AD_REF_LIST.xml
src-db/database/sourcedata/AD_TAB.xml
src-db/database/sourcedata/AD_TABLE.xml
--- a/.hgsigs	Thu Jun 12 18:58:57 2014 +0200
+++ b/.hgsigs	Fri Jun 13 09:13:47 2014 +0200
@@ -146,4 +146,6 @@
 43f6f77b25a9c7d51084945606d9047edc330fd9 0 iEYEABECAAYFAlL8iUMACgkQCX/oGf+2qkNl7ACfSjVPsngbBzCPO8LvR265DeT4c/QAni8NT/G2mfMPQIToawozPiOKNtQl
 798fae4fdaf127b043499f76df3decadaf36ba62 0 iEYEABECAAYFAlMOzmsACgkQCX/oGf+2qkOFaACeNhkWHX9QfZ2zhxYiyjgbjenzvnkAoIb5zBld70lqFa7N0rOsf32Rb0Lo
 54ac6316c5c34c5eb2c4dfa95a504b3ecd5a33cb 0 iEYEABECAAYFAlNw/70ACgkQCX/oGf+2qkMO1wCfbXNv+SWd0NrkIw75mUSyu31zi6cAnRgI/Rj3MoUIu7VDDBhLbZnq21OR
+edac701bed6828715cff776651dac79d309674ca 0 iEYEABECAAYFAlOWq2kACgkQCX/oGf+2qkOzsQCfQUbf6PPjT2hXJz31XB7Wnn6vXUUAn0BB3aVsVa2uqv+VxNdO1GlAd+MN
 82edc3e63e3d23403efb378924c8e8f991c73cfc 0 iEYEABECAAYFAlNjfr0ACgkQCX/oGf+2qkPLVwCgowJ6SZ7/i3HJzN7KzIEqRxY60+MAoJbXOSIqx3xHRoG/yeZSdSST8zIV
+7de34ade782eae3f74b2df2471292e0da145eb47 0 iEYEABECAAYFAlN95g4ACgkQCX/oGf+2qkO62ACg74llt2Ngb7UyteX/drSuZ6/U8mIAn2I3sFYMtTZ3jzjR5zGOJ3M8/Ah0
--- a/.hgtags	Thu Jun 12 18:58:57 2014 +0200
+++ b/.hgtags	Fri Jun 13 09:13:47 2014 +0200
@@ -157,4 +157,6 @@
 510340c73c5073cf20afd52a02e411cebdc017f6 3.0MP31.1
 3044ba5dda0c5f188fbea125287005ef4b06ee76 3.0MP31.2
 70267e407fec28ae0268e89686dfe6e551614d16 3.0MP31.3
+8f75794bc0d9e07225605892bb036f89f82070b0 3.0MP31.4
 2dac23c5332cf7fab337385841dcd65e9eaf78c0 3.0PR14Q2
+6b79b2cff11381014860b41d7db9c3835c87069b 3.0PR14Q2.1
Binary file modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/AlertsForWrongOrders.class has changed
Binary file modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/AlertsForWrongOrdersData.class has changed
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_GEN_PAYMENTSCHEDULE_ORD.xml	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/model/functions/APRM_GEN_PAYMENTSCHEDULE_ORD.xml	Fri Jun 13 09:13:47 2014 +0200
@@ -39,6 +39,7 @@
 v_docSubType c_doctype.docsubtypeso%TYPE;
 v_PaymentPriority VARCHAR(32);
 v_count NUMBER;
+v_Documentno Fin_Payment.DocumentNo%TYPE;
 
 TYPE RECORD IS REF CURSOR;
 Cur_Params RECORD;
@@ -192,6 +193,17 @@
       IF (v_count <> 0) THEN
         RAISE_APPLICATION_ERROR(-20000, '@APRM_OrderWithPayments@');
       END IF;
+      SELECT count(*), max(p.DocumentNo)
+        INTO v_count, v_DocumentNo
+      FROM fin_payment_schedule ps, fin_payment_scheduledetail psd,
+      fin_payment_detail pd, fin_payment p
+      WHERE ps.fin_payment_schedule_id = psd.fin_payment_schedule_order
+        AND ps.c_order_id = p_record_id
+        AND psd.fin_payment_detail_id = pd.fin_payment_detail_id
+        AND pd.fin_payment_id = p.fin_payment_id;
+      IF (v_count <> 0) THEN
+        RAISE_APPLICATION_ERROR(-20000, '@APRM_OrderWithPayments@'||v_DocumentNo);
+      END IF;
       v_resultstr:='Update/Delete scheduled payments details';
       FOR Cur_PaymentScheduleDetail IN (
         SELECT psd.*
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_AUXILIARINPUT.xml	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_AUXILIARINPUT.xml	Fri Jun 13 09:13:47 2014 +0200
@@ -11,6 +11,23 @@
 <!--06A84BC3EC66453191652F4F3A6859C1-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--06A84BC3EC66453191652F4F3A6859C1--></AD_AUXILIARINPUT>
 
+<!--1570DEA796EC4EE0A9AB562BC2E14C66--><AD_AUXILIARINPUT>
+<!--1570DEA796EC4EE0A9AB562BC2E14C66-->  <AD_AUXILIARINPUT_ID><![CDATA[1570DEA796EC4EE0A9AB562BC2E14C66]]></AD_AUXILIARINPUT_ID>
+<!--1570DEA796EC4EE0A9AB562BC2E14C66-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--1570DEA796EC4EE0A9AB562BC2E14C66-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--1570DEA796EC4EE0A9AB562BC2E14C66-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--1570DEA796EC4EE0A9AB562BC2E14C66-->  <AD_TAB_ID><![CDATA[FF8080813320657F0133209DE21B0042]]></AD_TAB_ID>
+<!--1570DEA796EC4EE0A9AB562BC2E14C66-->  <NAME><![CDATA[ISMANUAL]]></NAME>
+<!--1570DEA796EC4EE0A9AB562BC2E14C66-->  <CODE><![CDATA[@SQL=select case when  max(fin_reconciliation_id) is  null then 'N' else 'Y' end
+from fin_reconciliation
+where fin_reconciliation_id = @FIN_RECONCILIATION_ID@
+and processed = 'Y'
+and not exists (select 1 from fin_finacc_transaction, fin_bankstatementline
+								where fin_finacc_transaction.fin_reconciliation_id = fin_reconciliation.fin_reconciliation_id
+								and fin_finacc_transaction.fin_finacc_transaction_id = fin_bankstatementline.fin_finacc_transaction_id)]]></CODE>
+<!--1570DEA796EC4EE0A9AB562BC2E14C66-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--1570DEA796EC4EE0A9AB562BC2E14C66--></AD_AUXILIARINPUT>
+
 <!--21943DF0B89F4AE3AF14A9C06F1181C2--><AD_AUXILIARINPUT>
 <!--21943DF0B89F4AE3AF14A9C06F1181C2-->  <AD_AUXILIARINPUT_ID><![CDATA[21943DF0B89F4AE3AF14A9C06F1181C2]]></AD_AUXILIARINPUT_ID>
 <!--21943DF0B89F4AE3AF14A9C06F1181C2-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml	Fri Jun 13 09:13:47 2014 +0200
@@ -5251,6 +5251,7 @@
 <!--5422F2DED3234598A429221281F8B61D-->  <AD_COLUMN_ID><![CDATA[F362B84F4718449EAD840F1C25667B37]]></AD_COLUMN_ID>
 <!--5422F2DED3234598A429221281F8B61D-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--5422F2DED3234598A429221281F8B61D-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--5422F2DED3234598A429221281F8B61D-->  <DISPLAYLOGIC><![CDATA[@Processed@='Y'&@APRM_LASTREC@!@FIN_Reconciliation_ID@&@ISMANUAL@!'Y']]></DISPLAYLOGIC>
 <!--5422F2DED3234598A429221281F8B61D-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
 <!--5422F2DED3234598A429221281F8B61D-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--5422F2DED3234598A429221281F8B61D-->  <SEQNO><![CDATA[170]]></SEQNO>
@@ -19475,7 +19476,7 @@
 <!--F195EACFC9FD47C6BA15B51B6A10F25E-->  <AD_COLUMN_ID><![CDATA[422F3732DA324AE2AA34AE2E44D42037]]></AD_COLUMN_ID>
 <!--F195EACFC9FD47C6BA15B51B6A10F25E-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--F195EACFC9FD47C6BA15B51B6A10F25E-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--F195EACFC9FD47C6BA15B51B6A10F25E-->  <DISPLAYLOGIC><![CDATA[@Processed@='Y'&@APRM_LASTREC@!@FIN_Reconciliation_ID@]]></DISPLAYLOGIC>
+<!--F195EACFC9FD47C6BA15B51B6A10F25E-->  <DISPLAYLOGIC><![CDATA[@Processed@='Y'&@APRM_LASTREC@!@FIN_Reconciliation_ID@&@ISMANUAL@!'Y']]></DISPLAYLOGIC>
 <!--F195EACFC9FD47C6BA15B51B6A10F25E-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
 <!--F195EACFC9FD47C6BA15B51B6A10F25E-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--F195EACFC9FD47C6BA15B51B6A10F25E-->  <SEQNO><![CDATA[190]]></SEQNO>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MESSAGE.xml	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MESSAGE.xml	Fri Jun 13 09:13:47 2014 +0200
@@ -577,6 +577,18 @@
 <!--7DEF5C1A3377434AA34149E9777DE4D6-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
 <!--7DEF5C1A3377434AA34149E9777DE4D6--></AD_MESSAGE>
 
+<!--7E4B7FD8E75E4C28B6A35DDC350B36AE--><AD_MESSAGE>
+<!--7E4B7FD8E75E4C28B6A35DDC350B36AE-->  <AD_MESSAGE_ID><![CDATA[7E4B7FD8E75E4C28B6A35DDC350B36AE]]></AD_MESSAGE_ID>
+<!--7E4B7FD8E75E4C28B6A35DDC350B36AE-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--7E4B7FD8E75E4C28B6A35DDC350B36AE-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--7E4B7FD8E75E4C28B6A35DDC350B36AE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--7E4B7FD8E75E4C28B6A35DDC350B36AE-->  <VALUE><![CDATA[APRM_PaymentDateMandatory]]></VALUE>
+<!--7E4B7FD8E75E4C28B6A35DDC350B36AE-->  <MSGTEXT><![CDATA[Payment date field cannot be left blank.]]></MSGTEXT>
+<!--7E4B7FD8E75E4C28B6A35DDC350B36AE-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--7E4B7FD8E75E4C28B6A35DDC350B36AE-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--7E4B7FD8E75E4C28B6A35DDC350B36AE-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
+<!--7E4B7FD8E75E4C28B6A35DDC350B36AE--></AD_MESSAGE>
+
 <!--7EF14E73C8EB4C33B302885E2FBDD0EE--><AD_MESSAGE>
 <!--7EF14E73C8EB4C33B302885E2FBDD0EE-->  <AD_MESSAGE_ID><![CDATA[7EF14E73C8EB4C33B302885E2FBDD0EE]]></AD_MESSAGE_ID>
 <!--7EF14E73C8EB4C33B302885E2FBDD0EE-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE.xml	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE.xml	Fri Jun 13 09:13:47 2014 +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.23010]]></VERSION>
+<!--A918E3331C404B889D69AA9BFAFB23AC-->  <VERSION><![CDATA[3.0.23473]]></VERSION>
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <DESCRIPTION><![CDATA[Managing your finances with an ERP does not have to be difficult. Enjoy a radically improved user experience that combines the power of an enterprise grade financial application with the simplicity and ease of a web 2.0 personal accounting service.]]></DESCRIPTION>
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <HELP><![CDATA[Advanced Payables and Receivables Management simplifies and automates the business processes around the management of financial accounts, from the receipt and issue of payment, to the reconciliation of those events with bank statements.
 If you would like to help shape this module you are welcome to take part in the forum discussions or register feature requests or issues in the corresponding (Forum and Bug Tracking) sections in the Advanced Payables and Receivable project in the OB Forge.]]></HELP>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Jun 13 09:13:47 2014 +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.23010]]></STARTVERSION>
+<!--89326AE95DAD449D85DFAB2C5B1C6683-->  <STARTVERSION><![CDATA[2.1.23473]]></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.23010]]></STARTVERSION>
+<!--B97FC854C6DD41E692161585645A900F-->  <STARTVERSION><![CDATA[3.0.23473]]></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.xml	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_PROCESS.xml	Fri Jun 13 09:13:47 2014 +0200
@@ -345,6 +345,30 @@
 <!--7AC7BE9024E448A0BB863C159DA762F9-->  <IS_EXPLICIT_ACCESS><![CDATA[N]]></IS_EXPLICIT_ACCESS>
 <!--7AC7BE9024E448A0BB863C159DA762F9--></AD_PROCESS>
 
+<!--AA64E3BA23F24D4F8E6B06970500FC70--><AD_PROCESS>
+<!--AA64E3BA23F24D4F8E6B06970500FC70-->  <AD_PROCESS_ID><![CDATA[AA64E3BA23F24D4F8E6B06970500FC70]]></AD_PROCESS_ID>
+<!--AA64E3BA23F24D4F8E6B06970500FC70-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--AA64E3BA23F24D4F8E6B06970500FC70-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--AA64E3BA23F24D4F8E6B06970500FC70-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--AA64E3BA23F24D4F8E6B06970500FC70-->  <VALUE><![CDATA[recordid2]]></VALUE>
+<!--AA64E3BA23F24D4F8E6B06970500FC70-->  <NAME><![CDATA[Open Balances: Review historical data]]></NAME>
+<!--AA64E3BA23F24D4F8E6B06970500FC70-->  <DESCRIPTION><![CDATA[Review historical data to fulfill required information for 'Open Balances' project]]></DESCRIPTION>
+<!--AA64E3BA23F24D4F8E6B06970500FC70-->  <HELP><![CDATA[Open Balances: Record_ID2 and DateBalanced Filling]]></HELP>
+<!--AA64E3BA23F24D4F8E6B06970500FC70-->  <ACCESSLEVEL><![CDATA[3]]></ACCESSLEVEL>
+<!--AA64E3BA23F24D4F8E6B06970500FC70-->  <ISUSERSTARTABLE><![CDATA[N]]></ISUSERSTARTABLE>
+<!--AA64E3BA23F24D4F8E6B06970500FC70-->  <ISREPORT><![CDATA[N]]></ISREPORT>
+<!--AA64E3BA23F24D4F8E6B06970500FC70-->  <ISDIRECTPRINT><![CDATA[N]]></ISDIRECTPRINT>
+<!--AA64E3BA23F24D4F8E6B06970500FC70-->  <CLASSNAME><![CDATA[org.openbravo.advpaymentmngt.process.RecordID2Filling]]></CLASSNAME>
+<!--AA64E3BA23F24D4F8E6B06970500FC70-->  <ISBACKGROUND><![CDATA[Y]]></ISBACKGROUND>
+<!--AA64E3BA23F24D4F8E6B06970500FC70-->  <ISJASPER><![CDATA[N]]></ISJASPER>
+<!--AA64E3BA23F24D4F8E6B06970500FC70-->  <ISEXTERNALSERVICE><![CDATA[N]]></ISEXTERNALSERVICE>
+<!--AA64E3BA23F24D4F8E6B06970500FC70-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--AA64E3BA23F24D4F8E6B06970500FC70-->  <UIPATTERN><![CDATA[M]]></UIPATTERN>
+<!--AA64E3BA23F24D4F8E6B06970500FC70-->  <ISADVANCEDFEATURE><![CDATA[N]]></ISADVANCEDFEATURE>
+<!--AA64E3BA23F24D4F8E6B06970500FC70-->  <PREVENTCONCURRENT><![CDATA[Y]]></PREVENTCONCURRENT>
+<!--AA64E3BA23F24D4F8E6B06970500FC70-->  <IS_EXPLICIT_ACCESS><![CDATA[N]]></IS_EXPLICIT_ACCESS>
+<!--AA64E3BA23F24D4F8E6B06970500FC70--></AD_PROCESS>
+
 <!--B54318B49E984B9CB855AEFB1F474CD6--><AD_PROCESS>
 <!--B54318B49E984B9CB855AEFB1F474CD6-->  <AD_PROCESS_ID><![CDATA[B54318B49E984B9CB855AEFB1F474CD6]]></AD_PROCESS_ID>
 <!--B54318B49E984B9CB855AEFB1F474CD6-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_TAB.xml	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_TAB.xml	Fri Jun 13 09:13:47 2014 +0200
@@ -28,6 +28,8 @@
 <!--15ECCF8974044A81982F57F9F1E1A67B-->  <HQLORDERBYCLAUSE><![CDATA[e.invoice.documentNo, e.duedate]]></HQLORDERBYCLAUSE>
 <!--15ECCF8974044A81982F57F9F1E1A67B-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--15ECCF8974044A81982F57F9F1E1A67B-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--15ECCF8974044A81982F57F9F1E1A67B-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--15ECCF8974044A81982F57F9F1E1A67B-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--15ECCF8974044A81982F57F9F1E1A67B-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--15ECCF8974044A81982F57F9F1E1A67B-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--15ECCF8974044A81982F57F9F1E1A67B-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -59,6 +61,8 @@
 <!--1EA4A3F31A27483A8C6E93176AE912D3-->  <HQLORDERBYCLAUSE><![CDATA[accountingSchema.name, accountingDate, abs(debit) desc, credit desc, value]]></HQLORDERBYCLAUSE>
 <!--1EA4A3F31A27483A8C6E93176AE912D3-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--1EA4A3F31A27483A8C6E93176AE912D3-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--1EA4A3F31A27483A8C6E93176AE912D3-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--1EA4A3F31A27483A8C6E93176AE912D3-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--1EA4A3F31A27483A8C6E93176AE912D3-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--1EA4A3F31A27483A8C6E93176AE912D3-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--1EA4A3F31A27483A8C6E93176AE912D3-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -90,6 +94,8 @@
 <!--2A9BA5FDA0F8470D881F8EA9DEDCC598-->  <HQLORDERBYCLAUSE><![CDATA[accountingSchema.name, accountingDate, abs(debit) desc, credit desc, value]]></HQLORDERBYCLAUSE>
 <!--2A9BA5FDA0F8470D881F8EA9DEDCC598-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--2A9BA5FDA0F8470D881F8EA9DEDCC598-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--2A9BA5FDA0F8470D881F8EA9DEDCC598-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--2A9BA5FDA0F8470D881F8EA9DEDCC598-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--2A9BA5FDA0F8470D881F8EA9DEDCC598-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--2A9BA5FDA0F8470D881F8EA9DEDCC598-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--2A9BA5FDA0F8470D881F8EA9DEDCC598-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -122,6 +128,8 @@
 <!--2ECAED4620B840BA8DD738140F58A629-->  <HQLORDERBYCLAUSE><![CDATA[e.invoice.documentNo, e.duedate]]></HQLORDERBYCLAUSE>
 <!--2ECAED4620B840BA8DD738140F58A629-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--2ECAED4620B840BA8DD738140F58A629-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--2ECAED4620B840BA8DD738140F58A629-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--2ECAED4620B840BA8DD738140F58A629-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--2ECAED4620B840BA8DD738140F58A629-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--2ECAED4620B840BA8DD738140F58A629-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--2ECAED4620B840BA8DD738140F58A629-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -156,6 +164,8 @@
 AND ((@FIN_DoubtFul_Debt_Run.businessPartnerCategory@ is null OR @FIN_DoubtFul_Debt_Run.businessPartnerCategory@ = '') OR (@FIN_DoubtFul_Debt_Run.businessPartnerCategory@ is not null and e.businessPartnerCategory.id = @FIN_DoubtFul_Debt_Run.businessPartnerCategory@)))]]></HQLFILTERCLAUSE>
 <!--3FD616A223E44621806A8573068B6C62-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--3FD616A223E44621806A8573068B6C62-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--3FD616A223E44621806A8573068B6C62-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--3FD616A223E44621806A8573068B6C62-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--3FD616A223E44621806A8573068B6C62-->  <EM_OBUIAPP_SELECTION><![CDATA[OB.APRM.selectDoubtfulDebtPickAndEdit]]></EM_OBUIAPP_SELECTION>
 <!--3FD616A223E44621806A8573068B6C62-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--3FD616A223E44621806A8573068B6C62-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
@@ -185,6 +195,8 @@
 <!--5B9941AC1F6A4529A76FCA7CDA0A7D7A-->  <UIPATTERN><![CDATA[SR]]></UIPATTERN>
 <!--5B9941AC1F6A4529A76FCA7CDA0A7D7A-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--5B9941AC1F6A4529A76FCA7CDA0A7D7A-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--5B9941AC1F6A4529A76FCA7CDA0A7D7A-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--5B9941AC1F6A4529A76FCA7CDA0A7D7A-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--5B9941AC1F6A4529A76FCA7CDA0A7D7A-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--5B9941AC1F6A4529A76FCA7CDA0A7D7A-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--5B9941AC1F6A4529A76FCA7CDA0A7D7A-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -214,6 +226,8 @@
 <!--60825C9E68644DBC9C530DDCABE05A6E-->  <UIPATTERN><![CDATA[SR]]></UIPATTERN>
 <!--60825C9E68644DBC9C530DDCABE05A6E-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--60825C9E68644DBC9C530DDCABE05A6E-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--60825C9E68644DBC9C530DDCABE05A6E-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--60825C9E68644DBC9C530DDCABE05A6E-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--60825C9E68644DBC9C530DDCABE05A6E-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--60825C9E68644DBC9C530DDCABE05A6E-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--60825C9E68644DBC9C530DDCABE05A6E-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -242,6 +256,8 @@
 <!--6707D7449A8D45DB851F608BA88329C8-->  <UIPATTERN><![CDATA[RO]]></UIPATTERN>
 <!--6707D7449A8D45DB851F608BA88329C8-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--6707D7449A8D45DB851F608BA88329C8-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--6707D7449A8D45DB851F608BA88329C8-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--6707D7449A8D45DB851F608BA88329C8-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--6707D7449A8D45DB851F608BA88329C8-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--6707D7449A8D45DB851F608BA88329C8-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--6707D7449A8D45DB851F608BA88329C8-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -271,6 +287,8 @@
 <!--79DFBE24B39742AD877E3163643E619F-->  <UIPATTERN><![CDATA[RO]]></UIPATTERN>
 <!--79DFBE24B39742AD877E3163643E619F-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--79DFBE24B39742AD877E3163643E619F-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--79DFBE24B39742AD877E3163643E619F-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--79DFBE24B39742AD877E3163643E619F-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--79DFBE24B39742AD877E3163643E619F-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--79DFBE24B39742AD877E3163643E619F-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--79DFBE24B39742AD877E3163643E619F-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -300,6 +318,8 @@
 <!--7A8D43541F8C49F1BD8A431A0041BF89-->  <UIPATTERN><![CDATA[SR]]></UIPATTERN>
 <!--7A8D43541F8C49F1BD8A431A0041BF89-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--7A8D43541F8C49F1BD8A431A0041BF89-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--7A8D43541F8C49F1BD8A431A0041BF89-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--7A8D43541F8C49F1BD8A431A0041BF89-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--7A8D43541F8C49F1BD8A431A0041BF89-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--7A8D43541F8C49F1BD8A431A0041BF89-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--7A8D43541F8C49F1BD8A431A0041BF89-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -327,6 +347,8 @@
 <!--7BE8B207C88947C498677C172ECDDECC-->  <UIPATTERN><![CDATA[STD]]></UIPATTERN>
 <!--7BE8B207C88947C498677C172ECDDECC-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--7BE8B207C88947C498677C172ECDDECC-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--7BE8B207C88947C498677C172ECDDECC-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--7BE8B207C88947C498677C172ECDDECC-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--7BE8B207C88947C498677C172ECDDECC-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--7BE8B207C88947C498677C172ECDDECC-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--7BE8B207C88947C498677C172ECDDECC-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -357,6 +379,8 @@
 <!--81644A22CC4D4B879AA71C33C30E00A4-->  <HQLFILTERCLAUSE><![CDATA[(e.obSelected = true) OR (e.paymentMethod.id = @FIN_Payment_Proposal.paymentMethod@)]]></HQLFILTERCLAUSE>
 <!--81644A22CC4D4B879AA71C33C30E00A4-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--81644A22CC4D4B879AA71C33C30E00A4-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--81644A22CC4D4B879AA71C33C30E00A4-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--81644A22CC4D4B879AA71C33C30E00A4-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--81644A22CC4D4B879AA71C33C30E00A4-->  <EM_OBUIAPP_SELECTION><![CDATA[OB.APRM.selectionChangePaymentProposalPickAndEdit]]></EM_OBUIAPP_SELECTION>
 <!--81644A22CC4D4B879AA71C33C30E00A4-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--81644A22CC4D4B879AA71C33C30E00A4-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
@@ -387,6 +411,8 @@
 <!--89C009D99323470DB51F100697E2F50C-->  <HQLORDERBYCLAUSE><![CDATA[dueDate asc]]></HQLORDERBYCLAUSE>
 <!--89C009D99323470DB51F100697E2F50C-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--89C009D99323470DB51F100697E2F50C-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--89C009D99323470DB51F100697E2F50C-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--89C009D99323470DB51F100697E2F50C-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--89C009D99323470DB51F100697E2F50C-->  <EM_OBUIAPP_CAN_ADD><![CDATA[Y]]></EM_OBUIAPP_CAN_ADD>
 <!--89C009D99323470DB51F100697E2F50C-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[Y]]></EM_OBUIAPP_CAN_DELETE>
 <!--89C009D99323470DB51F100697E2F50C-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[N]]></EM_OBUIAPP_SHOW_SELECT>
@@ -418,6 +444,8 @@
 <!--9380E9AFB1074FB98030E5549D7FF346-->  <UIPATTERN><![CDATA[STD]]></UIPATTERN>
 <!--9380E9AFB1074FB98030E5549D7FF346-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--9380E9AFB1074FB98030E5549D7FF346-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--9380E9AFB1074FB98030E5549D7FF346-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--9380E9AFB1074FB98030E5549D7FF346-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--9380E9AFB1074FB98030E5549D7FF346-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--9380E9AFB1074FB98030E5549D7FF346-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--9380E9AFB1074FB98030E5549D7FF346-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -449,6 +477,8 @@
 <!--9817E22E2536417F8C9AEC8D5FA33E18-->  <HQLWHERECLAUSE><![CDATA[e.paymentDetails is not null]]></HQLWHERECLAUSE>
 <!--9817E22E2536417F8C9AEC8D5FA33E18-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--9817E22E2536417F8C9AEC8D5FA33E18-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--9817E22E2536417F8C9AEC8D5FA33E18-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--9817E22E2536417F8C9AEC8D5FA33E18-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--9817E22E2536417F8C9AEC8D5FA33E18-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--9817E22E2536417F8C9AEC8D5FA33E18-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--9817E22E2536417F8C9AEC8D5FA33E18-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -476,6 +506,8 @@
 <!--9D859A2A50F44562AFA21AAF2DF91B8A-->  <UIPATTERN><![CDATA[ED]]></UIPATTERN>
 <!--9D859A2A50F44562AFA21AAF2DF91B8A-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--9D859A2A50F44562AFA21AAF2DF91B8A-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--9D859A2A50F44562AFA21AAF2DF91B8A-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--9D859A2A50F44562AFA21AAF2DF91B8A-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--9D859A2A50F44562AFA21AAF2DF91B8A-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--9D859A2A50F44562AFA21AAF2DF91B8A-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--9D859A2A50F44562AFA21AAF2DF91B8A-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -505,6 +537,8 @@
 <!--A94442B27F664A41BF64735DFA76FB4D-->  <UIPATTERN><![CDATA[RO]]></UIPATTERN>
 <!--A94442B27F664A41BF64735DFA76FB4D-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--A94442B27F664A41BF64735DFA76FB4D-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--A94442B27F664A41BF64735DFA76FB4D-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--A94442B27F664A41BF64735DFA76FB4D-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--A94442B27F664A41BF64735DFA76FB4D-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--A94442B27F664A41BF64735DFA76FB4D-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--A94442B27F664A41BF64735DFA76FB4D-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -533,6 +567,8 @@
 <!--B82C02920AA84E8DB57D553185BD2F06-->  <UIPATTERN><![CDATA[RO]]></UIPATTERN>
 <!--B82C02920AA84E8DB57D553185BD2F06-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--B82C02920AA84E8DB57D553185BD2F06-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--B82C02920AA84E8DB57D553185BD2F06-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--B82C02920AA84E8DB57D553185BD2F06-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--B82C02920AA84E8DB57D553185BD2F06-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--B82C02920AA84E8DB57D553185BD2F06-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--B82C02920AA84E8DB57D553185BD2F06-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -562,6 +598,8 @@
 <!--C095D2CC39704DBE8B906B7CD7710968-->  <HQLORDERBYCLAUSE><![CDATA[-transactionDate]]></HQLORDERBYCLAUSE>
 <!--C095D2CC39704DBE8B906B7CD7710968-->  <SHOWPARENTBUTTONS><![CDATA[N]]></SHOWPARENTBUTTONS>
 <!--C095D2CC39704DBE8B906B7CD7710968-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--C095D2CC39704DBE8B906B7CD7710968-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--C095D2CC39704DBE8B906B7CD7710968-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--C095D2CC39704DBE8B906B7CD7710968-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--C095D2CC39704DBE8B906B7CD7710968-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--C095D2CC39704DBE8B906B7CD7710968-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -591,6 +629,8 @@
 <!--D4D450A66C754D65940DBC36B11779C8-->  <HQLORDERBYCLAUSE><![CDATA[dueDate asc]]></HQLORDERBYCLAUSE>
 <!--D4D450A66C754D65940DBC36B11779C8-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--D4D450A66C754D65940DBC36B11779C8-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--D4D450A66C754D65940DBC36B11779C8-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--D4D450A66C754D65940DBC36B11779C8-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--D4D450A66C754D65940DBC36B11779C8-->  <EM_OBUIAPP_CAN_ADD><![CDATA[Y]]></EM_OBUIAPP_CAN_ADD>
 <!--D4D450A66C754D65940DBC36B11779C8-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[Y]]></EM_OBUIAPP_CAN_DELETE>
 <!--D4D450A66C754D65940DBC36B11779C8-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[N]]></EM_OBUIAPP_SHOW_SELECT>
@@ -619,6 +659,8 @@
 <!--E4DC11F751F34F0DAE11A4D856CD99EB-->  <UIPATTERN><![CDATA[SR]]></UIPATTERN>
 <!--E4DC11F751F34F0DAE11A4D856CD99EB-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--E4DC11F751F34F0DAE11A4D856CD99EB-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--E4DC11F751F34F0DAE11A4D856CD99EB-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--E4DC11F751F34F0DAE11A4D856CD99EB-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--E4DC11F751F34F0DAE11A4D856CD99EB-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--E4DC11F751F34F0DAE11A4D856CD99EB-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--E4DC11F751F34F0DAE11A4D856CD99EB-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -648,6 +690,8 @@
 <!--EB0466B2A22343F28773B356D292BC7E-->  <UIPATTERN><![CDATA[RO]]></UIPATTERN>
 <!--EB0466B2A22343F28773B356D292BC7E-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--EB0466B2A22343F28773B356D292BC7E-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--EB0466B2A22343F28773B356D292BC7E-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--EB0466B2A22343F28773B356D292BC7E-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--EB0466B2A22343F28773B356D292BC7E-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--EB0466B2A22343F28773B356D292BC7E-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--EB0466B2A22343F28773B356D292BC7E-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -676,6 +720,8 @@
 <!--EB0E0C5A58344F7FA345097E7365CD22-->  <UIPATTERN><![CDATA[RO]]></UIPATTERN>
 <!--EB0E0C5A58344F7FA345097E7365CD22-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--EB0E0C5A58344F7FA345097E7365CD22-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--EB0E0C5A58344F7FA345097E7365CD22-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--EB0E0C5A58344F7FA345097E7365CD22-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--EB0E0C5A58344F7FA345097E7365CD22-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--EB0E0C5A58344F7FA345097E7365CD22-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--EB0E0C5A58344F7FA345097E7365CD22-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -707,6 +753,8 @@
 <!--F6C2283A21314407BBBB23FF14B85ED4-->  <HQLWHERECLAUSE><![CDATA[e.paymentDetails is not null]]></HQLWHERECLAUSE>
 <!--F6C2283A21314407BBBB23FF14B85ED4-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--F6C2283A21314407BBBB23FF14B85ED4-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--F6C2283A21314407BBBB23FF14B85ED4-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--F6C2283A21314407BBBB23FF14B85ED4-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--F6C2283A21314407BBBB23FF14B85ED4-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--F6C2283A21314407BBBB23FF14B85ED4-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--F6C2283A21314407BBBB23FF14B85ED4-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -736,6 +784,8 @@
 <!--F9751D712A804D57B97A36803843F2D7-->  <UIPATTERN><![CDATA[RO]]></UIPATTERN>
 <!--F9751D712A804D57B97A36803843F2D7-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--F9751D712A804D57B97A36803843F2D7-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--F9751D712A804D57B97A36803843F2D7-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--F9751D712A804D57B97A36803843F2D7-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--F9751D712A804D57B97A36803843F2D7-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--F9751D712A804D57B97A36803843F2D7-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--F9751D712A804D57B97A36803843F2D7-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -764,6 +814,8 @@
 <!--FA57D75B1BBB4583B4A777008A29BF54-->  <UIPATTERN><![CDATA[RO]]></UIPATTERN>
 <!--FA57D75B1BBB4583B4A777008A29BF54-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--FA57D75B1BBB4583B4A777008A29BF54-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--FA57D75B1BBB4583B4A777008A29BF54-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--FA57D75B1BBB4583B4A777008A29BF54-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--FA57D75B1BBB4583B4A777008A29BF54-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--FA57D75B1BBB4583B4A777008A29BF54-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--FA57D75B1BBB4583B4A777008A29BF54-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -792,6 +844,8 @@
 <!--FA66A130BE8B48E88BF4F5A6E2FA0CDD-->  <HQLORDERBYCLAUSE><![CDATA[rundate]]></HQLORDERBYCLAUSE>
 <!--FA66A130BE8B48E88BF4F5A6E2FA0CDD-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--FA66A130BE8B48E88BF4F5A6E2FA0CDD-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--FA66A130BE8B48E88BF4F5A6E2FA0CDD-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--FA66A130BE8B48E88BF4F5A6E2FA0CDD-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--FA66A130BE8B48E88BF4F5A6E2FA0CDD-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--FA66A130BE8B48E88BF4F5A6E2FA0CDD-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--FA66A130BE8B48E88BF4F5A6E2FA0CDD-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -821,6 +875,8 @@
 <!--FD40D9C2F1F14943933DEFEF4A8458E4-->  <UIPATTERN><![CDATA[RO]]></UIPATTERN>
 <!--FD40D9C2F1F14943933DEFEF4A8458E4-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--FD40D9C2F1F14943933DEFEF4A8458E4-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--FD40D9C2F1F14943933DEFEF4A8458E4-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--FD40D9C2F1F14943933DEFEF4A8458E4-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--FD40D9C2F1F14943933DEFEF4A8458E4-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--FD40D9C2F1F14943933DEFEF4A8458E4-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--FD40D9C2F1F14943933DEFEF4A8458E4-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -850,6 +906,8 @@
 <!--FF8080812F213146012F2135BC25000E-->  <HQLFILTERCLAUSE><![CDATA[e.reconciled = false]]></HQLFILTERCLAUSE>
 <!--FF8080812F213146012F2135BC25000E-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--FF8080812F213146012F2135BC25000E-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--FF8080812F213146012F2135BC25000E-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--FF8080812F213146012F2135BC25000E-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--FF8080812F213146012F2135BC25000E-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--FF8080812F213146012F2135BC25000E-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--FF8080812F213146012F2135BC25000E-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -880,6 +938,8 @@
 <!--FF80808130BB89090130BB9A3A2B0043-->  <HQLORDERBYCLAUSE><![CDATA[-accountingDate, accountingSchema.id, groupID, documentCategory, financialAccountTransaction.id, -sequenceNumber]]></HQLORDERBYCLAUSE>
 <!--FF80808130BB89090130BB9A3A2B0043-->  <SHOWPARENTBUTTONS><![CDATA[N]]></SHOWPARENTBUTTONS>
 <!--FF80808130BB89090130BB9A3A2B0043-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--FF80808130BB89090130BB9A3A2B0043-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--FF80808130BB89090130BB9A3A2B0043-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--FF80808130BB89090130BB9A3A2B0043-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--FF80808130BB89090130BB9A3A2B0043-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--FF80808130BB89090130BB9A3A2B0043-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -908,6 +968,8 @@
 <!--FF8080813320657F0133209DE21B0042-->  <UIPATTERN><![CDATA[ED]]></UIPATTERN>
 <!--FF8080813320657F0133209DE21B0042-->  <SHOWPARENTBUTTONS><![CDATA[N]]></SHOWPARENTBUTTONS>
 <!--FF8080813320657F0133209DE21B0042-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--FF8080813320657F0133209DE21B0042-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--FF8080813320657F0133209DE21B0042-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--FF8080813320657F0133209DE21B0042-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--FF8080813320657F0133209DE21B0042-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--FF8080813320657F0133209DE21B0042-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/OBUIAPP_PARAMETER.xml	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/OBUIAPP_PARAMETER.xml	Fri Jun 13 09:13:47 2014 +0200
@@ -19,6 +19,8 @@
 <!--0586B9F7ED4147758536007BF402F1DF-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--0586B9F7ED4147758536007BF402F1DF-->  <OBUIAPP_PROCESS_ID><![CDATA[4EEB3497082C4F2182E16A4371CD5D96]]></OBUIAPP_PROCESS_ID>
 <!--0586B9F7ED4147758536007BF402F1DF-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--0586B9F7ED4147758536007BF402F1DF-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--0586B9F7ED4147758536007BF402F1DF-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--0586B9F7ED4147758536007BF402F1DF--></OBUIAPP_PARAMETER>
 
 <!--0A9E075CCC6E4D59AAC37E3AEF1FE269--><OBUIAPP_PARAMETER>
@@ -39,6 +41,8 @@
 <!--0A9E075CCC6E4D59AAC37E3AEF1FE269-->  <ISFIXED><![CDATA[N]]></ISFIXED>
 <!--0A9E075CCC6E4D59AAC37E3AEF1FE269-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--0A9E075CCC6E4D59AAC37E3AEF1FE269-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--0A9E075CCC6E4D59AAC37E3AEF1FE269-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--0A9E075CCC6E4D59AAC37E3AEF1FE269-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--0A9E075CCC6E4D59AAC37E3AEF1FE269-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[FF80808133186ADD01331B3A932C000D]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--0A9E075CCC6E4D59AAC37E3AEF1FE269--></OBUIAPP_PARAMETER>
 
@@ -61,6 +65,8 @@
 <!--111000BF6C4445E785AA08331A268E1B-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--111000BF6C4445E785AA08331A268E1B-->  <OBUIAPP_PROCESS_ID><![CDATA[6F87442DF7BC43AB8A666BDED2F7D64E]]></OBUIAPP_PROCESS_ID>
 <!--111000BF6C4445E785AA08331A268E1B-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--111000BF6C4445E785AA08331A268E1B-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--111000BF6C4445E785AA08331A268E1B-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--111000BF6C4445E785AA08331A268E1B--></OBUIAPP_PARAMETER>
 
 <!--2653B134344A4BBEBA417F6CFEDE8D91--><OBUIAPP_PARAMETER>
@@ -81,6 +87,8 @@
 <!--2653B134344A4BBEBA417F6CFEDE8D91-->  <ISFIXED><![CDATA[N]]></ISFIXED>
 <!--2653B134344A4BBEBA417F6CFEDE8D91-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--2653B134344A4BBEBA417F6CFEDE8D91-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--2653B134344A4BBEBA417F6CFEDE8D91-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--2653B134344A4BBEBA417F6CFEDE8D91-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--2653B134344A4BBEBA417F6CFEDE8D91-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[FF80808133186ADD01331B3A932C000D]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--2653B134344A4BBEBA417F6CFEDE8D91--></OBUIAPP_PARAMETER>
 
@@ -103,6 +111,8 @@
 <!--8424D0FA373945708522DA3720F27BC4-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--8424D0FA373945708522DA3720F27BC4-->  <OBUIAPP_PROCESS_ID><![CDATA[8D0D32CC819E449D9A08E0459B482963]]></OBUIAPP_PROCESS_ID>
 <!--8424D0FA373945708522DA3720F27BC4-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--8424D0FA373945708522DA3720F27BC4-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--8424D0FA373945708522DA3720F27BC4-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--8424D0FA373945708522DA3720F27BC4--></OBUIAPP_PARAMETER>
 
 <!--854F44975FB84D20AE8E8DA02999747E--><OBUIAPP_PARAMETER>
@@ -124,6 +134,8 @@
 <!--854F44975FB84D20AE8E8DA02999747E-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--854F44975FB84D20AE8E8DA02999747E-->  <OBUIAPP_PROCESS_ID><![CDATA[4EEB3497082C4F2182E16A4371CD5D96]]></OBUIAPP_PROCESS_ID>
 <!--854F44975FB84D20AE8E8DA02999747E-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--854F44975FB84D20AE8E8DA02999747E-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--854F44975FB84D20AE8E8DA02999747E-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--854F44975FB84D20AE8E8DA02999747E--></OBUIAPP_PARAMETER>
 
 <!--878E7842FC524139BBEE0CAE0C1F3E17--><OBUIAPP_PARAMETER>
@@ -145,6 +157,8 @@
 <!--878E7842FC524139BBEE0CAE0C1F3E17-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--878E7842FC524139BBEE0CAE0C1F3E17-->  <OBUIAPP_PROCESS_ID><![CDATA[6F87442DF7BC43AB8A666BDED2F7D64E]]></OBUIAPP_PROCESS_ID>
 <!--878E7842FC524139BBEE0CAE0C1F3E17-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--878E7842FC524139BBEE0CAE0C1F3E17-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--878E7842FC524139BBEE0CAE0C1F3E17-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--878E7842FC524139BBEE0CAE0C1F3E17--></OBUIAPP_PARAMETER>
 
 <!--BC5E638E184C4F3AB36B9DA574E0E8BB--><OBUIAPP_PARAMETER>
@@ -166,6 +180,8 @@
 <!--BC5E638E184C4F3AB36B9DA574E0E8BB-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--BC5E638E184C4F3AB36B9DA574E0E8BB-->  <OBUIAPP_PROCESS_ID><![CDATA[8D0D32CC819E449D9A08E0459B482963]]></OBUIAPP_PROCESS_ID>
 <!--BC5E638E184C4F3AB36B9DA574E0E8BB-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--BC5E638E184C4F3AB36B9DA574E0E8BB-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--BC5E638E184C4F3AB36B9DA574E0E8BB-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--BC5E638E184C4F3AB36B9DA574E0E8BB--></OBUIAPP_PARAMETER>
 
 <!--FF808081331B5EE901331B68C4540018--><OBUIAPP_PARAMETER>
@@ -186,6 +202,8 @@
 <!--FF808081331B5EE901331B68C4540018-->  <ISFIXED><![CDATA[N]]></ISFIXED>
 <!--FF808081331B5EE901331B68C4540018-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--FF808081331B5EE901331B68C4540018-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--FF808081331B5EE901331B68C4540018-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--FF808081331B5EE901331B68C4540018-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--FF808081331B5EE901331B68C4540018-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[FF80808133186ADD01331B3A932C000D]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--FF808081331B5EE901331B68C4540018--></OBUIAPP_PARAMETER>
 
@@ -207,6 +225,8 @@
 <!--FF808081332719060133276EBC680065-->  <FIXEDVALUE><![CDATA[OB.getContext().getLanguage().getLanguage()]]></FIXEDVALUE>
 <!--FF808081332719060133276EBC680065-->  <EVALUATEFIXEDVALUE><![CDATA[Y]]></EVALUATEFIXEDVALUE>
 <!--FF808081332719060133276EBC680065-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--FF808081332719060133276EBC680065-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--FF808081332719060133276EBC680065-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--FF808081332719060133276EBC680065-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[FF80808133186ADD01331B3A932C000D]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--FF808081332719060133276EBC680065--></OBUIAPP_PARAMETER>
 
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/OBUIAPP_PROCESS.xml	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/OBUIAPP_PROCESS.xml	Fri Jun 13 09:13:47 2014 +0200
@@ -14,6 +14,7 @@
 <!--4EEB3497082C4F2182E16A4371CD5D96-->  <UIPATTERN><![CDATA[OBUIAPP_PickAndExecute]]></UIPATTERN>
 <!--4EEB3497082C4F2182E16A4371CD5D96-->  <ISMULTIRECORD><![CDATA[N]]></ISMULTIRECORD>
 <!--4EEB3497082C4F2182E16A4371CD5D96-->  <IS_EXPLICIT_ACCESS><![CDATA[N]]></IS_EXPLICIT_ACCESS>
+<!--4EEB3497082C4F2182E16A4371CD5D96-->  <ISGRIDLEGACY><![CDATA[Y]]></ISGRIDLEGACY>
 <!--4EEB3497082C4F2182E16A4371CD5D96--></OBUIAPP_PROCESS>
 
 <!--6F87442DF7BC43AB8A666BDED2F7D64E--><OBUIAPP_PROCESS>
@@ -30,6 +31,7 @@
 <!--6F87442DF7BC43AB8A666BDED2F7D64E-->  <UIPATTERN><![CDATA[OBUIAPP_PickAndExecute]]></UIPATTERN>
 <!--6F87442DF7BC43AB8A666BDED2F7D64E-->  <ISMULTIRECORD><![CDATA[N]]></ISMULTIRECORD>
 <!--6F87442DF7BC43AB8A666BDED2F7D64E-->  <IS_EXPLICIT_ACCESS><![CDATA[N]]></IS_EXPLICIT_ACCESS>
+<!--6F87442DF7BC43AB8A666BDED2F7D64E-->  <ISGRIDLEGACY><![CDATA[Y]]></ISGRIDLEGACY>
 <!--6F87442DF7BC43AB8A666BDED2F7D64E--></OBUIAPP_PROCESS>
 
 <!--8D0D32CC819E449D9A08E0459B482963--><OBUIAPP_PROCESS>
@@ -46,6 +48,7 @@
 <!--8D0D32CC819E449D9A08E0459B482963-->  <UIPATTERN><![CDATA[OBUIAPP_PickAndExecute]]></UIPATTERN>
 <!--8D0D32CC819E449D9A08E0459B482963-->  <ISMULTIRECORD><![CDATA[N]]></ISMULTIRECORD>
 <!--8D0D32CC819E449D9A08E0459B482963-->  <IS_EXPLICIT_ACCESS><![CDATA[N]]></IS_EXPLICIT_ACCESS>
+<!--8D0D32CC819E449D9A08E0459B482963-->  <ISGRIDLEGACY><![CDATA[Y]]></ISGRIDLEGACY>
 <!--8D0D32CC819E449D9A08E0459B482963--></OBUIAPP_PROCESS>
 
 </data>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/AlertsForWrongOrders.java	Fri Jun 13 09:13:47 2014 +0200
@@ -0,0 +1,84 @@
+/* 
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2014 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ *************************************************************************
+ */
+package org.openbravo.advpaymentmngt.modulescript;
+
+import javax.servlet.ServletException;
+
+import org.openbravo.database.ConnectionProvider;
+import org.openbravo.modulescript.ModuleScript;
+
+public class AlertsForWrongOrders extends ModuleScript {
+  
+  final static private String ALERT_RULE_SQL = "select distinct ad_column_identifier('C_Order', fin_payment_schedule.c_order_id, 'en_US') as record_id, fin_payment_schedule.c_order_id  as referencekey_id, 0 as ad_role_id, null as ad_user_id, 'This order needs to be checked due to wrong payment info.' as description, 'Y' as isActive, fin_payment_schedule.ad_org_id, fin_payment_schedule.ad_client_id, now() as created, 0 as createdBy, now() as updated, 0 as updatedBy from fin_payment_schedule, fin_payment_scheduledetail where fin_payment_schedule.fin_payment_schedule_id = fin_payment_scheduledetail.fin_payment_schedule_order and fin_payment_scheduledetail.iscanceled = 'N' and fin_payment_scheduledetail.fin_payment_detail_id IS NOT NULL group by fin_payment_schedule.ad_org_id, fin_payment_schedule.ad_client_id, fin_payment_schedule.fin_payment_schedule_id, fin_payment_schedule.c_order_id, fin_payment_schedule.paidamt having fin_payment_schedule.paidamt <> sum(fin_payment_scheduledetail.amount + coalesce(fin_payment_scheduledetail.writeoffamt,0)) order by 1";
+  
+  @Override
+  // Inserting Alerts for orders which needs to be recalculated/processed
+  public void execute() {
+    try {
+      ConnectionProvider cp = getConnectionProvider();
+      AlertsForWrongOrdersData[] data = AlertsForWrongOrdersData.select(cp);
+      for (AlertsForWrongOrdersData wrongOrder : data) {
+        createAlert(cp, wrongOrder);
+      }
+     } catch (Exception e) {
+      handleError(e);
+    }
+  }
+
+  private void createAlert(ConnectionProvider cp, AlertsForWrongOrdersData wrongOrder)
+	      throws ServletException {
+	  	final String SALES_ORDER_WINDOW = "143";
+	    final String PURCHASE_ORDER_WINDOW = "181";
+	    final String SALES_ORDER_TAB = "186";
+	    final String PURCHASE_ORDER_TAB = "294";
+	    String WindowOrderId = PURCHASE_ORDER_WINDOW;
+	    String strTabId = PURCHASE_ORDER_TAB;
+	    String ALERT_RULE = "Wrong Purchase Order Payment Plan";
+	    if ("Y".equals(wrongOrder.issotrx)) {
+	      strTabId = SALES_ORDER_TAB;
+	      WindowOrderId = SALES_ORDER_WINDOW;	    
+	      ALERT_RULE = "Wrong Sales Order Payment Plan";
+	    }
+	    String strName = "Order: '" + wrongOrder.orderinfo
+	            + "' needs to be checked due to wrong payment info.";
+	    String oldAlertRuleId = AlertsForWrongOrdersData.getAlertRuleId(cp, ALERT_RULE,
+	            wrongOrder.adClientId);
+	    if (!AlertsForWrongOrdersData.existsAlert(cp, oldAlertRuleId, wrongOrder.cOrderId)) {
+	    if (!AlertsForWrongOrdersData.existsAlertRule(cp, ALERT_RULE, wrongOrder.adClientId)) {
+	    	AlertsForWrongOrdersData.insertAlertRule(cp, wrongOrder.adClientId, ALERT_RULE, strTabId, "");
+	        AlertsForWrongOrdersData[] roles = AlertsForWrongOrdersData.getRoleId(cp,
+	            WindowOrderId, wrongOrder.adClientId);
+	        for (AlertsForWrongOrdersData role : roles) {
+	          AlertsForWrongOrdersData.insertAlertRecipient(cp, wrongOrder.adClientId,
+	              wrongOrder.adOrgId,
+	              AlertsForWrongOrdersData.getAlertRuleId(cp, ALERT_RULE, wrongOrder.adClientId),
+	              role.adRoleId);
+	        }
+	      } else {
+	        AlertsForWrongOrdersData.updateAlertRule(cp, ALERT_RULE, wrongOrder.adClientId);
+	      }
+	    	String alertRuleId = AlertsForWrongOrdersData.getAlertRuleId(cp, ALERT_RULE,
+	            wrongOrder.adClientId);
+	      AlertsForWrongOrdersData.insertAlert(cp, wrongOrder.adClientId, wrongOrder.adOrgId,
+	          strName, alertRuleId, wrongOrder.orderinfo, wrongOrder.cOrderId);
+	    } else {
+              AlertsForWrongOrdersData.updateAlertRule(cp, ALERT_RULE, wrongOrder.adClientId);
+            }
+  	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/AlertsForWrongOrders_data.xsql	Fri Jun 13 09:13:47 2014 +0200
@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ ************************************************************************************
+ * Copyright (C) 2014 Openbravo S.L.U.
+ * Licensed under the Openbravo Commercial License version 1.0
+ * You may obtain a copy of the License at http://www.openbravo.com/legal/obcl.html
+ * or in the legal folder of this module distribution.
+ ************************************************************************************
+-->
+<SqlClass name="AlertsForWrongOrdersData" package="org.openbravo.advpaymentmngt.modulescript">
+   <SqlClassComment></SqlClassComment>
+   <SqlMethod name="select" type="preparedStatement" return="multiple">
+    <SqlMethodComment></SqlMethodComment>
+    <Sql>
+      <![CDATA[
+      select distinct fin_payment_schedule.ad_client_id, ad_column_identifier('C_Order', fin_payment_schedule.c_order_id, 'en_US') as orderinfo, 
+      fin_payment_schedule.c_order_id, fin_payment_schedule.ad_org_id,  c_order.issotrx, '' as ad_role_id, '' as ad_alertrule_id, '' as ad_alert_id
+      from c_order, fin_payment_schedule, fin_payment_scheduledetail 
+      where c_order.c_order_id = fin_payment_schedule.c_order_id
+      and fin_payment_schedule.fin_payment_schedule_id = fin_payment_scheduledetail.fin_payment_schedule_order 
+      and fin_payment_scheduledetail.iscanceled = 'N' 
+      and fin_payment_scheduledetail.fin_payment_detail_id IS NOT NULL 
+      group by fin_payment_schedule.ad_org_id, fin_payment_schedule.ad_client_id, c_order.issotrx, fin_payment_schedule.fin_payment_schedule_id, 
+      fin_payment_schedule.c_order_id, fin_payment_schedule.paidamt 
+      having fin_payment_schedule.paidamt <> sum(fin_payment_scheduledetail.amount + coalesce(fin_payment_scheduledetail.writeoffamt,0)) 
+      order by 1, 2
+      ]]>
+    </Sql>
+  </SqlMethod>
+  <SqlMethod name="existsAlertRule" type="preparedStatement" return="boolean">
+    <SqlMethodComment></SqlMethodComment>
+    <Sql><![CDATA[
+       SELECT COUNT(*) AS EXISTING
+       FROM AD_ALERTRULE
+       WHERE NAME = ?
+         AND ISACTIVE = 'Y'
+         AND AD_CLIENT_ID = ?
+      ]]>
+    </Sql>
+    <Parameter name="alertRule"/>
+    <Parameter name="client"/>
+  </SqlMethod>
+  <SqlMethod name="updateAlertRule" type="preparedStatement" return="rowcount">
+    <SqlMethodComment></SqlMethodComment>
+    <Sql>
+      <![CDATA[
+        UPDATE AD_AlertRule
+        SET SQL='', TYPE='E' WHERE NAME = ? AND AD_Client_ID = ?
+      ]]>
+    </Sql>
+    <Parameter name="name"/>
+    <Parameter name="clientId"/>
+  </SqlMethod>
+  <SqlMethod name="existsAlert" type="preparedStatement" return="boolean">
+    <SqlMethodComment></SqlMethodComment>
+    <Sql><![CDATA[
+       SELECT COUNT(*) AS EXISTING
+       FROM AD_ALERT
+       WHERE AD_ALERTRULE_ID = ?
+       AND REFERENCEKEY_ID = ?
+       AND ISFIXED = 'N'
+      ]]>
+    </Sql>
+    <Parameter name="alertRule"/>
+    <Parameter name="order"/>
+  </SqlMethod>
+  <SqlMethod name="getAlertRuleId" type="preparedStatement" return="string">
+    <SqlMethodComment></SqlMethodComment>
+    <Sql><![CDATA[
+       SELECT MAX(ad_alertrule_id) AS name
+       FROM AD_ALERTRULE
+       WHERE NAME LIKE ?
+         AND ISACTIVE = 'Y'
+         AND AD_CLIENT_ID = ?
+      ]]></Sql>
+    <Parameter name="name"/>
+    <Parameter name="client"/>
+  </SqlMethod>  
+  <SqlMethod name="getRoleId" type="preparedStatement" return="multiple">
+    <SqlMethodComment></SqlMethodComment>
+    <Sql><![CDATA[
+       SELECT distinct ad_role_id
+       FROM ad_window_access
+       WHERE ad_window_id = ?
+       AND AD_CLIENT_ID = ?
+         AND ISACTIVE = 'Y'
+      ]]></Sql>
+    <Parameter name="window"/>
+    <Parameter name="clientId"/>
+  </SqlMethod>
+  <SqlMethod name="insertAlertRule" type="preparedStatement" return="rowcount">
+    <SqlMethodComment></SqlMethodComment>
+    <Sql><![CDATA[
+      INSERT INTO AD_ALERTRULE (
+        AD_ALERTRULE_ID, AD_CLIENT_ID, AD_ORG_ID,ISACTIVE,
+        CREATED, CREATEDBY,  UPDATED, UPDATEDBY,
+        NAME, AD_TAB_ID, FILTERCLAUSE, TYPE,
+        SQL
+      ) VALUES (
+        get_uuid(), ?, '0', 'Y',
+        now(), '100', now(), '100',
+        ?, ?, '', 'E',
+        ?
+      )
+    ]]></Sql>
+    <Parameter name="clientId"/>
+    <Parameter name="name"/>
+    <Parameter name="tabId"/>
+    <Parameter name="sql"/>
+  </SqlMethod>
+  <SqlMethod name="insertAlert" type="preparedStatement" return="rowcount">
+    <SqlMethodComment></SqlMethodComment>
+    <Sql><![CDATA[
+      INSERT INTO AD_Alert (
+        AD_Alert_ID, AD_Client_ID, AD_Org_ID, IsActive,
+        Created, CreatedBy, Updated, UpdatedBy,
+        Description, AD_AlertRule_ID, Record_Id, Referencekey_ID
+      ) VALUES (
+        get_uuid(), ?, ?, 'Y',
+        NOW(), '0', NOW(), '0',
+        ?, ?, ?, ?)
+      ]]>
+    </Sql>
+    <Parameter name="client"/>
+    <Parameter name="org"/>
+    <Parameter name="description" />
+    <Parameter name="adAlertRuleId" />
+    <Parameter name="recordId" />
+    <Parameter name="referencekey_id" />
+  </SqlMethod>
+  <SqlMethod name="insertAlertRecipient" type="preparedStatement" return="rowcount">
+    <SqlMethodComment></SqlMethodComment>
+    <Sql><![CDATA[
+    INSERT INTO ad_alertrecipient(
+            ad_user_id, ad_client_id, ad_org_id, isactive, created, createdby, 
+            updated, updatedby, ad_alertrecipient_id, ad_alertrule_id, ad_role_id, 
+            sendemail)
+    VALUES (null, ?, ?, 'Y', now(), '100', 
+            now(), '100', get_uuid(), ?, ?, 
+            'N')
+      ]]>
+    </Sql>
+    <Parameter name="client"/>
+    <Parameter name="org"/>
+    <Parameter name="adAlertRuleId" />
+    <Parameter name="role" />
+  </SqlMethod>  
+</SqlClass>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/AlertsForWrongOrdersData.java	Fri Jun 13 09:13:47 2014 +0200
@@ -0,0 +1,459 @@
+//Sqlc generated V1.O00-1
+package org.openbravo.advpaymentmngt.modulescript;
+
+import java.sql.*;
+
+import org.apache.log4j.Logger;
+
+import javax.servlet.ServletException;
+
+import org.openbravo.data.FieldProvider;
+import org.openbravo.database.ConnectionProvider;
+import org.openbravo.data.UtilSql;
+import java.util.*;
+
+class AlertsForWrongOrdersData implements FieldProvider {
+static Logger log4j = Logger.getLogger(AlertsForWrongOrdersData.class);
+  private String InitRecordNumber="0";
+  public String adClientId;
+  public String orderinfo;
+  public String cOrderId;
+  public String adOrgId;
+  public String issotrx;
+  public String adRoleId;
+  public String adAlertruleId;
+  public String adAlertId;
+
+  public String getInitRecordNumber() {
+    return InitRecordNumber;
+  }
+
+  public String getField(String fieldName) {
+    if (fieldName.equalsIgnoreCase("ad_client_id") || fieldName.equals("adClientId"))
+      return adClientId;
+    else if (fieldName.equalsIgnoreCase("orderinfo"))
+      return orderinfo;
+    else if (fieldName.equalsIgnoreCase("c_order_id") || fieldName.equals("cOrderId"))
+      return cOrderId;
+    else if (fieldName.equalsIgnoreCase("ad_org_id") || fieldName.equals("adOrgId"))
+      return adOrgId;
+    else if (fieldName.equalsIgnoreCase("issotrx"))
+      return issotrx;
+    else if (fieldName.equalsIgnoreCase("ad_role_id") || fieldName.equals("adRoleId"))
+      return adRoleId;
+    else if (fieldName.equalsIgnoreCase("ad_alertrule_id") || fieldName.equals("adAlertruleId"))
+      return adAlertruleId;
+    else if (fieldName.equalsIgnoreCase("ad_alert_id") || fieldName.equals("adAlertId"))
+      return adAlertId;
+   else {
+     log4j.debug("Field does not exist: " + fieldName);
+     return null;
+   }
+ }
+
+  public static AlertsForWrongOrdersData[] select(ConnectionProvider connectionProvider)    throws ServletException {
+    return select(connectionProvider, 0, 0);
+  }
+
+  public static AlertsForWrongOrdersData[] select(ConnectionProvider connectionProvider, int firstRegister, int numberRegisters)    throws ServletException {
+    String strSql = "";
+    strSql = strSql + 
+      "      select distinct fin_payment_schedule.ad_client_id, ad_column_identifier('C_Order', fin_payment_schedule.c_order_id, 'en_US') as orderinfo, " +
+      "      fin_payment_schedule.c_order_id, fin_payment_schedule.ad_org_id,  c_order.issotrx, '' as ad_role_id, '' as ad_alertrule_id, '' as ad_alert_id" +
+      "      from c_order, fin_payment_schedule, fin_payment_scheduledetail " +
+      "      where c_order.c_order_id = fin_payment_schedule.c_order_id" +
+      "      and fin_payment_schedule.fin_payment_schedule_id = fin_payment_scheduledetail.fin_payment_schedule_order " +
+      "      and fin_payment_scheduledetail.iscanceled = 'N' " +
+      "      and fin_payment_scheduledetail.fin_payment_detail_id IS NOT NULL " +
+      "      group by fin_payment_schedule.ad_org_id, fin_payment_schedule.ad_client_id, c_order.issotrx, fin_payment_schedule.fin_payment_schedule_id, " +
+      "      fin_payment_schedule.c_order_id, fin_payment_schedule.paidamt " +
+      "      having fin_payment_schedule.paidamt <> sum(fin_payment_scheduledetail.amount + coalesce(fin_payment_scheduledetail.writeoffamt,0)) " +
+      "      order by 1, 2";
+
+    ResultSet result;
+    Vector<java.lang.Object> vector = new Vector<java.lang.Object>(0);
+    PreparedStatement st = null;
+
+    try {
+    st = connectionProvider.getPreparedStatement(strSql);
+
+      result = st.executeQuery();
+      long countRecord = 0;
+      long countRecordSkip = 1;
+      boolean continueResult = true;
+      while(countRecordSkip < firstRegister && continueResult) {
+        continueResult = result.next();
+        countRecordSkip++;
+      }
+      while(continueResult && result.next()) {
+        countRecord++;
+        AlertsForWrongOrdersData objectAlertsForWrongOrdersData = new AlertsForWrongOrdersData();
+        objectAlertsForWrongOrdersData.adClientId = UtilSql.getValue(result, "ad_client_id");
+        objectAlertsForWrongOrdersData.orderinfo = UtilSql.getValue(result, "orderinfo");
+        objectAlertsForWrongOrdersData.cOrderId = UtilSql.getValue(result, "c_order_id");
+        objectAlertsForWrongOrdersData.adOrgId = UtilSql.getValue(result, "ad_org_id");
+        objectAlertsForWrongOrdersData.issotrx = UtilSql.getValue(result, "issotrx");
+        objectAlertsForWrongOrdersData.adRoleId = UtilSql.getValue(result, "ad_role_id");
+        objectAlertsForWrongOrdersData.adAlertruleId = UtilSql.getValue(result, "ad_alertrule_id");
+        objectAlertsForWrongOrdersData.adAlertId = UtilSql.getValue(result, "ad_alert_id");
+        objectAlertsForWrongOrdersData.InitRecordNumber = Integer.toString(firstRegister);
+        vector.addElement(objectAlertsForWrongOrdersData);
+        if (countRecord >= numberRegisters && numberRegisters != 0) {
+          continueResult = false;
+        }
+      }
+      result.close();
+    } catch(SQLException e){
+      log4j.error("SQL error in query: " + strSql + "Exception:"+ e);
+      throw new ServletException("@CODE=" + Integer.toString(e.getErrorCode()) + "@" + e.getMessage());
+    } catch(Exception ex){
+      log4j.error("Exception in query: " + strSql + "Exception:"+ ex);
+      throw new ServletException("@CODE=@" + ex.getMessage());
+    } finally {
+      try {
+        connectionProvider.releasePreparedStatement(st);
+      } catch(Exception ignore){
+        ignore.printStackTrace();
+      }
+    }
+    AlertsForWrongOrdersData objectAlertsForWrongOrdersData[] = new AlertsForWrongOrdersData[vector.size()];
+    vector.copyInto(objectAlertsForWrongOrdersData);
+    return(objectAlertsForWrongOrdersData);
+  }
+
+  public static boolean existsAlertRule(ConnectionProvider connectionProvider, String alertRule, String client)    throws ServletException {
+    String strSql = "";
+    strSql = strSql + 
+      "       SELECT COUNT(*) AS EXISTING" +
+      "       FROM AD_ALERTRULE" +
+      "       WHERE NAME = ?" +
+      "         AND ISACTIVE = 'Y'" +
+      "         AND AD_CLIENT_ID = ?";
+
+    ResultSet result;
+    boolean boolReturn = false;
+    PreparedStatement st = null;
+
+    int iParameter = 0;
+    try {
+    st = connectionProvider.getPreparedStatement(strSql);
+      iParameter++; UtilSql.setValue(st, iParameter, 12, null, alertRule);
+      iParameter++; UtilSql.setValue(st, iParameter, 12, null, client);
+
+      result = st.executeQuery();
+      if(result.next()) {
+        boolReturn = !UtilSql.getValue(result, "existing").equals("0");
+      }
+      result.close();
+    } catch(SQLException e){
+      log4j.error("SQL error in query: " + strSql + "Exception:"+ e);
+      throw new ServletException("@CODE=" + Integer.toString(e.getErrorCode()) + "@" + e.getMessage());
+    } catch(Exception ex){
+      log4j.error("Exception in query: " + strSql + "Exception:"+ ex);
+      throw new ServletException("@CODE=@" + ex.getMessage());
+    } finally {
+      try {
+        connectionProvider.releasePreparedStatement(st);
+      } catch(Exception ignore){
+        ignore.printStackTrace();
+      }
+    }
+    return(boolReturn);
+  }
+
+  public static int updateAlertRule(ConnectionProvider connectionProvider, String name, String clientId)    throws ServletException {
+    String strSql = "";
+    strSql = strSql + 
+      "        UPDATE AD_AlertRule" +
+      "        SET SQL='', TYPE='E' WHERE NAME = ? AND AD_Client_ID = ?";
+
+    int updateCount = 0;
+    PreparedStatement st = null;
+
+    int iParameter = 0;
+    try {
+    st = connectionProvider.getPreparedStatement(strSql);
+      iParameter++; UtilSql.setValue(st, iParameter, 12, null, name);
+      iParameter++; UtilSql.setValue(st, iParameter, 12, null, clientId);
+
+      updateCount = st.executeUpdate();
+    } catch(SQLException e){
+      log4j.error("SQL error in query: " + strSql + "Exception:"+ e);
+      throw new ServletException("@CODE=" + Integer.toString(e.getErrorCode()) + "@" + e.getMessage());
+    } catch(Exception ex){
+      log4j.error("Exception in query: " + strSql + "Exception:"+ ex);
+      throw new ServletException("@CODE=@" + ex.getMessage());
+    } finally {
+      try {
+        connectionProvider.releasePreparedStatement(st);
+      } catch(Exception ignore){
+        ignore.printStackTrace();
+      }
+    }
+    return(updateCount);
+  }
+
+  public static boolean existsAlert(ConnectionProvider connectionProvider, String alertRule, String order)    throws ServletException {
+    String strSql = "";
+    strSql = strSql + 
+      "       SELECT COUNT(*) AS EXISTING" +
+      "       FROM AD_ALERT" +
+      "       WHERE AD_ALERTRULE_ID = ?" +
+      "       AND REFERENCEKEY_ID = ?" +
+      "       AND ISFIXED = 'N'";
+
+    ResultSet result;
+    boolean boolReturn = false;
+    PreparedStatement st = null;
+
+    int iParameter = 0;
+    try {
+    st = connectionProvider.getPreparedStatement(strSql);
+      iParameter++; UtilSql.setValue(st, iParameter, 12, null, alertRule);
+      iParameter++; UtilSql.setValue(st, iParameter, 12, null, order);
+
+      result = st.executeQuery();
+      if(result.next()) {
+        boolReturn = !UtilSql.getValue(result, "existing").equals("0");
+      }
+      result.close();
+    } catch(SQLException e){
+      log4j.error("SQL error in query: " + strSql + "Exception:"+ e);
+      throw new ServletException("@CODE=" + Integer.toString(e.getErrorCode()) + "@" + e.getMessage());
+    } catch(Exception ex){
+      log4j.error("Exception in query: " + strSql + "Exception:"+ ex);
+      throw new ServletException("@CODE=@" + ex.getMessage());
+    } finally {
+      try {
+        connectionProvider.releasePreparedStatement(st);
+      } catch(Exception ignore){
+        ignore.printStackTrace();
+      }
+    }
+    return(boolReturn);
+  }
+
+  public static String getAlertRuleId(ConnectionProvider connectionProvider, String name, String client)    throws ServletException {
+    String strSql = "";
+    strSql = strSql + 
+      "       SELECT MAX(ad_alertrule_id) AS name" +
+      "       FROM AD_ALERTRULE" +
+      "       WHERE NAME LIKE ?" +
+      "         AND ISACTIVE = 'Y'" +
+      "         AND AD_CLIENT_ID = ?";
+
+    ResultSet result;
+    String strReturn = null;
+    PreparedStatement st = null;
+
+    int iParameter = 0;
+    try {
+    st = connectionProvider.getPreparedStatement(strSql);
+      iParameter++; UtilSql.setValue(st, iParameter, 12, null, name);
+      iParameter++; UtilSql.setValue(st, iParameter, 12, null, client);
+
+      result = st.executeQuery();
+      if(result.next()) {
+        strReturn = UtilSql.getValue(result, "name");
+      }
+      result.close();
+    } catch(SQLException e){
+      log4j.error("SQL error in query: " + strSql + "Exception:"+ e);
+      throw new ServletException("@CODE=" + Integer.toString(e.getErrorCode()) + "@" + e.getMessage());
+    } catch(Exception ex){
+      log4j.error("Exception in query: " + strSql + "Exception:"+ ex);
+      throw new ServletException("@CODE=@" + ex.getMessage());
+    } finally {
+      try {
+        connectionProvider.releasePreparedStatement(st);
+      } catch(Exception ignore){
+        ignore.printStackTrace();
+      }
+    }
+    return(strReturn);
+  }
+
+  public static AlertsForWrongOrdersData[] getRoleId(ConnectionProvider connectionProvider, String window, String clientId)    throws ServletException {
+    return getRoleId(connectionProvider, window, clientId, 0, 0);
+  }
+
+  public static AlertsForWrongOrdersData[] getRoleId(ConnectionProvider connectionProvider, String window, String clientId, int firstRegister, int numberRegisters)    throws ServletException {
+    String strSql = "";
+    strSql = strSql + 
+      "       SELECT distinct ad_role_id" +
+      "       FROM ad_window_access" +
+      "       WHERE ad_window_id = ?" +
+      "       AND AD_CLIENT_ID = ?" +
+      "         AND ISACTIVE = 'Y'";
+
+    ResultSet result;
+    Vector<java.lang.Object> vector = new Vector<java.lang.Object>(0);
+    PreparedStatement st = null;
+
+    int iParameter = 0;
+    try {
+    st = connectionProvider.getPreparedStatement(strSql);
+      iParameter++; UtilSql.setValue(st, iParameter, 12, null, window);
+      iParameter++; UtilSql.setValue(st, iParameter, 12, null, clientId);
+
+      result = st.executeQuery();
+      long countRecord = 0;
+      long countRecordSkip = 1;
+      boolean continueResult = true;
+      while(countRecordSkip < firstRegister && continueResult) {
+        continueResult = result.next();
+        countRecordSkip++;
+      }
+      while(continueResult && result.next()) {
+        countRecord++;
+        AlertsForWrongOrdersData objectAlertsForWrongOrdersData = new AlertsForWrongOrdersData();
+        objectAlertsForWrongOrdersData.adRoleId = UtilSql.getValue(result, "ad_role_id");
+        objectAlertsForWrongOrdersData.InitRecordNumber = Integer.toString(firstRegister);
+        vector.addElement(objectAlertsForWrongOrdersData);
+        if (countRecord >= numberRegisters && numberRegisters != 0) {
+          continueResult = false;
+        }
+      }
+      result.close();
+    } catch(SQLException e){
+      log4j.error("SQL error in query: " + strSql + "Exception:"+ e);
+      throw new ServletException("@CODE=" + Integer.toString(e.getErrorCode()) + "@" + e.getMessage());
+    } catch(Exception ex){
+      log4j.error("Exception in query: " + strSql + "Exception:"+ ex);
+      throw new ServletException("@CODE=@" + ex.getMessage());
+    } finally {
+      try {
+        connectionProvider.releasePreparedStatement(st);
+      } catch(Exception ignore){
+        ignore.printStackTrace();
+      }
+    }
+    AlertsForWrongOrdersData objectAlertsForWrongOrdersData[] = new AlertsForWrongOrdersData[vector.size()];
+    vector.copyInto(objectAlertsForWrongOrdersData);
+    return(objectAlertsForWrongOrdersData);
+  }
+
+  public static int insertAlertRule(ConnectionProvider connectionProvider, String clientId, String name, String tabId, String sql)    throws ServletException {
+    String strSql = "";
+    strSql = strSql + 
+      "      INSERT INTO AD_ALERTRULE (" +
+      "        AD_ALERTRULE_ID, AD_CLIENT_ID, AD_ORG_ID,ISACTIVE," +
+      "        CREATED, CREATEDBY,  UPDATED, UPDATEDBY," +
+      "        NAME, AD_TAB_ID, FILTERCLAUSE, TYPE," +
+      "        SQL" +
+      "      ) VALUES (" +
+      "        get_uuid(), ?, '0', 'Y'," +
+      "        now(), '100', now(), '100'," +
+      "        ?, ?, '', 'E'," +
+      "        ?" +
+      "      )";
+
+    int updateCount = 0;
+    PreparedStatement st = null;
+
+    int iParameter = 0;
+    try {
+    st = connectionProvider.getPreparedStatement(strSql);
+      iParameter++; UtilSql.setValue(st, iParameter, 12, null, clientId);
+      iParameter++; UtilSql.setValue(st, iParameter, 12, null, name);
+      iParameter++; UtilSql.setValue(st, iParameter, 12, null, tabId);
+      iParameter++; UtilSql.setValue(st, iParameter, 12, null, sql);
+
+      updateCount = st.executeUpdate();
+    } catch(SQLException e){
+      log4j.error("SQL error in query: " + strSql + "Exception:"+ e);
+      throw new ServletException("@CODE=" + Integer.toString(e.getErrorCode()) + "@" + e.getMessage());
+    } catch(Exception ex){
+      log4j.error("Exception in query: " + strSql + "Exception:"+ ex);
+      throw new ServletException("@CODE=@" + ex.getMessage());
+    } finally {
+      try {
+        connectionProvider.releasePreparedStatement(st);
+      } catch(Exception ignore){
+        ignore.printStackTrace();
+      }
+    }
+    return(updateCount);
+  }
+
+  public static int insertAlert(ConnectionProvider connectionProvider, String client, String org, String description, String adAlertRuleId, String recordId, String referencekey_id)    throws ServletException {
+    String strSql = "";
+    strSql = strSql + 
+      "      INSERT INTO AD_Alert (" +
+      "        AD_Alert_ID, AD_Client_ID, AD_Org_ID, IsActive," +
+      "        Created, CreatedBy, Updated, UpdatedBy," +
+      "        Description, AD_AlertRule_ID, Record_Id, Referencekey_ID" +
+      "      ) VALUES (" +
+      "        get_uuid(), ?, ?, 'Y'," +
+      "        NOW(), '0', NOW(), '0'," +
+      "        ?, ?, ?, ?)";
+
+    int updateCount = 0;
+    PreparedStatement st = null;
+
+    int iParameter = 0;
+    try {
+    st = connectionProvider.getPreparedStatement(strSql);
+      iParameter++; UtilSql.setValue(st, iParameter, 12, null, client);
+      iParameter++; UtilSql.setValue(st, iParameter, 12, null, org);
+      iParameter++; UtilSql.setValue(st, iParameter, 12, null, description);
+      iParameter++; UtilSql.setValue(st, iParameter, 12, null, adAlertRuleId);
+      iParameter++; UtilSql.setValue(st, iParameter, 12, null, recordId);
+      iParameter++; UtilSql.setValue(st, iParameter, 12, null, referencekey_id);
+
+      updateCount = st.executeUpdate();
+    } catch(SQLException e){
+      log4j.error("SQL error in query: " + strSql + "Exception:"+ e);
+      throw new ServletException("@CODE=" + Integer.toString(e.getErrorCode()) + "@" + e.getMessage());
+    } catch(Exception ex){
+      log4j.error("Exception in query: " + strSql + "Exception:"+ ex);
+      throw new ServletException("@CODE=@" + ex.getMessage());
+    } finally {
+      try {
+        connectionProvider.releasePreparedStatement(st);
+      } catch(Exception ignore){
+        ignore.printStackTrace();
+      }
+    }
+    return(updateCount);
+  }
+
+  public static int insertAlertRecipient(ConnectionProvider connectionProvider, String client, String org, String adAlertRuleId, String role)    throws ServletException {
+    String strSql = "";
+    strSql = strSql + 
+      "    INSERT INTO ad_alertrecipient(" +
+      "            ad_user_id, ad_client_id, ad_org_id, isactive, created, createdby, " +
+      "            updated, updatedby, ad_alertrecipient_id, ad_alertrule_id, ad_role_id, " +
+      "            sendemail)" +
+      "    VALUES (null, ?, ?, 'Y', now(), '100', " +
+      "            now(), '100', get_uuid(), ?, ?, " +
+      "            'N')";
+
+    int updateCount = 0;
+    PreparedStatement st = null;
+
+    int iParameter = 0;
+    try {
+    st = connectionProvider.getPreparedStatement(strSql);
+      iParameter++; UtilSql.setValue(st, iParameter, 12, null, client);
+      iParameter++; UtilSql.setValue(st, iParameter, 12, null, org);
+      iParameter++; UtilSql.setValue(st, iParameter, 12, null, adAlertRuleId);
+      iParameter++; UtilSql.setValue(st, iParameter, 12, null, role);
+
+      updateCount = st.executeUpdate();
+    } catch(SQLException e){
+      log4j.error("SQL error in query: " + strSql + "Exception:"+ e);
+      throw new ServletException("@CODE=" + Integer.toString(e.getErrorCode()) + "@" + e.getMessage());
+    } catch(Exception ex){
+      log4j.error("Exception in query: " + strSql + "Exception:"+ ex);
+      throw new ServletException("@CODE=@" + ex.getMessage());
+    } finally {
+      try {
+        connectionProvider.releasePreparedStatement(st);
+      } catch(Exception ignore){
+        ignore.printStackTrace();
+      }
+    }
+    return(updateCount);
+  }
+}
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.java	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.java	Fri Jun 13 09:13:47 2014 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2010-2013 Openbravo SLU
+ * All portions are Copyright (C) 2010-2014 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  *************************************************************************
@@ -400,238 +400,249 @@
     OBContext.setAdminMode(true);
     try {
       FIN_Payment payment = new AdvPaymentMngtDao().getObject(FIN_Payment.class, strPaymentId);
-      String[] discard = { "discard" };
-      if (payment.getBusinessPartner() != null) {
-        discard[0] = "bpGridColumn";
+      if (payment.getPaymentDate() == null) {
+        OBError message = new OBError();
+        message.setType("Error");
+        message.setTitle(Utility.messageBD(this, "Error", vars.getLanguage()));
+        message
+            .setMessage(Utility.messageBD(this, "APRM_PaymentDateMandatory", vars.getLanguage()));
+        vars.setMessage(strTabId, message);
+        printPageClosePopUpAndRefreshParent(response, vars);
+      } else {
+        String[] discard = { "discard" };
+        if (payment.getBusinessPartner() != null) {
+          discard[0] = "bpGridColumn";
+        }
+        XmlDocument xmlDocument = xmlEngine.readXmlTemplate(
+            "org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice", discard)
+            .createXmlDocument();
+
+        xmlDocument.setParameter("directory", "var baseDirectory = \"" + strReplaceWith + "/\";\n");
+        xmlDocument.setParameter("language", "defaultLang=\"" + vars.getLanguage() + "\";");
+        xmlDocument.setParameter("theme", vars.getTheme());
+
+        if (payment.isReceipt())
+          xmlDocument.setParameter("title",
+              Utility.messageBD(this, "APRM_AddPaymentIn", vars.getLanguage()));
+        else
+          xmlDocument.setParameter("title",
+              Utility.messageBD(this, "APRM_AddPaymentOut", vars.getLanguage()));
+        xmlDocument.setParameter("dateDisplayFormat", vars.getSessionValue("#AD_SqlDateFormat"));
+        if (payment.getBusinessPartner() != null) {
+          xmlDocument.setParameter("businessPartner", payment.getBusinessPartner().getIdentifier());
+          xmlDocument.setParameter("businessPartnerId", payment.getBusinessPartner().getId());
+          xmlDocument.setParameter(
+              "credit",
+              dao.getCustomerCredit(payment.getBusinessPartner(), payment.isReceipt(),
+                  payment.getOrganization()).toString());
+          xmlDocument.setParameter("customerBalance",
+              payment.getBusinessPartner().getCreditUsed() != null ? payment.getBusinessPartner()
+                  .getCreditUsed().toString() : BigDecimal.ZERO.toString());
+        } else {
+          xmlDocument.setParameter("businessPartner", "");
+          xmlDocument.setParameter("businessPartnerId", "");
+          xmlDocument.setParameter("credit", "");
+          xmlDocument.setParameter("customerBalance", "");
+
+        }
+        xmlDocument.setParameter("windowId", strWindowId);
+        xmlDocument.setParameter("tabId", strTabId);
+        xmlDocument.setParameter("orgId", payment.getOrganization().getId());
+        xmlDocument.setParameter("paymentId", strPaymentId);
+        xmlDocument.setParameter("actualPayment", payment.getAmount().toString());
+        xmlDocument.setParameter("headerAmount", payment.getAmount().toString());
+        xmlDocument.setParameter("isReceipt", (payment.isReceipt() ? "Y" : "N"));
+        xmlDocument.setParameter("isSoTrx", (payment.isReceipt()) ? "Y" : "N");
+        if (payment.getBusinessPartner() == null
+            && (payment.getGeneratedCredit() == null || BigDecimal.ZERO.compareTo(payment
+                .getGeneratedCredit()) != 0)) {
+          payment.setGeneratedCredit(BigDecimal.ZERO);
+          OBDal.getInstance().save(payment);
+          OBDal.getInstance().flush();
+        }
+        xmlDocument.setParameter("generatedCredit", payment.getGeneratedCredit() != null ? payment
+            .getGeneratedCredit().toString() : BigDecimal.ZERO.toString());
+
+        final Currency financialAccountCurrency = payment.getAccount().getCurrency();
+        if (financialAccountCurrency != null) {
+          xmlDocument.setParameter("financialAccountCurrencyId", financialAccountCurrency.getId());
+          xmlDocument.setParameter("financialAccountCurrencyName",
+              financialAccountCurrency.getISOCode());
+          xmlDocument.setParameter("financialAccountCurrencyPrecision", financialAccountCurrency
+              .getStandardPrecision().toString());
+        }
+        xmlDocument.setParameter("exchangeRate",
+            payment.getFinancialTransactionConvertRate() == null ? "" : payment
+                .getFinancialTransactionConvertRate().toPlainString());
+        xmlDocument.setParameter("actualConverted",
+            payment.getFinancialTransactionAmount() == null ? "" : payment
+                .getFinancialTransactionAmount().toString());
+        xmlDocument.setParameter("expectedConverted",
+            payment.getFinancialTransactionAmount() == null ? "" : payment
+                .getFinancialTransactionAmount().toPlainString());
+        xmlDocument.setParameter("currencyId", payment.getCurrency().getId());
+        xmlDocument.setParameter("currencyName", payment.getCurrency().getISOCode());
+
+        boolean forcedFinancialAccountTransaction = false;
+        forcedFinancialAccountTransaction = FIN_AddPayment
+            .isForcedFinancialAccountTransaction(payment);
+        // Action Regarding Document
+        xmlDocument.setParameter("ActionDocument", (payment.isReceipt() ? "PRP" : "PPP"));
+        try {
+          ComboTableData comboTableData = new ComboTableData(vars, this, "LIST", "",
+              (payment.isReceipt() ? "F903F726B41A49D3860243101CEEBA25"
+                  : "F15C13A199A748F1B0B00E985A64C036"),
+              forcedFinancialAccountTransaction ? "29010995FD39439D97A5C0CE8CE27D70" : "",
+              Utility.getContext(this, vars, "#AccessibleOrgTree", "AddPaymentFromInvoice"),
+              Utility.getContext(this, vars, "#User_Client", "AddPaymentFromInvoice"), 0);
+          Utility.fillSQLParameters(this, vars, null, comboTableData, "AddOrderOrInvoice", "");
+          xmlDocument
+              .setData("reportActionDocument", "liststructure", comboTableData.select(false));
+          comboTableData = null;
+        } catch (Exception ex) {
+          throw new ServletException(ex);
+        }
+
+        // Accounting Dimensions
+        String doctype;
+        if (payment.isReceipt()) {
+          doctype = AcctServer.DOCTYPE_ARReceipt;
+        } else {
+          doctype = AcctServer.DOCTYPE_APPayment;
+        }
+        final String strCentrally = Utility.getContext(this, vars,
+            DimensionDisplayUtility.IsAcctDimCentrally, strWindowId);
+        final String strElement_BP = Utility.getContext(this, vars, DimensionDisplayUtility
+            .displayAcctDimensions(strCentrally, DimensionDisplayUtility.DIM_BPartner, doctype,
+                DimensionDisplayUtility.DIM_Header), strWindowId);
+        final String strElement_PR = Utility.getContext(this, vars, DimensionDisplayUtility
+            .displayAcctDimensions(strCentrally, DimensionDisplayUtility.DIM_Product, doctype,
+                DimensionDisplayUtility.DIM_Header), strWindowId);
+        final String strElement_PJ = Utility.getContext(this, vars, DimensionDisplayUtility
+            .displayAcctDimensions(strCentrally, DimensionDisplayUtility.DIM_Project, doctype,
+                DimensionDisplayUtility.DIM_Header), strWindowId);
+        final String strElement_AY = Utility.getContext(this, vars, "$Element_AY", strWindowId);
+        final String strElement_CC = Utility.getContext(this, vars, DimensionDisplayUtility
+            .displayAcctDimensions(strCentrally, DimensionDisplayUtility.DIM_CostCenter, doctype,
+                DimensionDisplayUtility.DIM_Header), strWindowId);
+        final String strElement_MC = Utility.getContext(this, vars, "$Element_MC", strWindowId);
+        final String strElement_U1 = Utility.getContext(this, vars, DimensionDisplayUtility
+            .displayAcctDimensions(strCentrally, DimensionDisplayUtility.DIM_User1, doctype,
+                DimensionDisplayUtility.DIM_Header), strWindowId);
+        final String strElement_U2 = Utility.getContext(this, vars, DimensionDisplayUtility
+            .displayAcctDimensions(strCentrally, DimensionDisplayUtility.DIM_User2, doctype,
+                DimensionDisplayUtility.DIM_Header), strWindowId);
+        xmlDocument.setParameter("strElement_BP", strElement_BP);
+        xmlDocument.setParameter("strElement_PR", strElement_PR);
+        xmlDocument.setParameter("strElement_PJ", strElement_PJ);
+        xmlDocument.setParameter("strElement_AY", strElement_AY);
+        xmlDocument.setParameter("strElement_CC", strElement_CC);
+        xmlDocument.setParameter("strElement_MC", strElement_MC);
+        xmlDocument.setParameter("strElement_U1", strElement_U1);
+        xmlDocument.setParameter("strElement_U2", strElement_U2);
+
+        // Add GL Items
+        JSONArray addedGLITemsArray = new JSONArray();
+        List<FIN_PaymentScheduleDetail> gLItemScheduleDetailLines = FIN_AddPayment
+            .getGLItemScheduleDetails(payment);
+        for (FIN_PaymentScheduleDetail psdGLItem : gLItemScheduleDetailLines) {
+          try {
+            JSONObject glItem = new JSONObject();
+            glItem.put("glitemId", psdGLItem.getPaymentDetails().getGLItem().getId());
+            glItem.put("glitemDesc", psdGLItem.getPaymentDetails().getGLItem().getIdentifier());
+            glItem.put("finPaymentScheduleDetailId", psdGLItem.getId());
+            // Amounts
+            if (payment.isReceipt()) {
+              glItem.put("glitemPaidOutAmt", psdGLItem.getAmount().signum() < 0 ? psdGLItem
+                  .getAmount().abs() : BigDecimal.ZERO);
+              glItem.put("glitemReceivedInAmt",
+                  psdGLItem.getAmount().signum() > 0 ? psdGLItem.getAmount() : BigDecimal.ZERO);
+            } else {
+              glItem.put("glitemReceivedInAmt", psdGLItem.getAmount().signum() < 0 ? psdGLItem
+                  .getAmount().abs() : BigDecimal.ZERO);
+              glItem.put("glitemPaidOutAmt",
+                  psdGLItem.getAmount().signum() > 0 ? psdGLItem.getAmount() : BigDecimal.ZERO);
+            }
+            // Accounting Dimensions
+            glItem.put("cBpartnerDim", psdGLItem.getBusinessPartner() != null ? psdGLItem
+                .getBusinessPartner().getId() : "");
+            glItem.put("cBpartnerDimDesc", psdGLItem.getBusinessPartner() != null ? psdGLItem
+                .getBusinessPartner().getIdentifier() : "");
+            glItem.put("mProductDim", psdGLItem.getProduct() != null ? psdGLItem.getProduct()
+                .getId() : "");
+            glItem.put("mProductDimDesc", psdGLItem.getProduct() != null ? psdGLItem.getProduct()
+                .getIdentifier() : "");
+            glItem.put("cProjectDim", psdGLItem.getProject() != null ? psdGLItem.getProject()
+                .getId() : "");
+            glItem.put("cProjectDimDesc", psdGLItem.getProject() != null ? psdGLItem.getProject()
+                .getIdentifier() : "");
+            glItem.put("cActivityDim", psdGLItem.getActivity() != null ? psdGLItem.getActivity()
+                .getId() : "");
+            glItem.put("cActivityDimDesc", psdGLItem.getActivity() != null ? psdGLItem
+                .getActivity().getIdentifier() : "");
+            glItem.put("cCostcenterDim", psdGLItem.getCostCenter() != null ? psdGLItem
+                .getCostCenter().getId() : "");
+            glItem.put("cCostcenterDimDesc", psdGLItem.getCostCenter() != null ? psdGLItem
+                .getCostCenter().getIdentifier() : "");
+            glItem.put("cCampaignDim", psdGLItem.getSalesCampaign() != null ? psdGLItem
+                .getSalesCampaign().getId() : "");
+            glItem.put("cCampaignDimDesc", psdGLItem.getSalesCampaign() != null ? psdGLItem
+                .getSalesCampaign().getIdentifier() : "");
+            glItem.put("user1Dim", psdGLItem.getStDimension() != null ? psdGLItem.getStDimension()
+                .getId() : "");
+            glItem.put("user1DimDesc", psdGLItem.getStDimension() != null ? psdGLItem
+                .getStDimension().getIdentifier() : "");
+            glItem.put("user2Dim", psdGLItem.getNdDimension() != null ? psdGLItem.getNdDimension()
+                .getId() : "");
+            glItem.put("user2DimDesc", psdGLItem.getNdDimension() != null ? psdGLItem
+                .getNdDimension().getIdentifier() : "");
+            // DisplayLogics
+            glItem.put("cBpartnerDimDisplayed", strElement_BP);
+            glItem.put("mProductDimDisplayed", strElement_PR);
+            glItem.put("cProjectDimDisplayed", strElement_PJ);
+            glItem.put("cActivityDimDisplayed", strElement_AY);
+            glItem.put("cCostcenterDimDisplayed", strElement_CC);
+            glItem.put("cCampaignDimDisplayed", strElement_MC);
+            glItem.put("user1DimDisplayed", strElement_U1);
+            glItem.put("user2DimDisplayed", strElement_U2);
+            addedGLITemsArray.put(glItem);
+          } catch (JSONException e) {
+            log4j.error(e);
+          }
+        }
+        xmlDocument.setParameter("glItems", addedGLITemsArray.toString().replace("'", "")
+            .replaceAll("\"", "'"));
+        // 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());
+        out.close();
       }
-      XmlDocument xmlDocument = xmlEngine.readXmlTemplate(
-          "org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice", discard)
-          .createXmlDocument();
-
-      xmlDocument.setParameter("directory", "var baseDirectory = \"" + strReplaceWith + "/\";\n");
-      xmlDocument.setParameter("language", "defaultLang=\"" + vars.getLanguage() + "\";");
-      xmlDocument.setParameter("theme", vars.getTheme());
-
-      if (payment.isReceipt())
-        xmlDocument.setParameter("title",
-            Utility.messageBD(this, "APRM_AddPaymentIn", vars.getLanguage()));
-      else
-        xmlDocument.setParameter("title",
-            Utility.messageBD(this, "APRM_AddPaymentOut", vars.getLanguage()));
-      xmlDocument.setParameter("dateDisplayFormat", vars.getSessionValue("#AD_SqlDateFormat"));
-      if (payment.getBusinessPartner() != null) {
-        xmlDocument.setParameter("businessPartner", payment.getBusinessPartner().getIdentifier());
-        xmlDocument.setParameter("businessPartnerId", payment.getBusinessPartner().getId());
-        xmlDocument.setParameter(
-            "credit",
-            dao.getCustomerCredit(payment.getBusinessPartner(), payment.isReceipt(),
-                payment.getOrganization()).toString());
-        xmlDocument.setParameter("customerBalance",
-            payment.getBusinessPartner().getCreditUsed() != null ? payment.getBusinessPartner()
-                .getCreditUsed().toString() : BigDecimal.ZERO.toString());
-      } else {
-        xmlDocument.setParameter("businessPartner", "");
-        xmlDocument.setParameter("businessPartnerId", "");
-        xmlDocument.setParameter("credit", "");
-        xmlDocument.setParameter("customerBalance", "");
-
-      }
-      xmlDocument.setParameter("windowId", strWindowId);
-      xmlDocument.setParameter("tabId", strTabId);
-      xmlDocument.setParameter("orgId", payment.getOrganization().getId());
-      xmlDocument.setParameter("paymentId", strPaymentId);
-      xmlDocument.setParameter("actualPayment", payment.getAmount().toString());
-      xmlDocument.setParameter("headerAmount", payment.getAmount().toString());
-      xmlDocument.setParameter("isReceipt", (payment.isReceipt() ? "Y" : "N"));
-      xmlDocument.setParameter("isSoTrx", (payment.isReceipt()) ? "Y" : "N");
-      if (payment.getBusinessPartner() == null
-          && (payment.getGeneratedCredit() == null || BigDecimal.ZERO.compareTo(payment
-              .getGeneratedCredit()) != 0)) {
-        payment.setGeneratedCredit(BigDecimal.ZERO);
-        OBDal.getInstance().save(payment);
-        OBDal.getInstance().flush();
-      }
-      xmlDocument.setParameter("generatedCredit", payment.getGeneratedCredit() != null ? payment
-          .getGeneratedCredit().toString() : BigDecimal.ZERO.toString());
-
-      final Currency financialAccountCurrency = payment.getAccount().getCurrency();
-      if (financialAccountCurrency != null) {
-        xmlDocument.setParameter("financialAccountCurrencyId", financialAccountCurrency.getId());
-        xmlDocument.setParameter("financialAccountCurrencyName",
-            financialAccountCurrency.getISOCode());
-        xmlDocument.setParameter("financialAccountCurrencyPrecision", financialAccountCurrency
-            .getStandardPrecision().toString());
-      }
-      xmlDocument.setParameter("exchangeRate",
-          payment.getFinancialTransactionConvertRate() == null ? "" : payment
-              .getFinancialTransactionConvertRate().toPlainString());
-      xmlDocument.setParameter("actualConverted",
-          payment.getFinancialTransactionAmount() == null ? "" : payment
-              .getFinancialTransactionAmount().toString());
-      xmlDocument.setParameter("expectedConverted",
-          payment.getFinancialTransactionAmount() == null ? "" : payment
-              .getFinancialTransactionAmount().toPlainString());
-      xmlDocument.setParameter("currencyId", payment.getCurrency().getId());
-      xmlDocument.setParameter("currencyName", payment.getCurrency().getISOCode());
-
-      boolean forcedFinancialAccountTransaction = false;
-      forcedFinancialAccountTransaction = FIN_AddPayment
-          .isForcedFinancialAccountTransaction(payment);
-      // Action Regarding Document
-      xmlDocument.setParameter("ActionDocument", (payment.isReceipt() ? "PRP" : "PPP"));
-      try {
-        ComboTableData comboTableData = new ComboTableData(vars, this, "LIST", "",
-            (payment.isReceipt() ? "F903F726B41A49D3860243101CEEBA25"
-                : "F15C13A199A748F1B0B00E985A64C036"),
-            forcedFinancialAccountTransaction ? "29010995FD39439D97A5C0CE8CE27D70" : "",
-            Utility.getContext(this, vars, "#AccessibleOrgTree", "AddPaymentFromInvoice"),
-            Utility.getContext(this, vars, "#User_Client", "AddPaymentFromInvoice"), 0);
-        Utility.fillSQLParameters(this, vars, null, comboTableData, "AddOrderOrInvoice", "");
-        xmlDocument.setData("reportActionDocument", "liststructure", comboTableData.select(false));
-        comboTableData = null;
-      } catch (Exception ex) {
-        throw new ServletException(ex);
-      }
-
-      // Accounting Dimensions
-      String doctype;
-      if (payment.isReceipt()) {
-        doctype = AcctServer.DOCTYPE_ARReceipt;
-      } else {
-        doctype = AcctServer.DOCTYPE_APPayment;
-      }
-      final String strCentrally = Utility.getContext(this, vars,
-          DimensionDisplayUtility.IsAcctDimCentrally, strWindowId);
-      final String strElement_BP = Utility.getContext(this, vars, DimensionDisplayUtility
-          .displayAcctDimensions(strCentrally, DimensionDisplayUtility.DIM_BPartner, doctype,
-              DimensionDisplayUtility.DIM_Header), strWindowId);
-      final String strElement_PR = Utility.getContext(this, vars, DimensionDisplayUtility
-          .displayAcctDimensions(strCentrally, DimensionDisplayUtility.DIM_Product, doctype,
-              DimensionDisplayUtility.DIM_Header), strWindowId);
-      final String strElement_PJ = Utility.getContext(this, vars, DimensionDisplayUtility
-          .displayAcctDimensions(strCentrally, DimensionDisplayUtility.DIM_Project, doctype,
-              DimensionDisplayUtility.DIM_Header), strWindowId);
-      final String strElement_AY = Utility.getContext(this, vars, "$Element_AY", strWindowId);
-      final String strElement_CC = Utility.getContext(this, vars, DimensionDisplayUtility
-          .displayAcctDimensions(strCentrally, DimensionDisplayUtility.DIM_CostCenter, doctype,
-              DimensionDisplayUtility.DIM_Header), strWindowId);
-      final String strElement_MC = Utility.getContext(this, vars, "$Element_MC", strWindowId);
-      final String strElement_U1 = Utility.getContext(this, vars, DimensionDisplayUtility
-          .displayAcctDimensions(strCentrally, DimensionDisplayUtility.DIM_User1, doctype,
-              DimensionDisplayUtility.DIM_Header), strWindowId);
-      final String strElement_U2 = Utility.getContext(this, vars, DimensionDisplayUtility
-          .displayAcctDimensions(strCentrally, DimensionDisplayUtility.DIM_User2, doctype,
-              DimensionDisplayUtility.DIM_Header), strWindowId);
-      xmlDocument.setParameter("strElement_BP", strElement_BP);
-      xmlDocument.setParameter("strElement_PR", strElement_PR);
-      xmlDocument.setParameter("strElement_PJ", strElement_PJ);
-      xmlDocument.setParameter("strElement_AY", strElement_AY);
-      xmlDocument.setParameter("strElement_CC", strElement_CC);
-      xmlDocument.setParameter("strElement_MC", strElement_MC);
-      xmlDocument.setParameter("strElement_U1", strElement_U1);
-      xmlDocument.setParameter("strElement_U2", strElement_U2);
-
-      // Add GL Items
-      JSONArray addedGLITemsArray = new JSONArray();
-      List<FIN_PaymentScheduleDetail> gLItemScheduleDetailLines = FIN_AddPayment
-          .getGLItemScheduleDetails(payment);
-      for (FIN_PaymentScheduleDetail psdGLItem : gLItemScheduleDetailLines) {
-        try {
-          JSONObject glItem = new JSONObject();
-          glItem.put("glitemId", psdGLItem.getPaymentDetails().getGLItem().getId());
-          glItem.put("glitemDesc", psdGLItem.getPaymentDetails().getGLItem().getIdentifier());
-          glItem.put("finPaymentScheduleDetailId", psdGLItem.getId());
-          // Amounts
-          if (payment.isReceipt()) {
-            glItem.put("glitemPaidOutAmt", psdGLItem.getAmount().signum() < 0 ? psdGLItem
-                .getAmount().abs() : BigDecimal.ZERO);
-            glItem.put("glitemReceivedInAmt",
-                psdGLItem.getAmount().signum() > 0 ? psdGLItem.getAmount() : BigDecimal.ZERO);
-          } else {
-            glItem.put("glitemReceivedInAmt", psdGLItem.getAmount().signum() < 0 ? psdGLItem
-                .getAmount().abs() : BigDecimal.ZERO);
-            glItem.put("glitemPaidOutAmt",
-                psdGLItem.getAmount().signum() > 0 ? psdGLItem.getAmount() : BigDecimal.ZERO);
-          }
-          // Accounting Dimensions
-          glItem.put("cBpartnerDim", psdGLItem.getBusinessPartner() != null ? psdGLItem
-              .getBusinessPartner().getId() : "");
-          glItem.put("cBpartnerDimDesc", psdGLItem.getBusinessPartner() != null ? psdGLItem
-              .getBusinessPartner().getIdentifier() : "");
-          glItem.put("mProductDim", psdGLItem.getProduct() != null ? psdGLItem.getProduct().getId()
-              : "");
-          glItem.put("mProductDimDesc", psdGLItem.getProduct() != null ? psdGLItem.getProduct()
-              .getIdentifier() : "");
-          glItem.put("cProjectDim", psdGLItem.getProject() != null ? psdGLItem.getProject().getId()
-              : "");
-          glItem.put("cProjectDimDesc", psdGLItem.getProject() != null ? psdGLItem.getProject()
-              .getIdentifier() : "");
-          glItem.put("cActivityDim", psdGLItem.getActivity() != null ? psdGLItem.getActivity()
-              .getId() : "");
-          glItem.put("cActivityDimDesc", psdGLItem.getActivity() != null ? psdGLItem.getActivity()
-              .getIdentifier() : "");
-          glItem.put("cCostcenterDim", psdGLItem.getCostCenter() != null ? psdGLItem
-              .getCostCenter().getId() : "");
-          glItem.put("cCostcenterDimDesc", psdGLItem.getCostCenter() != null ? psdGLItem
-              .getCostCenter().getIdentifier() : "");
-          glItem.put("cCampaignDim", psdGLItem.getSalesCampaign() != null ? psdGLItem
-              .getSalesCampaign().getId() : "");
-          glItem.put("cCampaignDimDesc", psdGLItem.getSalesCampaign() != null ? psdGLItem
-              .getSalesCampaign().getIdentifier() : "");
-          glItem.put("user1Dim", psdGLItem.getStDimension() != null ? psdGLItem.getStDimension()
-              .getId() : "");
-          glItem.put("user1DimDesc", psdGLItem.getStDimension() != null ? psdGLItem
-              .getStDimension().getIdentifier() : "");
-          glItem.put("user2Dim", psdGLItem.getNdDimension() != null ? psdGLItem.getNdDimension()
-              .getId() : "");
-          glItem.put("user2DimDesc", psdGLItem.getNdDimension() != null ? psdGLItem
-              .getNdDimension().getIdentifier() : "");
-          // DisplayLogics
-          glItem.put("cBpartnerDimDisplayed", strElement_BP);
-          glItem.put("mProductDimDisplayed", strElement_PR);
-          glItem.put("cProjectDimDisplayed", strElement_PJ);
-          glItem.put("cActivityDimDisplayed", strElement_AY);
-          glItem.put("cCostcenterDimDisplayed", strElement_CC);
-          glItem.put("cCampaignDimDisplayed", strElement_MC);
-          glItem.put("user1DimDisplayed", strElement_U1);
-          glItem.put("user2DimDisplayed", strElement_U2);
-          addedGLITemsArray.put(glItem);
-        } catch (JSONException e) {
-          log4j.error(e);
-        }
-      }
-      xmlDocument.setParameter("glItems",
-          addedGLITemsArray.toString().replace("'", "").replaceAll("\"", "'"));
-      // 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());
-      out.close();
     } finally {
       OBContext.restorePreviousMode();
     }
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/Reconciliation.java	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/Reconciliation.java	Fri Jun 13 09:13:47 2014 +0200
@@ -305,21 +305,23 @@
             TransactionsDao.updateAccountingDate(trans);
           }
           Boolean invoicePaidold = false;
-          for (FIN_PaymentDetail pd : finacctrxv.getPayment().getFINPaymentDetailList()) {
-            for (FIN_PaymentScheduleDetail psd : pd.getFINPaymentScheduleDetailList()) {
-              invoicePaidold = psd.isInvoicePaid();
-              if (!invoicePaidold) {
-                if ((FIN_Utility.invoicePaymentStatus(finacctrxv.getPayment().getPaymentMethod(),
-                    reconciliation.getAccount(), finacctrxv.getPayment().isReceipt())
-                    .equals(finacctrxv.getPayment().getStatus()))) {
-                  psd.setInvoicePaid(true);
-                }
-                if (psd.isInvoicePaid()) {
-                  FIN_Utility.updatePaymentAmounts(psd);
+          if (finacctrxv.getPayment() != null) {
+            for (FIN_PaymentDetail pd : finacctrxv.getPayment().getFINPaymentDetailList()) {
+              for (FIN_PaymentScheduleDetail psd : pd.getFINPaymentScheduleDetailList()) {
+                invoicePaidold = psd.isInvoicePaid();
+                if (!invoicePaidold) {
+                  if ((FIN_Utility.invoicePaymentStatus(finacctrxv.getPayment().getPaymentMethod(),
+                      reconciliation.getAccount(), finacctrxv.getPayment().isReceipt())
+                      .equals(finacctrxv.getPayment().getStatus()))) {
+                    psd.setInvoicePaid(true);
+                  }
+                  if (psd.isInvoicePaid()) {
+                    FIN_Utility.updatePaymentAmounts(psd);
+                  }
                 }
               }
+              FIN_Utility.updateBusinessPartnerCredit(finacctrxv.getPayment());
             }
-            FIN_Utility.updateBusinessPartnerCredit(finacctrxv.getPayment());
           }
         }
 
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_BankStatementProcess.java	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_BankStatementProcess.java	Fri Jun 13 09:13:47 2014 +0200
@@ -156,8 +156,10 @@
 
     final OBQuery<FIN_BankStatementLine> obData = OBDal.getInstance().createQuery(
         FIN_BankStatementLine.class, whereClause.toString(), parameters);
-    if (obData.count() > 0) {
-      return obData.list().get(0).getTransactionDate();
+    obData.setMaxResult(1);
+    FIN_BankStatementLine line = obData.uniqueResult();
+    if (line != null) {
+      return line.getTransactionDate();
     }
 
     // If no previous bank statement is found get the ending date of the last reconciliation
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_ExecutePayment.java	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_ExecutePayment.java	Fri Jun 13 09:13:47 2014 +0200
@@ -186,6 +186,9 @@
             try {
               OBContext.setAdminMode(true);
               for (FIN_PaymentDetail pd : payment.getFINPaymentDetailList()) {
+                if (pd.getGLItem() != null) {
+                  continue;
+                }
                 for (FIN_PaymentScheduleDetail psd : pd.getFINPaymentScheduleDetailList()) {
                   if (psd.isInvoicePaid()
                       && FIN_Utility.isAutomaticDepositWithdrawn(paymentRunPayment.getPayment())
@@ -202,6 +205,7 @@
                     }
                   }
                 }
+                break;
               }
 
             } finally {
@@ -211,11 +215,15 @@
           try {
             OBContext.setAdminMode(true);
             for (FIN_PaymentDetail pd : payment.getFINPaymentDetailList()) {
+              if (pd.getGLItem() != null) {
+                continue;
+              }
               for (FIN_PaymentScheduleDetail psd : pd.getFINPaymentScheduleDetailList()) {
                 if (psd.isInvoicePaid()) {
                   updatePaymentAmounts(paymentRunPayment.getPayment());
                 }
               }
+              break;
             }
           } finally {
             OBContext.restorePreviousMode();
@@ -282,7 +290,7 @@
               psd.getAmount(), psd.getWriteoffAmount());
         }
         if (psd.getOrderPaymentSchedule() != null) {
-          FIN_AddPayment.updatePaymentScheduleAmounts(psd.getOrderPaymentSchedule(),
+          FIN_AddPayment.updatePaymentScheduleAmounts(pDetail, psd.getOrderPaymentSchedule(),
               psd.getAmount(), psd.getWriteoffAmount());
         }
         if (pDetail.isPrepayment() && psd.getOrderPaymentSchedule() == null
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java	Fri Jun 13 09:13:47 2014 +0200
@@ -415,7 +415,7 @@
                   }
 
                   if (paymentScheduleDetail.getOrderPaymentSchedule() != null) {
-                    FIN_AddPayment.updatePaymentScheduleAmounts(
+                    FIN_AddPayment.updatePaymentScheduleAmounts(paymentDetail,
                         paymentScheduleDetail.getOrderPaymentSchedule(),
                         paymentScheduleDetail.getAmount(),
                         paymentScheduleDetail.getWriteoffAmount());
@@ -815,7 +815,7 @@
                     }
                   }
                   if (restorePaidAmounts) {
-                    FIN_AddPayment.updatePaymentScheduleAmounts(
+                    FIN_AddPayment.updatePaymentScheduleAmounts(paymentDetail,
                         paymentScheduleDetail.getInvoicePaymentSchedule(), psdAmount.negate(),
                         psdWriteoffAmount.negate());
                     paymentScheduleDetail.setInvoicePaid(false);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/RecordID2Filling.java	Fri Jun 13 09:13:47 2014 +0200
@@ -0,0 +1,460 @@
+package org.openbravo.advpaymentmngt.process;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.hibernate.Query;
+import org.hibernate.ScrollMode;
+import org.hibernate.ScrollableResults;
+import org.hibernate.Session;
+import org.hibernate.criterion.Restrictions;
+import org.openbravo.dal.core.OBContext;
+import org.openbravo.dal.service.OBCriteria;
+import org.openbravo.dal.service.OBDal;
+import org.openbravo.dal.service.OBQuery;
+import org.openbravo.model.financialmgmt.accounting.AccountingFact;
+import org.openbravo.model.financialmgmt.accounting.coa.AccountingCombination;
+import org.openbravo.model.financialmgmt.accounting.coa.AcctSchema;
+import org.openbravo.model.financialmgmt.payment.FIN_FinaccTransaction;
+import org.openbravo.model.financialmgmt.payment.FIN_FinancialAccount;
+import org.openbravo.model.financialmgmt.payment.FIN_Payment;
+import org.openbravo.model.financialmgmt.payment.FIN_PaymentMethod;
+import org.openbravo.model.financialmgmt.payment.FIN_PaymentScheduleDetail;
+import org.openbravo.model.financialmgmt.payment.FinAccPaymentMethod;
+import org.openbravo.scheduling.ProcessBundle;
+import org.openbravo.scheduling.ProcessLogger;
+import org.openbravo.service.db.DalBaseProcess;
+
+public class RecordID2Filling extends DalBaseProcess {
+
+  private static final Object TRANSACTION_TABLE_ID = "4D8C3B3C31D1410DA046140C9F024D17";
+  private ProcessLogger logger;
+
+  @Override
+  protected void doExecute(ProcessBundle bundle) throws Exception {
+    logger = bundle.getLogger();
+    final StringBuilder hqlInvoices = new StringBuilder();
+    Set<AcctSchema> schemas = getSchemas();
+    Set<String> bpAccounts = new HashSet<String>();
+    Set<String> faAccounts = new HashSet<String>();
+    for (AcctSchema acctSchema : schemas) {
+      bpAccounts.addAll(getBPAccountList(true, acctSchema.getId()));
+      bpAccounts.addAll(getBPAccountList(false, acctSchema.getId()));
+      faAccounts.addAll(getFAAccountList(true, acctSchema.getId()));
+      faAccounts.addAll(getFAAccountList(false, acctSchema.getId()));
+    }
+
+    hqlInvoices.append(" update FinancialMgmtAccountingFact as f set f.recordID2 = f.lineID ");
+    hqlInvoices.append(" where f.table.id = '318' ");
+    hqlInvoices
+        .append("   and exists (select 1 from FIN_Payment_Schedule as ps where ps.id = f.lineID)");
+    hqlInvoices.append("   and f.account.id in :accounts");
+    hqlInvoices.append("   and f.recordID2 is null");
+    Query updateInvoices = OBDal.getInstance().getSession().createQuery(hqlInvoices.toString());
+    updateInvoices.setParameterList("accounts", bpAccounts);
+    int numberInvoices = updateInvoices.executeUpdate();
+    logger.logln("Number of invoice entries updated: " + numberInvoices);
+    OBDal.getInstance().flush();
+
+    final StringBuilder hqlPayments = new StringBuilder();
+    hqlPayments
+        .append(" update FinancialMgmtAccountingFact as f set f.recordID2 = ("
+            + "select case when psd.invoicePaymentSchedule is null then psd.orderPaymentSchedule else psd.invoicePaymentSchedule end "
+            + "from FIN_Payment_ScheduleDetail as psd join psd.paymentDetails as pd"
+            + " where pd.id = f.lineID)");
+    hqlPayments.append("where f.table.id = 'D1A97202E832470285C9B1EB026D54E2' ");
+    hqlPayments.append(" and f.account.id in :accounts");
+    hqlPayments.append(" and f.recordID2 is null");
+    Query updatePayments = OBDal.getInstance().getSession().createQuery(hqlPayments.toString());
+    updatePayments.setParameterList("accounts", bpAccounts);
+    int numberPayments = updatePayments.executeUpdate();
+
+    logger.logln("Number of payment entries updated: " + numberPayments);
+    OBDal.getInstance().flush();
+
+    // Updates in transit accounts (record_id2)
+    final StringBuilder hqlPaymentsInTransit = new StringBuilder();
+    hqlPaymentsInTransit
+        .append(" update FinancialMgmtAccountingFact as f set f.recordID2 = f.recordID");
+    hqlPaymentsInTransit.append(" where f.lineID is null ");
+    hqlPaymentsInTransit.append(" and f.recordID2 is null");
+    hqlPaymentsInTransit
+        .append(" and exists (select 1 from FIN_Payment as p where p.id = f.recordID "
+            + "and not exists( select 1 from FIN_Payment_Credit as pc where pc.creditPaymentUsed = p))");
+    Query updatePaymentsinTransit = OBDal.getInstance().getSession()
+        .createQuery(hqlPaymentsInTransit.toString());
+    int numberPaymentsInTransit = updatePaymentsinTransit.executeUpdate();
+
+    logger.logln("Number of payment entries updated (In Transit): " + numberPaymentsInTransit);
+    OBDal.getInstance().flush();
+
+    final StringBuilder hqlTrxRec = new StringBuilder();
+    hqlTrxRec.append(" select f from FinancialMgmtAccountingFact as f ");
+    hqlTrxRec.append(" where f.recordID2 is null ");
+    hqlTrxRec
+        .append("   and exists (select 1 from FIN_Finacc_Transaction as t where t.id = f.lineID)");
+    hqlTrxRec.append("   and account.id in :accounts");
+    Query query = OBDal.getInstance().getSession().createQuery(hqlTrxRec.toString());
+
+    query.setParameterList("accounts", bpAccounts);
+    int i = 0;
+    int j = 0;
+    query.setFetchSize(1000);
+    final ScrollableResults scroller = query.scroll(ScrollMode.FORWARD_ONLY);
+    try {
+      while (scroller.next()) {
+        OBContext.setAdminMode(false);
+        final AccountingFact accountingEntry = (AccountingFact) scroller.get()[0];
+        try {
+          FIN_FinaccTransaction trx = OBDal.getInstance().get(FIN_FinaccTransaction.class,
+              accountingEntry.getLineID());
+          if (trx != null && trx.getFinPayment() != null) {
+            if (trx.getFinPayment().getFINPaymentDetailList().size() == 1
+                && (trx.getFinPayment().getFINPaymentDetailList().get(0)
+                    .getFINPaymentScheduleDetailList().get(0).getInvoicePaymentSchedule() != null || trx
+                    .getFinPayment().getFINPaymentDetailList().get(0)
+                    .getFINPaymentScheduleDetailList().get(0).getOrderPaymentSchedule() != null)) {
+              accountingEntry
+                  .setRecordID2(trx.getFinPayment().getFINPaymentDetailList().get(0)
+                      .getFINPaymentScheduleDetailList().get(0).getInvoicePaymentSchedule() == null ? trx
+                      .getFinPayment().getFINPaymentDetailList().get(0)
+                      .getFINPaymentScheduleDetailList().get(0).getOrderPaymentSchedule().getId()
+                      : trx.getFinPayment().getFINPaymentDetailList().get(0)
+                          .getFINPaymentScheduleDetailList().get(0).getInvoicePaymentSchedule()
+                          .getId());
+              OBDal.getInstance().save(accountingEntry);
+              j++;
+            } else {
+              FIN_PaymentScheduleDetail psd = getOrderedPSDs(trx.getFinPayment()).get(
+                  getAccountingEntryPosition(accountingEntry, bpAccounts));
+              accountingEntry.setRecordID2(psd.getPaymentDetails().isPrepayment() ? psd
+                  .getOrderPaymentSchedule().getId() : psd.getInvoicePaymentSchedule().getId());
+              OBDal.getInstance().save(accountingEntry);
+              j++;
+            }
+          }
+          // clear the session every 100 records
+          if ((i % 100) == 0 && i != 0) {
+            logger.logln(String.valueOf(i + 1) + " - " + String.valueOf(j));
+            logger.logln(String.valueOf(i + 1) + " - " + String.valueOf(j));
+            OBDal.getInstance().flush();
+            OBDal.getInstance().getSession().clear();
+          }
+          i++;
+        } catch (Exception e) {
+          logger.logln("Entry not updated: " + accountingEntry.getId());
+          continue;
+        }
+      }
+      OBDal.getInstance().flush();
+      OBDal.getInstance().getSession().clear();
+    } finally {
+      OBContext.restorePreviousMode();
+      scroller.close();
+    }
+    // Update Transactions and Reconciliations
+    final StringBuilder hqlTrxRecInTransit = new StringBuilder();
+    hqlTrxRecInTransit.append(" select f from FinancialMgmtAccountingFact as f ");
+    hqlTrxRecInTransit.append(" where f.recordID2 is null ");
+    hqlTrxRecInTransit
+        .append("   and (exists (select 1 from FIN_Finacc_Transaction as t where t.id = f.lineID) or (f.lineID is null and f.table.id = '"
+            + TRANSACTION_TABLE_ID + "'))");
+    hqlTrxRecInTransit.append("   and account.id in :accounts");
+    Query queryInTransit = OBDal.getInstance().getSession()
+        .createQuery(hqlTrxRecInTransit.toString());
+
+    queryInTransit.setParameterList("accounts", faAccounts);
+    i = 0;
+    j = 0;
+    queryInTransit.setFetchSize(1000);
+    final ScrollableResults scrollerInTransit = queryInTransit.scroll(ScrollMode.FORWARD_ONLY);
+    try {
+      while (scrollerInTransit.next()) {
+        OBContext.setAdminMode(false);
+        final AccountingFact accountingEntry = (AccountingFact) scrollerInTransit.get()[0];
+        try {
+          FIN_FinaccTransaction trx = OBDal.getInstance().get(
+              FIN_FinaccTransaction.class,
+              accountingEntry.getLineID() == null ? accountingEntry.getRecordID() : accountingEntry
+                  .getLineID());
+          if (trx != null && trx.getFinPayment() != null) {
+            // logger.logln("Table: " + accountingEntry.getTable().getName());
+            // logger.logln("Accounting entry: ");
+            // logger.logln(accountingEntry.getAccountingEntryDescription() + " - "
+            // + accountingEntry.getDebit().toString() + " - "
+            // + accountingEntry.getCredit().toString());
+            // logger.logln("Payment Method: " + trx.getFinPayment().getPaymentMethod().getName());
+            // logger.logln("Financial Account: " + trx.getAccount().getName());
+
+            Set<String> paymentAccount = getFAAccountList(trx.getFinPayment().isReceipt(),
+                accountingEntry.getAccountingSchema().getId(), trx.getAccount().getId(), trx
+                    .getFinPayment().getPaymentMethod().getId(), "PAY");
+            Set<String> transactionAccount = getFAAccountList(trx.getFinPayment().isReceipt(),
+                accountingEntry.getAccountingSchema().getId(), trx.getAccount().getId(), trx
+                    .getFinPayment().getPaymentMethod().getId(), "TRX");
+
+            // logger.logln("Payment event account: " + paymentAccount);
+            // logger.logln("Transaction event account: " + transactionAccount);
+            if (paymentAccount.contains(accountingEntry.getAccount().getId())) {
+              logger.logln("Use: Payment ID= " + trx.getFinPayment().getId());
+              accountingEntry.setRecordID2(trx.getFinPayment().getId());
+              OBDal.getInstance().save(accountingEntry);
+              j++;
+            } else if (transactionAccount.contains(accountingEntry.getAccount().getId())) {
+              logger.logln("Use: Transaction ID= " + trx.getId());
+              accountingEntry.setRecordID2(trx.getId());
+              OBDal.getInstance().save(accountingEntry);
+              j++;
+            }
+          }
+          // clear the session every 100 records
+          if ((i % 100) == 0 && i != 0) {
+            logger.logln(String.valueOf(i + 1) + " - " + String.valueOf(j));
+            logger.logln(String.valueOf(i + 1) + " - " + String.valueOf(j));
+            OBDal.getInstance().flush();
+            OBDal.getInstance().getSession().clear();
+          }
+          i++;
+        } catch (Exception e) {
+          logger.logln("Entry not updated: " + accountingEntry.getId());
+          continue;
+        }
+      }
+      OBDal.getInstance().flush();
+      OBDal.getInstance().getSession().clear();
+    } finally {
+      OBContext.restorePreviousMode();
+      scrollerInTransit.close();
+    }
+
+    // Update date balancing
+    final StringBuilder hqlDateBalanced = new StringBuilder();
+    hqlDateBalanced
+        .append(" update FinancialMgmtAccountingFact as f set f.dateBalanced = "
+            + "(select max(f2.accountingDate) from FinancialMgmtAccountingFact as f2 "
+            + "where f2.recordID2 = f.recordID2 and f2.accountingSchema = f.accountingSchema and f2.account = f.account group by f2.recordID2 having sum(f2.credit-f2.debit)=0) ");
+    hqlDateBalanced
+        .append(" where exists (select 1 from FinancialMgmtAccountingFact as f3 "
+            + "where f3.recordID2 = f.recordID2 and f3.accountingSchema = f.accountingSchema and f3.account = f.account group by f3.recordID2 having sum(f3.credit-f3.debit)=0)");
+    hqlDateBalanced.append(" and f.dateBalanced is null");
+    Query updateDateBalanced = OBDal.getInstance().getSession()
+        .createQuery(hqlDateBalanced.toString());
+    int numberBalanced = updateDateBalanced.executeUpdate();
+    logger.logln("Number of date balanced entries: " + numberBalanced);
+    OBDal.getInstance().flush();
+  }
+
+  private Set<AcctSchema> getSchemas() {
+    OBCriteria<AcctSchema> obc = OBDal.getInstance().createCriteria(AcctSchema.class);
+    return new HashSet<AcctSchema>(obc.list());
+  }
+
+  private int getAccountingEntryPosition(AccountingFact accountingEntry, Set<String> accounts) {
+    final StringBuilder hqlString = new StringBuilder();
+    hqlString.append(" as f");
+    hqlString.append(" where f.account.id in :accounts");
+    hqlString.append(" and f.recordID = :recordID");
+    hqlString.append(" order by abs(f.debit-f.credit), f.creationDate");
+    final OBQuery<AccountingFact> query = OBDal.getInstance().createQuery(AccountingFact.class,
+        hqlString.toString());
+    query.setNamedParameter("accounts", accounts);
+    query.setNamedParameter("recordID", accountingEntry.getRecordID());
+    query.setFilterOnReadableClients(false);
+    query.setFilterOnReadableOrganization(false);
+    int i = 0;
+    for (AccountingFact af : query.list()) {
+      if (af.getId().equals(accountingEntry.getId())) {
+        return i;
+      }
+      i = i + 1;
+    }
+    return i;
+  }
+
+  private List<FIN_PaymentScheduleDetail> getOrderedPSDs(FIN_Payment finPayment) {
+    final StringBuilder hqlString = new StringBuilder();
+    hqlString.append(" as psd join psd.paymentDetails as pd");
+    hqlString.append(" where pd.finPayment = :payment");
+    hqlString.append(" and pd.gLItem is null");
+    hqlString.append(" order by abs(psd.amount), psd.creationDate");
+    final OBQuery<FIN_PaymentScheduleDetail> query = OBDal.getInstance().createQuery(
+        FIN_PaymentScheduleDetail.class, hqlString.toString());
+    query.setNamedParameter("payment", finPayment);
+    return query.list();
+  }
+
+  private Set<String> getBPAccountList(boolean isReceipt, String acctSchemaId) {
+    Set<String> result = new HashSet<String>();
+    final StringBuilder hqlString = new StringBuilder();
+    if (isReceipt) {
+      hqlString.append("select distinct ca.customerReceivablesNo, ca.customerPrepayment");
+      hqlString.append(" from CustomerAccounts as ca");
+      hqlString.append(" where ca.accountingSchema.id = '" + acctSchemaId + "'");
+    } else {
+      hqlString.append("select distinct va.vendorPrepayment, va.vendorLiability");// va.vendorServiceLiability,
+      hqlString.append(" from VendorAccounts as va");
+      hqlString.append(" where va.accountingSchema.id = '" + acctSchemaId + "'");
+    }
+    final Session session = OBDal.getInstance().getSession();
+    final Query query = session.createQuery(hqlString.toString());
+    for (Object resultObject : query.list()) {
+      if (resultObject.getClass().isArray()) {
+        final Object[] values = (Object[]) resultObject;
+        for (Object value : values) {
+          if (value instanceof AccountingCombination) {
+            result.add(((AccountingCombination) value).getAccount().getId());
+          }
+        }
+      }
+    }
+    return result;
+  }
+
+  private Set<String> getFAAccountList(boolean isReceipt, String acctSchemaId) {
+    Set<String> result = new HashSet<String>();
+    final StringBuilder hqlString = new StringBuilder();
+    if (isReceipt) {
+      hqlString.append("select distinct faa.inTransitPaymentAccountIN");
+    } else {
+      hqlString.append("select distinct faa.fINOutIntransitAcct");
+    }
+    hqlString.append(" from FIN_Financial_Account_Acct as faa");
+    hqlString.append(" where faa.accountingSchema.id = :acctSchemaId");
+    final Session session = OBDal.getInstance().getSession();
+    final Query query = session.createQuery(hqlString.toString());
+    query.setParameter("acctSchemaId", acctSchemaId);
+    for (Object resultObject : query.list()) {
+      if (resultObject.getClass().isArray()) {
+        final Object[] values = (Object[]) resultObject;
+        for (Object value : values) {
+          if (value instanceof AccountingCombination) {
+            result.add(((AccountingCombination) value).getAccount().getId());
+          }
+        }
+      } else {
+        if (resultObject instanceof AccountingCombination) {
+          result.add(((AccountingCombination) resultObject).getAccount().getId());
+        }
+      }
+    }
+    final StringBuilder hqlString2 = new StringBuilder();
+    if (isReceipt) {
+      hqlString2.append("select distinct faa.depositAccount");
+    } else {
+      hqlString2.append("select distinct faa.withdrawalAccount");
+    }
+    hqlString2.append(" from FIN_Financial_Account_Acct as faa");
+    hqlString2.append(" where faa.accountingSchema.id = :acctSchemaId");
+    // session = OBDal.getInstance().getSession();
+    final Query query2 = session.createQuery(hqlString2.toString());
+    query2.setParameter("acctSchemaId", acctSchemaId);
+    for (Object resultObject : query2.list()) {
+      if (resultObject.getClass().isArray()) {
+        final Object[] values = (Object[]) resultObject;
+        for (Object value : values) {
+          if (value instanceof AccountingCombination) {
+            result.add(((AccountingCombination) value).getAccount().getId());
+          }
+        }
+      } else {
+        if (resultObject instanceof AccountingCombination) {
+          result.add(((AccountingCombination) resultObject).getAccount().getId());
+        }
+      }
+    }
+    return result;
+  }
+
+  private Set<String> getFAAccountList(boolean isReceipt, String acctSchemaId,
+      String financialAccountId, String paymentMethodId, String table) {
+    Set<String> result = new HashSet<String>();
+    final StringBuilder hqlString = new StringBuilder();
+    String use = null;
+    if (paymentMethodId != null && !"".equals(paymentMethodId)) {
+      FIN_PaymentMethod paymentMethod = OBDal.getInstance().get(FIN_PaymentMethod.class,
+          paymentMethodId);
+      use = getUse(paymentMethod, financialAccountId, isReceipt, table);
+      if (use == null) {
+        return result;
+      }
+    }
+    if (isReceipt) {
+      if ("INT".equals(use)) {
+        hqlString.append("select distinct faa.inTransitPaymentAccountIN");
+      } else if ("DEP".equals(use)) {
+        hqlString.append("select distinct faa.depositAccount");
+      } else if ("CLE".equals(use)) {
+        hqlString.append("select distinct faa.clearedPaymentAccount");
+      } else {
+        hqlString.append("select distinct faa.inTransitPaymentAccountIN, faa.depositAccount");
+      }
+    } else {
+      if ("INT".equals(use)) {
+        hqlString.append("select distinct faa.fINOutIntransitAcct");
+      } else if ("WIT".equals(use)) {
+        hqlString.append("select distinct faa.withdrawalAccount");
+      } else if ("CLE".equals(use)) {
+        hqlString.append("select distinct faa.clearedPaymentAccountOUT");
+      } else {
+        hqlString.append("select distinct faa.inTransitPaymentAccountIN, faa.withdrawalAccount");
+      }
+    }
+    hqlString.append(" from FIN_Financial_Account_Acct as faa");
+    hqlString.append(" where faa.accountingSchema.id = :acctSchemaId");
+    if (financialAccountId != null && !"".equals(financialAccountId)) {
+      hqlString.append(" and faa.account.id = :financialAccountId");
+    }
+    final Session session = OBDal.getInstance().getSession();
+    final Query query = session.createQuery(hqlString.toString());
+    query.setParameter("acctSchemaId", acctSchemaId);
+    if (financialAccountId != null && !"".equals(financialAccountId)) {
+      query.setParameter("financialAccountId", financialAccountId);
+    }
+    for (Object resultObject : query.list()) {
+      if (resultObject.getClass().isArray()) {
+        final Object[] values = (Object[]) resultObject;
+        for (Object value : values) {
+          if (value instanceof AccountingCombination) {
+            result.add(((AccountingCombination) value).getAccount().getId());
+          }
+        }
+      } else {
+        if (resultObject instanceof AccountingCombination) {
+          result.add(((AccountingCombination) resultObject).getAccount().getId());
+        }
+      }
+    }
+    return result;
+  }
+
+  private String getUse(FIN_PaymentMethod paymentMethod, String financialAccountId,
+      boolean isReceipt, String table) {
+    String use = null;
+    OBCriteria<FinAccPaymentMethod> obc = OBDal.getInstance().createCriteria(
+        FinAccPaymentMethod.class);
+    obc.add(Restrictions.eq(FinAccPaymentMethod.PROPERTY_PAYMENTMETHOD, paymentMethod));
+    obc.add(Restrictions.eq(FinAccPaymentMethod.PROPERTY_ACCOUNT,
+        OBDal.getInstance().get(FIN_FinancialAccount.class, financialAccountId)));
+    obc.setMaxResults(1);
+    FinAccPaymentMethod pm = (FinAccPaymentMethod) obc.uniqueResult();
+    if (isReceipt) {
+      if ("PAY".equals(table)) {
+        use = pm.getUponReceiptUse();
+      } else if ("TRX".equals(table)) {
+        use = pm.getUponDepositUse();
+      } else if ("REC".equals(table)) {
+        use = pm.getINUponClearingUse();
+      }
+    } else {
+      if ("PAY".equals(table)) {
+        use = pm.getUponPaymentUse();
+      } else if ("TRX".equals(table)) {
+        use = pm.getUponWithdrawalUse();
+      } else if ("REC".equals(table)) {
+        use = pm.getOUTUponClearingUse();
+      }
+    }
+    return use;
+  }
+}
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_Utility.java	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/FIN_Utility.java	Fri Jun 13 09:13:47 2014 +0200
@@ -1360,12 +1360,12 @@
       creditUsed = creditUsed.subtract(amountWithSign);
       bPartner.setCreditUsed(creditUsed);
       OBDal.getInstance().save(bPartner);
-      FIN_AddPayment.updatePaymentScheduleAmounts(psd.getInvoicePaymentSchedule(), psd.getAmount(),
-          psd.getWriteoffAmount());
+      FIN_AddPayment.updatePaymentScheduleAmounts(psd.getPaymentDetails(),
+          psd.getInvoicePaymentSchedule(), psd.getAmount(), psd.getWriteoffAmount());
     }
     if (psd.getOrderPaymentSchedule() != null) {
-      FIN_AddPayment.updatePaymentScheduleAmounts(psd.getOrderPaymentSchedule(), psd.getAmount(),
-          psd.getWriteoffAmount());
+      FIN_AddPayment.updatePaymentScheduleAmounts(psd.getPaymentDetails(),
+          psd.getOrderPaymentSchedule(), psd.getAmount(), psd.getWriteoffAmount());
     }
     if (psd.getPaymentDetails().isPrepayment() && psd.getOrderPaymentSchedule() == null
         && psd.getInvoicePaymentSchedule() == null) {
@@ -1425,7 +1425,7 @@
         .getBusinessPartner();
     if (paymentScheduleDetail.getInvoicePaymentSchedule() != null) {
 
-      FIN_AddPayment.updatePaymentScheduleAmounts(
+      FIN_AddPayment.updatePaymentScheduleAmounts(paymentScheduleDetail.getPaymentDetails(),
           paymentScheduleDetail.getInvoicePaymentSchedule(), psdAmount.negate(),
           psdWriteoffAmount.negate());
       // BP SO_CreditUsed
@@ -1439,8 +1439,9 @@
 
     }
     if (paymentScheduleDetail.getOrderPaymentSchedule() != null) {
-      FIN_AddPayment.updatePaymentScheduleAmounts(paymentScheduleDetail.getOrderPaymentSchedule(),
-          psdAmount.negate(), psdWriteoffAmount.negate());
+      FIN_AddPayment.updatePaymentScheduleAmounts(paymentScheduleDetail.getPaymentDetails(),
+          paymentScheduleDetail.getOrderPaymentSchedule(), psdAmount.negate(),
+          psdWriteoffAmount.negate());
     }
     // when generating credit for a BP SO_CreditUsed is also updated
     if (paymentScheduleDetail.getInvoicePaymentSchedule() == null
--- a/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-utilities.js	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-utilities.js	Fri Jun 13 09:13:47 2014 +0200
@@ -46,7 +46,7 @@
 OB.APRM.validateMPPUserWarnedSign = false;
 
 OB.APRM.validateModifyPaymentPlanAmounts = function (item, validator, value, record) {
-  var indRow, allRows = item.grid.data,
+  var indRow, allRows = item.grid.data.allRows,
       row, allGreen = true,
       totalExpected = new BigDecimal("0"),
       totalReceived = new BigDecimal("0"),
@@ -114,7 +114,7 @@
     return false;
   }
 
-  var i, row, allRows = item.grid.data,
+  var i, row, allRows = item.grid.data.allRows,
       outstanding = new BigDecimal(String(record.outstanding)),
       paidamount = new BigDecimal(String(record.payment));
 
@@ -152,10 +152,10 @@
 };
 
 OB.APRM.addNew = function (grid) {
-  var selectedRecord = grid.view.parentWindow.views[0].getParentRecord();
-  var returnObject = isc.addProperties({}, grid.data[0]);
-  var indRow, allRows = grid.data,
-      row, totalOutstanding = new BigDecimal("0");
+  var selectedRecord = grid.view.parentWindow.views[0].getParentRecord(),
+      allRows = grid.data.allRows || grid.data.localData;
+  var returnObject = isc.addProperties({}, allRows[0]);
+  var indRow, row, totalOutstanding = new BigDecimal("0");
   for (indRow = 0; indRow < allRows.length; indRow++) {
     row = allRows[indRow];
     totalOutstanding = totalOutstanding.add(new BigDecimal(String(row.outstanding)));
--- a/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE.xml	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE.xml	Fri Jun 13 09:13:47 2014 +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.23010]]></VERSION>
+<!--C70732EA90A14EC0916078B85CC33D2D-->  <VERSION><![CDATA[1.1.23473]]></VERSION>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <DESCRIPTION><![CDATA[JBoss Weld]]></DESCRIPTION>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <HELP><![CDATA[Provides the JBoss Weld framework: Java Contexts and Dependency Injection for the Java EE platform (CDI). For more information see http://seamframework.org/Weld]]></HELP>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <URL><![CDATA[http://forge.openbravo.com/projects/weld]]></URL>
--- a/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Jun 13 09:13:47 2014 +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.23010]]></STARTVERSION>
+<!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <STARTVERSION><![CDATA[3.0.23473]]></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/modifiedTables/AD_FIELD.xml	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/src-db/database/model/modifiedTables/AD_FIELD.xml	Fri Jun 13 09:13:47 2014 +0200
@@ -21,6 +21,10 @@
         <default/>
         <onCreateDefault/>
       </column>
+      <column name="EM_OBUIAPP_DEFAULT_EXPRESSION" primaryKey="false" required="false" type="NVARCHAR" size="2000" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
       <check name="EM_OBUIAPP_AD_FIELD_SUMMARY"><![CDATA[EM_OBUIAPP_SHOWSUMMARY IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/modules/org.openbravo.client.application/src-db/database/model/tables/OBUIAPP_PARAMETER.xml	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/src-db/database/model/tables/OBUIAPP_PARAMETER.xml	Fri Jun 13 09:13:47 2014 +0200
@@ -101,7 +101,7 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <column name="STARTINNEWLINE" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false">
+      <column name="STARTINNEWLINE" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
         <default><![CDATA[N]]></default>
         <onCreateDefault><![CDATA['N']]></onCreateDefault>
       </column>
@@ -121,6 +121,22 @@
         <default/>
         <onCreateDefault/>
       </column>
+      <column name="NUMCOLUMN" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="ONCHANGEFUNCTION" primaryKey="false" required="false" type="NVARCHAR" size="255" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="DISPLAYEDROWS" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false">
+        <default/>
+        <onCreateDefault><![CDATA['5']]></onCreateDefault>
+      </column>
+      <column name="DISPLAYTITLE" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
+        <default><![CDATA[Y]]></default>
+        <onCreateDefault><![CDATA['N']]></onCreateDefault>
+      </column>
       <foreign-key foreignTable="AD_VAL_RULE" name="OBUIAPP_PARAM_AD_VALRULE">
         <reference local="AD_VAL_RULE_ID" foreign="AD_VAL_RULE_ID"/>
       </foreign-key>
@@ -151,11 +167,13 @@
       <index name="OBUIAPP_PARAMETER_PROCESS" unique="false">
         <index-column name="OBUIAPP_PROCESS_ID"/>
       </index>
+      <check name="OBUIAPP_PARAM_SHOWTITLE_CHK"><![CDATA[DISPLAYTITLE IN ('Y', 'N')]]></check>
       <check name="OBUIAPP_PARAMETER_CENTR_CHK"><![CDATA[ISCENTRALLYMAINTAINED IN ('Y', 'N')]]></check>
       <check name="OBUIAPP_PARAMETER_EVFIXVAL_CHK"><![CDATA[EVALUATEFIXEDVALUE IN ('Y', 'N')]]></check>
       <check name="OBUIAPP_PARAMETER_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
       <check name="OBUIAPP_PARAMETER_ISFIXED_CHK"><![CDATA[ISFIXED IN ('Y', 'N')]]></check>
       <check name="OBUIAPP_PARAMETER_MANDAT_CHK"><![CDATA[ISMANDATORY IN ('Y', 'N')]]></check>
       <check name="OBUIAPP_PARAMETER_NEWLINE_CHK"><![CDATA[STARTINNEWLINE IN ('Y', 'N')]]></check>
+      <check name="OBUIAPP_PARAMETER_NUMCOL_CHK"><![CDATA[(NUMCOLUMN >= 1) AND (NUMCOLUMN <= 4)]]></check>
     </table>
   </database>
--- a/modules/org.openbravo.client.application/src-db/database/model/tables/OBUIAPP_PROCESS.xml	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/src-db/database/model/tables/OBUIAPP_PROCESS.xml	Fri Jun 13 09:13:47 2014 +0200
@@ -77,6 +77,18 @@
         <default><![CDATA[N]]></default>
         <onCreateDefault><![CDATA['N']]></onCreateDefault>
       </column>
+      <column name="CLIENTSIDEVALIDATION" primaryKey="false" required="false" type="VARCHAR" size="200" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="ISGRIDLEGACY" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
+        <default><![CDATA[N]]></default>
+        <onCreateDefault><![CDATA['Y']]></onCreateDefault>
+      </column>
+      <column name="ON_LOAD_FUNCTION" primaryKey="false" required="false" type="VARCHAR" size="200" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
       <foreign-key foreignTable="AD_CLIENT" name="OBUIAPP_PROC_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
@@ -86,6 +98,7 @@
       <foreign-key foreignTable="AD_ORG" name="OBUIAPP_PROC_AD_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
+      <check name="OBUIAPP_PROC_GRIDLEGACY_CHK"><![CDATA[ISGRIDLEGACY IN ('Y', 'N')]]></check>
       <check name="OBUIAPP_PROC_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
       <check name="OBUIAPP_PROC_ISBACKGROUND_CHK"><![CDATA[ISBACKGROUND IN ('Y', 'N')]]></check>
       <check name="OBUIAPP_PROC_MULTI_CHK"><![CDATA[ISMULTIRECORD IN ('Y', 'N')]]></check>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_COLUMN.xml	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_COLUMN.xml	Fri Jun 13 09:13:47 2014 +0200
@@ -36,6 +36,42 @@
 <!--0060401C958644D4AA38E9226FBEE232-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--0060401C958644D4AA38E9226FBEE232--></AD_COLUMN>
 
+<!--018328092C15478F8E3F523E43172748--><AD_COLUMN>
+<!--018328092C15478F8E3F523E43172748-->  <AD_COLUMN_ID><![CDATA[018328092C15478F8E3F523E43172748]]></AD_COLUMN_ID>
+<!--018328092C15478F8E3F523E43172748-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--018328092C15478F8E3F523E43172748-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--018328092C15478F8E3F523E43172748-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--018328092C15478F8E3F523E43172748-->  <NAME><![CDATA[displayedRows]]></NAME>
+<!--018328092C15478F8E3F523E43172748-->  <DESCRIPTION><![CDATA[The height of the grid will be adjusted to display the number of rows specified in this field.]]></DESCRIPTION>
+<!--018328092C15478F8E3F523E43172748-->  <HELP><![CDATA[The height of the grid will be adjusted to display the number of rows specified in this field.]]></HELP>
+<!--018328092C15478F8E3F523E43172748-->  <COLUMNNAME><![CDATA[displayedRows]]></COLUMNNAME>
+<!--018328092C15478F8E3F523E43172748-->  <AD_TABLE_ID><![CDATA[30123B1001FC4E82BB4CB9725E069B48]]></AD_TABLE_ID>
+<!--018328092C15478F8E3F523E43172748-->  <AD_REFERENCE_ID><![CDATA[11]]></AD_REFERENCE_ID>
+<!--018328092C15478F8E3F523E43172748-->  <FIELDLENGTH><![CDATA[12]]></FIELDLENGTH>
+<!--018328092C15478F8E3F523E43172748-->  <DEFAULTVALUE><![CDATA[5]]></DEFAULTVALUE>
+<!--018328092C15478F8E3F523E43172748-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--018328092C15478F8E3F523E43172748-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--018328092C15478F8E3F523E43172748-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--018328092C15478F8E3F523E43172748-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--018328092C15478F8E3F523E43172748-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--018328092C15478F8E3F523E43172748-->  <SEQNO><![CDATA[340]]></SEQNO>
+<!--018328092C15478F8E3F523E43172748-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--018328092C15478F8E3F523E43172748-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--018328092C15478F8E3F523E43172748-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--018328092C15478F8E3F523E43172748-->  <AD_ELEMENT_ID><![CDATA[3FEB862D8D6C4BACA9B58BBC51A61B27]]></AD_ELEMENT_ID>
+<!--018328092C15478F8E3F523E43172748-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--018328092C15478F8E3F523E43172748-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--018328092C15478F8E3F523E43172748-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--018328092C15478F8E3F523E43172748-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--018328092C15478F8E3F523E43172748-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--018328092C15478F8E3F523E43172748-->  <POSITION><![CDATA[34]]></POSITION>
+<!--018328092C15478F8E3F523E43172748-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--018328092C15478F8E3F523E43172748-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--018328092C15478F8E3F523E43172748-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--018328092C15478F8E3F523E43172748-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--018328092C15478F8E3F523E43172748-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--018328092C15478F8E3F523E43172748--></AD_COLUMN>
+
 <!--01893C70B2F4473CA19E67B452FEBC0A--><AD_COLUMN>
 <!--01893C70B2F4473CA19E67B452FEBC0A-->  <AD_COLUMN_ID><![CDATA[01893C70B2F4473CA19E67B452FEBC0A]]></AD_COLUMN_ID>
 <!--01893C70B2F4473CA19E67B452FEBC0A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -1778,7 +1814,7 @@
 <!--37DCA71E621340B8A6FDE1264630AC48-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--37DCA71E621340B8A6FDE1264630AC48-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--37DCA71E621340B8A6FDE1264630AC48-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
-<!--37DCA71E621340B8A6FDE1264630AC48-->  <POSITION><![CDATA[47]]></POSITION>
+<!--37DCA71E621340B8A6FDE1264630AC48-->  <POSITION><![CDATA[52]]></POSITION>
 <!--37DCA71E621340B8A6FDE1264630AC48-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--37DCA71E621340B8A6FDE1264630AC48-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
 <!--37DCA71E621340B8A6FDE1264630AC48-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
@@ -1857,6 +1893,53 @@
 <!--3B7AC0128B194A0DBB028BDA2C51DCB8-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--3B7AC0128B194A0DBB028BDA2C51DCB8--></AD_COLUMN>
 
+<!--3E8FC3621ACE40258A020FE6B0E7A9E0--><AD_COLUMN>
+<!--3E8FC3621ACE40258A020FE6B0E7A9E0-->  <AD_COLUMN_ID><![CDATA[3E8FC3621ACE40258A020FE6B0E7A9E0]]></AD_COLUMN_ID>
+<!--3E8FC3621ACE40258A020FE6B0E7A9E0-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--3E8FC3621ACE40258A020FE6B0E7A9E0-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--3E8FC3621ACE40258A020FE6B0E7A9E0-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--3E8FC3621ACE40258A020FE6B0E7A9E0-->  <NAME><![CDATA[Isgridlegacy]]></NAME>
+<!--3E8FC3621ACE40258A020FE6B0E7A9E0-->  <DESCRIPTION><![CDATA[This flags is used to specify if this process should be compatible with the legacy parameter windows.]]></DESCRIPTION>
+<!--3E8FC3621ACE40258A020FE6B0E7A9E0-->  <HELP><![CDATA[This flags is used to specify if this process should be compatible with the legacy parameter windows.
+
+The legacy parameter windows could only contain one grid, so the _selection and _allRows properties of the grid were directly accesible in the handler from the params object. I.e:
+
+JSONArray gridRows = jsonparams.getJSONArray(ApplicationConstants.ALL_ROWS_PARAM);
+
+New process definitions should access these value like this:
+JSONObject myGridItem = jsonparams.getJSONObject("myGridItemName");
+JSONArray myGridSelectedRows = myGridItem.getJSONArray("_selection");
+
+The 'Compatibility with Legacy Grids' flag should only be checked if its handler retrieves the grid values in the old way.
+]]></HELP>
+<!--3E8FC3621ACE40258A020FE6B0E7A9E0-->  <COLUMNNAME><![CDATA[Isgridlegacy]]></COLUMNNAME>
+<!--3E8FC3621ACE40258A020FE6B0E7A9E0-->  <AD_TABLE_ID><![CDATA[FF80818132D7FB620132D8129D1A0028]]></AD_TABLE_ID>
+<!--3E8FC3621ACE40258A020FE6B0E7A9E0-->  <AD_REFERENCE_ID><![CDATA[20]]></AD_REFERENCE_ID>
+<!--3E8FC3621ACE40258A020FE6B0E7A9E0-->  <FIELDLENGTH><![CDATA[1]]></FIELDLENGTH>
+<!--3E8FC3621ACE40258A020FE6B0E7A9E0-->  <DEFAULTVALUE><![CDATA[N]]></DEFAULTVALUE>
+<!--3E8FC3621ACE40258A020FE6B0E7A9E0-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--3E8FC3621ACE40258A020FE6B0E7A9E0-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--3E8FC3621ACE40258A020FE6B0E7A9E0-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--3E8FC3621ACE40258A020FE6B0E7A9E0-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--3E8FC3621ACE40258A020FE6B0E7A9E0-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--3E8FC3621ACE40258A020FE6B0E7A9E0-->  <SEQNO><![CDATA[210]]></SEQNO>
+<!--3E8FC3621ACE40258A020FE6B0E7A9E0-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--3E8FC3621ACE40258A020FE6B0E7A9E0-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--3E8FC3621ACE40258A020FE6B0E7A9E0-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--3E8FC3621ACE40258A020FE6B0E7A9E0-->  <AD_ELEMENT_ID><![CDATA[1DD68F7AE78B4F0EB010F507D4B7A0D4]]></AD_ELEMENT_ID>
+<!--3E8FC3621ACE40258A020FE6B0E7A9E0-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--3E8FC3621ACE40258A020FE6B0E7A9E0-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--3E8FC3621ACE40258A020FE6B0E7A9E0-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--3E8FC3621ACE40258A020FE6B0E7A9E0-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--3E8FC3621ACE40258A020FE6B0E7A9E0-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--3E8FC3621ACE40258A020FE6B0E7A9E0-->  <POSITION><![CDATA[21]]></POSITION>
+<!--3E8FC3621ACE40258A020FE6B0E7A9E0-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--3E8FC3621ACE40258A020FE6B0E7A9E0-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--3E8FC3621ACE40258A020FE6B0E7A9E0-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--3E8FC3621ACE40258A020FE6B0E7A9E0-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--3E8FC3621ACE40258A020FE6B0E7A9E0-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--3E8FC3621ACE40258A020FE6B0E7A9E0--></AD_COLUMN>
+
 <!--3EEA3A982E014C39BBDD15B9C915BB3C--><AD_COLUMN>
 <!--3EEA3A982E014C39BBDD15B9C915BB3C-->  <AD_COLUMN_ID><![CDATA[3EEA3A982E014C39BBDD15B9C915BB3C]]></AD_COLUMN_ID>
 <!--3EEA3A982E014C39BBDD15B9C915BB3C-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -1963,6 +2046,78 @@
 <!--40BF5714171243E0BF9928C4D08E1B17-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--40BF5714171243E0BF9928C4D08E1B17--></AD_COLUMN>
 
+<!--416B600071A3481FAFF4B9CE6EB2B991--><AD_COLUMN>
+<!--416B600071A3481FAFF4B9CE6EB2B991-->  <AD_COLUMN_ID><![CDATA[416B600071A3481FAFF4B9CE6EB2B991]]></AD_COLUMN_ID>
+<!--416B600071A3481FAFF4B9CE6EB2B991-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--416B600071A3481FAFF4B9CE6EB2B991-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--416B600071A3481FAFF4B9CE6EB2B991-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--416B600071A3481FAFF4B9CE6EB2B991-->  <NAME><![CDATA[NumColumn]]></NAME>
+<!--416B600071A3481FAFF4B9CE6EB2B991-->  <DESCRIPTION><![CDATA[Column number in which the current field is set (allowed values ​​between 1 and 4)]]></DESCRIPTION>
+<!--416B600071A3481FAFF4B9CE6EB2B991-->  <HELP><![CDATA[Column number in which the current field is set (allowed values ​​between 1 and 4)
+]]></HELP>
+<!--416B600071A3481FAFF4B9CE6EB2B991-->  <COLUMNNAME><![CDATA[NumColumn]]></COLUMNNAME>
+<!--416B600071A3481FAFF4B9CE6EB2B991-->  <AD_TABLE_ID><![CDATA[30123B1001FC4E82BB4CB9725E069B48]]></AD_TABLE_ID>
+<!--416B600071A3481FAFF4B9CE6EB2B991-->  <AD_REFERENCE_ID><![CDATA[11]]></AD_REFERENCE_ID>
+<!--416B600071A3481FAFF4B9CE6EB2B991-->  <FIELDLENGTH><![CDATA[12]]></FIELDLENGTH>
+<!--416B600071A3481FAFF4B9CE6EB2B991-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--416B600071A3481FAFF4B9CE6EB2B991-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--416B600071A3481FAFF4B9CE6EB2B991-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--416B600071A3481FAFF4B9CE6EB2B991-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--416B600071A3481FAFF4B9CE6EB2B991-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--416B600071A3481FAFF4B9CE6EB2B991-->  <SEQNO><![CDATA[320]]></SEQNO>
+<!--416B600071A3481FAFF4B9CE6EB2B991-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--416B600071A3481FAFF4B9CE6EB2B991-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--416B600071A3481FAFF4B9CE6EB2B991-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--416B600071A3481FAFF4B9CE6EB2B991-->  <AD_ELEMENT_ID><![CDATA[4BB73BF22E424254BE5C01005C5C3744]]></AD_ELEMENT_ID>
+<!--416B600071A3481FAFF4B9CE6EB2B991-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--416B600071A3481FAFF4B9CE6EB2B991-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--416B600071A3481FAFF4B9CE6EB2B991-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--416B600071A3481FAFF4B9CE6EB2B991-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--416B600071A3481FAFF4B9CE6EB2B991-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--416B600071A3481FAFF4B9CE6EB2B991-->  <POSITION><![CDATA[31]]></POSITION>
+<!--416B600071A3481FAFF4B9CE6EB2B991-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--416B600071A3481FAFF4B9CE6EB2B991-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--416B600071A3481FAFF4B9CE6EB2B991-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--416B600071A3481FAFF4B9CE6EB2B991-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--416B600071A3481FAFF4B9CE6EB2B991-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--416B600071A3481FAFF4B9CE6EB2B991--></AD_COLUMN>
+
+<!--4737ABA46AA14ACAB3BF0D8DB72F3EFE--><AD_COLUMN>
+<!--4737ABA46AA14ACAB3BF0D8DB72F3EFE-->  <AD_COLUMN_ID><![CDATA[4737ABA46AA14ACAB3BF0D8DB72F3EFE]]></AD_COLUMN_ID>
+<!--4737ABA46AA14ACAB3BF0D8DB72F3EFE-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--4737ABA46AA14ACAB3BF0D8DB72F3EFE-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--4737ABA46AA14ACAB3BF0D8DB72F3EFE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--4737ABA46AA14ACAB3BF0D8DB72F3EFE-->  <NAME><![CDATA[displayTitle]]></NAME>
+<!--4737ABA46AA14ACAB3BF0D8DB72F3EFE-->  <DESCRIPTION><![CDATA[This field allows to specify whether the title of a grid form item should be displayed]]></DESCRIPTION>
+<!--4737ABA46AA14ACAB3BF0D8DB72F3EFE-->  <HELP><![CDATA[This field allows to specify whether the title of a grid form item should be displayed]]></HELP>
+<!--4737ABA46AA14ACAB3BF0D8DB72F3EFE-->  <COLUMNNAME><![CDATA[displayTitle]]></COLUMNNAME>
+<!--4737ABA46AA14ACAB3BF0D8DB72F3EFE-->  <AD_TABLE_ID><![CDATA[30123B1001FC4E82BB4CB9725E069B48]]></AD_TABLE_ID>
+<!--4737ABA46AA14ACAB3BF0D8DB72F3EFE-->  <AD_REFERENCE_ID><![CDATA[20]]></AD_REFERENCE_ID>
+<!--4737ABA46AA14ACAB3BF0D8DB72F3EFE-->  <FIELDLENGTH><![CDATA[1]]></FIELDLENGTH>
+<!--4737ABA46AA14ACAB3BF0D8DB72F3EFE-->  <DEFAULTVALUE><![CDATA[Y]]></DEFAULTVALUE>
+<!--4737ABA46AA14ACAB3BF0D8DB72F3EFE-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--4737ABA46AA14ACAB3BF0D8DB72F3EFE-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--4737ABA46AA14ACAB3BF0D8DB72F3EFE-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--4737ABA46AA14ACAB3BF0D8DB72F3EFE-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--4737ABA46AA14ACAB3BF0D8DB72F3EFE-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--4737ABA46AA14ACAB3BF0D8DB72F3EFE-->  <SEQNO><![CDATA[350]]></SEQNO>
+<!--4737ABA46AA14ACAB3BF0D8DB72F3EFE-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--4737ABA46AA14ACAB3BF0D8DB72F3EFE-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--4737ABA46AA14ACAB3BF0D8DB72F3EFE-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--4737ABA46AA14ACAB3BF0D8DB72F3EFE-->  <AD_ELEMENT_ID><![CDATA[DC806316C0494E3CBE88A1F4216DB641]]></AD_ELEMENT_ID>
+<!--4737ABA46AA14ACAB3BF0D8DB72F3EFE-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--4737ABA46AA14ACAB3BF0D8DB72F3EFE-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--4737ABA46AA14ACAB3BF0D8DB72F3EFE-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--4737ABA46AA14ACAB3BF0D8DB72F3EFE-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--4737ABA46AA14ACAB3BF0D8DB72F3EFE-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--4737ABA46AA14ACAB3BF0D8DB72F3EFE-->  <POSITION><![CDATA[35]]></POSITION>
+<!--4737ABA46AA14ACAB3BF0D8DB72F3EFE-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--4737ABA46AA14ACAB3BF0D8DB72F3EFE-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--4737ABA46AA14ACAB3BF0D8DB72F3EFE-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--4737ABA46AA14ACAB3BF0D8DB72F3EFE-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--4737ABA46AA14ACAB3BF0D8DB72F3EFE-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--4737ABA46AA14ACAB3BF0D8DB72F3EFE--></AD_COLUMN>
+
 <!--48FAAFCA11A143169FD7517D67531DD1--><AD_COLUMN>
 <!--48FAAFCA11A143169FD7517D67531DD1-->  <AD_COLUMN_ID><![CDATA[48FAAFCA11A143169FD7517D67531DD1]]></AD_COLUMN_ID>
 <!--48FAAFCA11A143169FD7517D67531DD1-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -2459,7 +2614,7 @@
 <!--59D7AB430670477ABA73B3DF07C8CA7D-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--59D7AB430670477ABA73B3DF07C8CA7D-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--59D7AB430670477ABA73B3DF07C8CA7D-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
-<!--59D7AB430670477ABA73B3DF07C8CA7D-->  <POSITION><![CDATA[49]]></POSITION>
+<!--59D7AB430670477ABA73B3DF07C8CA7D-->  <POSITION><![CDATA[54]]></POSITION>
 <!--59D7AB430670477ABA73B3DF07C8CA7D-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--59D7AB430670477ABA73B3DF07C8CA7D-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
 <!--59D7AB430670477ABA73B3DF07C8CA7D-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
@@ -3203,7 +3358,7 @@
 <!--718F42F7BD4E4F56908615C8301C8810-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--718F42F7BD4E4F56908615C8301C8810-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--718F42F7BD4E4F56908615C8301C8810-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
-<!--718F42F7BD4E4F56908615C8301C8810-->  <POSITION><![CDATA[48]]></POSITION>
+<!--718F42F7BD4E4F56908615C8301C8810-->  <POSITION><![CDATA[53]]></POSITION>
 <!--718F42F7BD4E4F56908615C8301C8810-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--718F42F7BD4E4F56908615C8301C8810-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
 <!--718F42F7BD4E4F56908615C8301C8810-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
@@ -6090,7 +6245,7 @@
 <!--961FB60572894A78810B8845F499D387-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--961FB60572894A78810B8845F499D387-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--961FB60572894A78810B8845F499D387-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
-<!--961FB60572894A78810B8845F499D387-->  <POSITION><![CDATA[46]]></POSITION>
+<!--961FB60572894A78810B8845F499D387-->  <POSITION><![CDATA[51]]></POSITION>
 <!--961FB60572894A78810B8845F499D387-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--961FB60572894A78810B8845F499D387-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
 <!--961FB60572894A78810B8845F499D387-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
@@ -6330,7 +6485,7 @@
 <!--A35E96B6DAC1441D89A64BFF46E4E35F-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--A35E96B6DAC1441D89A64BFF46E4E35F-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--A35E96B6DAC1441D89A64BFF46E4E35F-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
-<!--A35E96B6DAC1441D89A64BFF46E4E35F-->  <POSITION><![CDATA[29]]></POSITION>
+<!--A35E96B6DAC1441D89A64BFF46E4E35F-->  <POSITION><![CDATA[28]]></POSITION>
 <!--A35E96B6DAC1441D89A64BFF46E4E35F-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--A35E96B6DAC1441D89A64BFF46E4E35F-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
 <!--A35E96B6DAC1441D89A64BFF46E4E35F-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
@@ -6696,6 +6851,51 @@
 <!--AEC972311ED847B1A5F790323A96E53A-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--AEC972311ED847B1A5F790323A96E53A--></AD_COLUMN>
 
+<!--AF57BA1162E94EA49127C3B88B543601--><AD_COLUMN>
+<!--AF57BA1162E94EA49127C3B88B543601-->  <AD_COLUMN_ID><![CDATA[AF57BA1162E94EA49127C3B88B543601]]></AD_COLUMN_ID>
+<!--AF57BA1162E94EA49127C3B88B543601-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--AF57BA1162E94EA49127C3B88B543601-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--AF57BA1162E94EA49127C3B88B543601-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--AF57BA1162E94EA49127C3B88B543601-->  <NAME><![CDATA[EM_Obuiapp_Default_Expression]]></NAME>
+<!--AF57BA1162E94EA49127C3B88B543601-->  <DESCRIPTION><![CDATA[Defines a expression used to filter the property]]></DESCRIPTION>
+<!--AF57BA1162E94EA49127C3B88B543601-->  <HELP><![CDATA[Defines a JavaScript expression that will be evaluated in the server side and used as default value for the property. You can use any type of variable but it must match the property type, examples:
+
+true - the property associated is a  boolean
+"Hello" - the property associated is a string
+5.3 - the property associated is a number
+
+You can also access the Openbravo API through the OB object and do some more complex expressions, e.g.
+
+OB.getSession().getAttribute("SESSIONVAR");
+
+This will retrieve the session variable SESSIONVAR and use it as default value for the filter of this field.]]></HELP>
+<!--AF57BA1162E94EA49127C3B88B543601-->  <COLUMNNAME><![CDATA[EM_Obuiapp_Default_Expression]]></COLUMNNAME>
+<!--AF57BA1162E94EA49127C3B88B543601-->  <AD_TABLE_ID><![CDATA[107]]></AD_TABLE_ID>
+<!--AF57BA1162E94EA49127C3B88B543601-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--AF57BA1162E94EA49127C3B88B543601-->  <FIELDLENGTH><![CDATA[2000]]></FIELDLENGTH>
+<!--AF57BA1162E94EA49127C3B88B543601-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--AF57BA1162E94EA49127C3B88B543601-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--AF57BA1162E94EA49127C3B88B543601-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--AF57BA1162E94EA49127C3B88B543601-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--AF57BA1162E94EA49127C3B88B543601-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--AF57BA1162E94EA49127C3B88B543601-->  <SEQNO><![CDATA[161]]></SEQNO>
+<!--AF57BA1162E94EA49127C3B88B543601-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--AF57BA1162E94EA49127C3B88B543601-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--AF57BA1162E94EA49127C3B88B543601-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--AF57BA1162E94EA49127C3B88B543601-->  <AD_ELEMENT_ID><![CDATA[FAF5CE55DE8E4B26A9DC0610CFB30AC3]]></AD_ELEMENT_ID>
+<!--AF57BA1162E94EA49127C3B88B543601-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--AF57BA1162E94EA49127C3B88B543601-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--AF57BA1162E94EA49127C3B88B543601-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--AF57BA1162E94EA49127C3B88B543601-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--AF57BA1162E94EA49127C3B88B543601-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--AF57BA1162E94EA49127C3B88B543601-->  <POSITION><![CDATA[43]]></POSITION>
+<!--AF57BA1162E94EA49127C3B88B543601-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--AF57BA1162E94EA49127C3B88B543601-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--AF57BA1162E94EA49127C3B88B543601-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--AF57BA1162E94EA49127C3B88B543601-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--AF57BA1162E94EA49127C3B88B543601-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--AF57BA1162E94EA49127C3B88B543601--></AD_COLUMN>
+
 <!--B2DDC4BECBF24431AB1940C2A38F9C54--><AD_COLUMN>
 <!--B2DDC4BECBF24431AB1940C2A38F9C54-->  <AD_COLUMN_ID><![CDATA[B2DDC4BECBF24431AB1940C2A38F9C54]]></AD_COLUMN_ID>
 <!--B2DDC4BECBF24431AB1940C2A38F9C54-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -7044,7 +7244,7 @@
 <!--BD4A8B0F15B542EE939DAC95BF18EAE2-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--BD4A8B0F15B542EE939DAC95BF18EAE2-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--BD4A8B0F15B542EE939DAC95BF18EAE2-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
-<!--BD4A8B0F15B542EE939DAC95BF18EAE2-->  <POSITION><![CDATA[30]]></POSITION>
+<!--BD4A8B0F15B542EE939DAC95BF18EAE2-->  <POSITION><![CDATA[29]]></POSITION>
 <!--BD4A8B0F15B542EE939DAC95BF18EAE2-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--BD4A8B0F15B542EE939DAC95BF18EAE2-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
 <!--BD4A8B0F15B542EE939DAC95BF18EAE2-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
@@ -7478,7 +7678,7 @@
 <!--D3F8F1142D914AD0ACAD03B45BEB3E9F-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--D3F8F1142D914AD0ACAD03B45BEB3E9F-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--D3F8F1142D914AD0ACAD03B45BEB3E9F-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
-<!--D3F8F1142D914AD0ACAD03B45BEB3E9F-->  <POSITION><![CDATA[45]]></POSITION>
+<!--D3F8F1142D914AD0ACAD03B45BEB3E9F-->  <POSITION><![CDATA[50]]></POSITION>
 <!--D3F8F1142D914AD0ACAD03B45BEB3E9F-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--D3F8F1142D914AD0ACAD03B45BEB3E9F-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
 <!--D3F8F1142D914AD0ACAD03B45BEB3E9F-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
@@ -7521,6 +7721,41 @@
 <!--D5128BD152A44494A9F60DBF4E33B67F-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--D5128BD152A44494A9F60DBF4E33B67F--></AD_COLUMN>
 
+<!--D52ED01D76CF458FB2D71398D326CF14--><AD_COLUMN>
+<!--D52ED01D76CF458FB2D71398D326CF14-->  <AD_COLUMN_ID><![CDATA[D52ED01D76CF458FB2D71398D326CF14]]></AD_COLUMN_ID>
+<!--D52ED01D76CF458FB2D71398D326CF14-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--D52ED01D76CF458FB2D71398D326CF14-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--D52ED01D76CF458FB2D71398D326CF14-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--D52ED01D76CF458FB2D71398D326CF14-->  <NAME><![CDATA[ON_Load_Function]]></NAME>
+<!--D52ED01D76CF458FB2D71398D326CF14-->  <DESCRIPTION><![CDATA[In this field a javascript function can be defined. This function will be executed when the parameter window is loaded, just after the default values are set.]]></DESCRIPTION>
+<!--D52ED01D76CF458FB2D71398D326CF14-->  <HELP><![CDATA[In this field a javascript function can be defined. This function will be executed when the parameter window is loaded, just after the default values are set.]]></HELP>
+<!--D52ED01D76CF458FB2D71398D326CF14-->  <COLUMNNAME><![CDATA[ON_Load_Function]]></COLUMNNAME>
+<!--D52ED01D76CF458FB2D71398D326CF14-->  <AD_TABLE_ID><![CDATA[FF80818132D7FB620132D8129D1A0028]]></AD_TABLE_ID>
+<!--D52ED01D76CF458FB2D71398D326CF14-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--D52ED01D76CF458FB2D71398D326CF14-->  <FIELDLENGTH><![CDATA[200]]></FIELDLENGTH>
+<!--D52ED01D76CF458FB2D71398D326CF14-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--D52ED01D76CF458FB2D71398D326CF14-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--D52ED01D76CF458FB2D71398D326CF14-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--D52ED01D76CF458FB2D71398D326CF14-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--D52ED01D76CF458FB2D71398D326CF14-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--D52ED01D76CF458FB2D71398D326CF14-->  <SEQNO><![CDATA[220]]></SEQNO>
+<!--D52ED01D76CF458FB2D71398D326CF14-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--D52ED01D76CF458FB2D71398D326CF14-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--D52ED01D76CF458FB2D71398D326CF14-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--D52ED01D76CF458FB2D71398D326CF14-->  <AD_ELEMENT_ID><![CDATA[C8856296F35940AF8E7808DF56118451]]></AD_ELEMENT_ID>
+<!--D52ED01D76CF458FB2D71398D326CF14-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--D52ED01D76CF458FB2D71398D326CF14-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--D52ED01D76CF458FB2D71398D326CF14-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--D52ED01D76CF458FB2D71398D326CF14-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--D52ED01D76CF458FB2D71398D326CF14-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--D52ED01D76CF458FB2D71398D326CF14-->  <POSITION><![CDATA[22]]></POSITION>
+<!--D52ED01D76CF458FB2D71398D326CF14-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--D52ED01D76CF458FB2D71398D326CF14-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--D52ED01D76CF458FB2D71398D326CF14-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--D52ED01D76CF458FB2D71398D326CF14-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--D52ED01D76CF458FB2D71398D326CF14-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--D52ED01D76CF458FB2D71398D326CF14--></AD_COLUMN>
+
 <!--D5ADE9C71E914B68A176C32825772F27--><AD_COLUMN>
 <!--D5ADE9C71E914B68A176C32825772F27-->  <AD_COLUMN_ID><![CDATA[D5ADE9C71E914B68A176C32825772F27]]></AD_COLUMN_ID>
 <!--D5ADE9C71E914B68A176C32825772F27-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -7701,6 +7936,40 @@
 <!--DD06D800EF5742B9B3692A0EEB24A653-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--DD06D800EF5742B9B3692A0EEB24A653--></AD_COLUMN>
 
+<!--DE06CD53DAAF4B9CBE82B9605BEA4ED2--><AD_COLUMN>
+<!--DE06CD53DAAF4B9CBE82B9605BEA4ED2-->  <AD_COLUMN_ID><![CDATA[DE06CD53DAAF4B9CBE82B9605BEA4ED2]]></AD_COLUMN_ID>
+<!--DE06CD53DAAF4B9CBE82B9605BEA4ED2-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--DE06CD53DAAF4B9CBE82B9605BEA4ED2-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--DE06CD53DAAF4B9CBE82B9605BEA4ED2-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--DE06CD53DAAF4B9CBE82B9605BEA4ED2-->  <NAME><![CDATA[On Change Function]]></NAME>
+<!--DE06CD53DAAF4B9CBE82B9605BEA4ED2-->  <HELP><![CDATA[This function needs to be the global id of a javascript function which is called on the client whenever the value of the field changes.]]></HELP>
+<!--DE06CD53DAAF4B9CBE82B9605BEA4ED2-->  <COLUMNNAME><![CDATA[Onchangefunction]]></COLUMNNAME>
+<!--DE06CD53DAAF4B9CBE82B9605BEA4ED2-->  <AD_TABLE_ID><![CDATA[30123B1001FC4E82BB4CB9725E069B48]]></AD_TABLE_ID>
+<!--DE06CD53DAAF4B9CBE82B9605BEA4ED2-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--DE06CD53DAAF4B9CBE82B9605BEA4ED2-->  <FIELDLENGTH><![CDATA[255]]></FIELDLENGTH>
+<!--DE06CD53DAAF4B9CBE82B9605BEA4ED2-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--DE06CD53DAAF4B9CBE82B9605BEA4ED2-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--DE06CD53DAAF4B9CBE82B9605BEA4ED2-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--DE06CD53DAAF4B9CBE82B9605BEA4ED2-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--DE06CD53DAAF4B9CBE82B9605BEA4ED2-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--DE06CD53DAAF4B9CBE82B9605BEA4ED2-->  <SEQNO><![CDATA[330]]></SEQNO>
+<!--DE06CD53DAAF4B9CBE82B9605BEA4ED2-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--DE06CD53DAAF4B9CBE82B9605BEA4ED2-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--DE06CD53DAAF4B9CBE82B9605BEA4ED2-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--DE06CD53DAAF4B9CBE82B9605BEA4ED2-->  <AD_ELEMENT_ID><![CDATA[66E1860A46E045D4BD7F018323FA10D4]]></AD_ELEMENT_ID>
+<!--DE06CD53DAAF4B9CBE82B9605BEA4ED2-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--DE06CD53DAAF4B9CBE82B9605BEA4ED2-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--DE06CD53DAAF4B9CBE82B9605BEA4ED2-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--DE06CD53DAAF4B9CBE82B9605BEA4ED2-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--DE06CD53DAAF4B9CBE82B9605BEA4ED2-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--DE06CD53DAAF4B9CBE82B9605BEA4ED2-->  <POSITION><![CDATA[32]]></POSITION>
+<!--DE06CD53DAAF4B9CBE82B9605BEA4ED2-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--DE06CD53DAAF4B9CBE82B9605BEA4ED2-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--DE06CD53DAAF4B9CBE82B9605BEA4ED2-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--DE06CD53DAAF4B9CBE82B9605BEA4ED2-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--DE06CD53DAAF4B9CBE82B9605BEA4ED2-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--DE06CD53DAAF4B9CBE82B9605BEA4ED2--></AD_COLUMN>
+
 <!--DF72F3EFC6074F2E9A7CCD70D60CE7AA--><AD_COLUMN>
 <!--DF72F3EFC6074F2E9A7CCD70D60CE7AA-->  <AD_COLUMN_ID><![CDATA[DF72F3EFC6074F2E9A7CCD70D60CE7AA]]></AD_COLUMN_ID>
 <!--DF72F3EFC6074F2E9A7CCD70D60CE7AA-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -7764,7 +8033,7 @@
 <!--E112C5B101B6435EB88E9B3914A1CBCC-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--E112C5B101B6435EB88E9B3914A1CBCC-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--E112C5B101B6435EB88E9B3914A1CBCC-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
-<!--E112C5B101B6435EB88E9B3914A1CBCC-->  <POSITION><![CDATA[31]]></POSITION>
+<!--E112C5B101B6435EB88E9B3914A1CBCC-->  <POSITION><![CDATA[30]]></POSITION>
 <!--E112C5B101B6435EB88E9B3914A1CBCC-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--E112C5B101B6435EB88E9B3914A1CBCC-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
 <!--E112C5B101B6435EB88E9B3914A1CBCC-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
@@ -7876,7 +8145,7 @@
 <!--E4F41D289C6A42A5BAF8BD766A15645F-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--E4F41D289C6A42A5BAF8BD766A15645F-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--E4F41D289C6A42A5BAF8BD766A15645F-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
-<!--E4F41D289C6A42A5BAF8BD766A15645F-->  <POSITION><![CDATA[44]]></POSITION>
+<!--E4F41D289C6A42A5BAF8BD766A15645F-->  <POSITION><![CDATA[49]]></POSITION>
 <!--E4F41D289C6A42A5BAF8BD766A15645F-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--E4F41D289C6A42A5BAF8BD766A15645F-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
 <!--E4F41D289C6A42A5BAF8BD766A15645F-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
@@ -8533,6 +8802,44 @@
 <!--FB975B710F5544CC8BC99F981F63C1CD-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--FB975B710F5544CC8BC99F981F63C1CD--></AD_COLUMN>
 
+<!--FBE51D267FA543F88F2A301528587343--><AD_COLUMN>
+<!--FBE51D267FA543F88F2A301528587343-->  <AD_COLUMN_ID><![CDATA[FBE51D267FA543F88F2A301528587343]]></AD_COLUMN_ID>
+<!--FBE51D267FA543F88F2A301528587343-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FBE51D267FA543F88F2A301528587343-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FBE51D267FA543F88F2A301528587343-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FBE51D267FA543F88F2A301528587343-->  <NAME><![CDATA[ClientSideValidation]]></NAME>
+<!--FBE51D267FA543F88F2A301528587343-->  <DESCRIPTION><![CDATA[JavaScript function to be executed before invoking the backend Handler.]]></DESCRIPTION>
+<!--FBE51D267FA543F88F2A301528587343-->  <HELP><![CDATA[JavaScript function to be executed before invoking the backend Handler.
+This function (manually coded), can:
+ - Perform validations on the parameters, being possible to prevent execution in case these validations are not satisfied.
+ - Request for additional info to complete the parameter values.]]></HELP>
+<!--FBE51D267FA543F88F2A301528587343-->  <COLUMNNAME><![CDATA[Clientsidevalidation]]></COLUMNNAME>
+<!--FBE51D267FA543F88F2A301528587343-->  <AD_TABLE_ID><![CDATA[FF80818132D7FB620132D8129D1A0028]]></AD_TABLE_ID>
+<!--FBE51D267FA543F88F2A301528587343-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--FBE51D267FA543F88F2A301528587343-->  <FIELDLENGTH><![CDATA[200]]></FIELDLENGTH>
+<!--FBE51D267FA543F88F2A301528587343-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--FBE51D267FA543F88F2A301528587343-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--FBE51D267FA543F88F2A301528587343-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--FBE51D267FA543F88F2A301528587343-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--FBE51D267FA543F88F2A301528587343-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--FBE51D267FA543F88F2A301528587343-->  <SEQNO><![CDATA[200]]></SEQNO>
+<!--FBE51D267FA543F88F2A301528587343-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--FBE51D267FA543F88F2A301528587343-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--FBE51D267FA543F88F2A301528587343-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--FBE51D267FA543F88F2A301528587343-->  <AD_ELEMENT_ID><![CDATA[E726F553F3C04DE791C8E9C1752227F9]]></AD_ELEMENT_ID>
+<!--FBE51D267FA543F88F2A301528587343-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--FBE51D267FA543F88F2A301528587343-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--FBE51D267FA543F88F2A301528587343-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--FBE51D267FA543F88F2A301528587343-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--FBE51D267FA543F88F2A301528587343-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--FBE51D267FA543F88F2A301528587343-->  <POSITION><![CDATA[20]]></POSITION>
+<!--FBE51D267FA543F88F2A301528587343-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--FBE51D267FA543F88F2A301528587343-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--FBE51D267FA543F88F2A301528587343-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--FBE51D267FA543F88F2A301528587343-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--FBE51D267FA543F88F2A301528587343-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--FBE51D267FA543F88F2A301528587343--></AD_COLUMN>
+
 <!--FC60C911562841BEADBC6715FA919941--><AD_COLUMN>
 <!--FC60C911562841BEADBC6715FA919941-->  <AD_COLUMN_ID><![CDATA[FC60C911562841BEADBC6715FA919941]]></AD_COLUMN_ID>
 <!--FC60C911562841BEADBC6715FA919941-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_ELEMENT.xml	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_ELEMENT.xml	Fri Jun 13 09:13:47 2014 +0200
@@ -56,6 +56,31 @@
 <!--18EA6EC150C545AE8C5E0A3BD4BD4871-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--18EA6EC150C545AE8C5E0A3BD4BD4871--></AD_ELEMENT>
 
+<!--1DD68F7AE78B4F0EB010F507D4B7A0D4--><AD_ELEMENT>
+<!--1DD68F7AE78B4F0EB010F507D4B7A0D4-->  <AD_ELEMENT_ID><![CDATA[1DD68F7AE78B4F0EB010F507D4B7A0D4]]></AD_ELEMENT_ID>
+<!--1DD68F7AE78B4F0EB010F507D4B7A0D4-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--1DD68F7AE78B4F0EB010F507D4B7A0D4-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--1DD68F7AE78B4F0EB010F507D4B7A0D4-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--1DD68F7AE78B4F0EB010F507D4B7A0D4-->  <COLUMNNAME><![CDATA[Isgridlegacy]]></COLUMNNAME>
+<!--1DD68F7AE78B4F0EB010F507D4B7A0D4-->  <NAME><![CDATA[Compatibility with Legacy Grids]]></NAME>
+<!--1DD68F7AE78B4F0EB010F507D4B7A0D4-->  <PRINTNAME><![CDATA[Compatibility with Legacy Grids]]></PRINTNAME>
+<!--1DD68F7AE78B4F0EB010F507D4B7A0D4-->  <DESCRIPTION><![CDATA[This flags is used to specify if this process should be compatible with the legacy parameter windows.]]></DESCRIPTION>
+<!--1DD68F7AE78B4F0EB010F507D4B7A0D4-->  <HELP><![CDATA[This flags is used to specify if this process should be compatible with the legacy parameter windows.
+
+The legacy parameter windows could only contain one grid, so the _selection and _allRows properties of the grid were directly accesible in the handler from the params object. I.e:
+
+JSONArray gridRows = jsonparams.getJSONArray(ApplicationConstants.ALL_ROWS_PARAM);
+
+New process definitions should access these value like this:
+JSONObject myGridItem = jsonparams.getJSONObject("myGridItemName");
+JSONArray myGridSelectedRows = myGridItem.getJSONArray("_selection");
+
+The 'Compatibility with Legacy Grids' flag should only be checked if its handler retrieves the grid values in the old way.
+]]></HELP>
+<!--1DD68F7AE78B4F0EB010F507D4B7A0D4-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--1DD68F7AE78B4F0EB010F507D4B7A0D4-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--1DD68F7AE78B4F0EB010F507D4B7A0D4--></AD_ELEMENT>
+
 <!--31DCDECE67A34C418930D50405D8057D--><AD_ELEMENT>
 <!--31DCDECE67A34C418930D50405D8057D-->  <AD_ELEMENT_ID><![CDATA[31DCDECE67A34C418930D50405D8057D]]></AD_ELEMENT_ID>
 <!--31DCDECE67A34C418930D50405D8057D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -94,6 +119,20 @@
 <!--3F9E2C7B705C46ACADEDA8CF477FC9C5-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--3F9E2C7B705C46ACADEDA8CF477FC9C5--></AD_ELEMENT>
 
+<!--3FEB862D8D6C4BACA9B58BBC51A61B27--><AD_ELEMENT>
+<!--3FEB862D8D6C4BACA9B58BBC51A61B27-->  <AD_ELEMENT_ID><![CDATA[3FEB862D8D6C4BACA9B58BBC51A61B27]]></AD_ELEMENT_ID>
+<!--3FEB862D8D6C4BACA9B58BBC51A61B27-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--3FEB862D8D6C4BACA9B58BBC51A61B27-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--3FEB862D8D6C4BACA9B58BBC51A61B27-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--3FEB862D8D6C4BACA9B58BBC51A61B27-->  <COLUMNNAME><![CDATA[displayedRows]]></COLUMNNAME>
+<!--3FEB862D8D6C4BACA9B58BBC51A61B27-->  <NAME><![CDATA[Number of Displayed Rows]]></NAME>
+<!--3FEB862D8D6C4BACA9B58BBC51A61B27-->  <PRINTNAME><![CDATA[Number of Displayed Rows]]></PRINTNAME>
+<!--3FEB862D8D6C4BACA9B58BBC51A61B27-->  <DESCRIPTION><![CDATA[The height of the grid will be adjusted to display the number of rows specified in this field.]]></DESCRIPTION>
+<!--3FEB862D8D6C4BACA9B58BBC51A61B27-->  <HELP><![CDATA[The height of the grid will be adjusted to display the number of rows specified in this field.]]></HELP>
+<!--3FEB862D8D6C4BACA9B58BBC51A61B27-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--3FEB862D8D6C4BACA9B58BBC51A61B27-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--3FEB862D8D6C4BACA9B58BBC51A61B27--></AD_ELEMENT>
+
 <!--41A5FEDD70F140BF8438B8C8FA03B876--><AD_ELEMENT>
 <!--41A5FEDD70F140BF8438B8C8FA03B876-->  <AD_ELEMENT_ID><![CDATA[41A5FEDD70F140BF8438B8C8FA03B876]]></AD_ELEMENT_ID>
 <!--41A5FEDD70F140BF8438B8C8FA03B876-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -150,6 +189,21 @@
 <!--4B3999F4700C4C93ABEA49C89A8E484E-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--4B3999F4700C4C93ABEA49C89A8E484E--></AD_ELEMENT>
 
+<!--4BB73BF22E424254BE5C01005C5C3744--><AD_ELEMENT>
+<!--4BB73BF22E424254BE5C01005C5C3744-->  <AD_ELEMENT_ID><![CDATA[4BB73BF22E424254BE5C01005C5C3744]]></AD_ELEMENT_ID>
+<!--4BB73BF22E424254BE5C01005C5C3744-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--4BB73BF22E424254BE5C01005C5C3744-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--4BB73BF22E424254BE5C01005C5C3744-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--4BB73BF22E424254BE5C01005C5C3744-->  <COLUMNNAME><![CDATA[Numcolumn]]></COLUMNNAME>
+<!--4BB73BF22E424254BE5C01005C5C3744-->  <NAME><![CDATA[Column Number]]></NAME>
+<!--4BB73BF22E424254BE5C01005C5C3744-->  <PRINTNAME><![CDATA[Column Number]]></PRINTNAME>
+<!--4BB73BF22E424254BE5C01005C5C3744-->  <DESCRIPTION><![CDATA[Column number in which the current field is set (allowed values ​​between 1 and 4)]]></DESCRIPTION>
+<!--4BB73BF22E424254BE5C01005C5C3744-->  <HELP><![CDATA[Column number in which the current field is set (allowed values ​​between 1 and 4)
+]]></HELP>
+<!--4BB73BF22E424254BE5C01005C5C3744-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--4BB73BF22E424254BE5C01005C5C3744-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--4BB73BF22E424254BE5C01005C5C3744--></AD_ELEMENT>
+
 <!--4F42DE67C7DE44F6AD3C24E7C3B13844--><AD_ELEMENT>
 <!--4F42DE67C7DE44F6AD3C24E7C3B13844-->  <AD_ELEMENT_ID><![CDATA[4F42DE67C7DE44F6AD3C24E7C3B13844]]></AD_ELEMENT_ID>
 <!--4F42DE67C7DE44F6AD3C24E7C3B13844-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -543,6 +597,20 @@
 <!--C3D88F4BB67346D49C0E28A676D916AC-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--C3D88F4BB67346D49C0E28A676D916AC--></AD_ELEMENT>
 
+<!--C8856296F35940AF8E7808DF56118451--><AD_ELEMENT>
+<!--C8856296F35940AF8E7808DF56118451-->  <AD_ELEMENT_ID><![CDATA[C8856296F35940AF8E7808DF56118451]]></AD_ELEMENT_ID>
+<!--C8856296F35940AF8E7808DF56118451-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--C8856296F35940AF8E7808DF56118451-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--C8856296F35940AF8E7808DF56118451-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--C8856296F35940AF8E7808DF56118451-->  <COLUMNNAME><![CDATA[ON_Load_Function]]></COLUMNNAME>
+<!--C8856296F35940AF8E7808DF56118451-->  <NAME><![CDATA[On Load Function]]></NAME>
+<!--C8856296F35940AF8E7808DF56118451-->  <PRINTNAME><![CDATA[On Load Function]]></PRINTNAME>
+<!--C8856296F35940AF8E7808DF56118451-->  <DESCRIPTION><![CDATA[In this field a javascript function can be defined. This function will be executed when the parameter window is loaded, just after the default values are set.]]></DESCRIPTION>
+<!--C8856296F35940AF8E7808DF56118451-->  <HELP><![CDATA[In this field a javascript function can be defined. This function will be executed when the parameter window is loaded, just after the default values are set.]]></HELP>
+<!--C8856296F35940AF8E7808DF56118451-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--C8856296F35940AF8E7808DF56118451-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--C8856296F35940AF8E7808DF56118451--></AD_ELEMENT>
+
 <!--D407F5CD8D234F738D98EDB872F9377A--><AD_ELEMENT>
 <!--D407F5CD8D234F738D98EDB872F9377A-->  <AD_ELEMENT_ID><![CDATA[D407F5CD8D234F738D98EDB872F9377A]]></AD_ELEMENT_ID>
 <!--D407F5CD8D234F738D98EDB872F9377A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -570,6 +638,37 @@
 <!--DC4608C1BAE04F65B6BC38B79BF2CA4D-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--DC4608C1BAE04F65B6BC38B79BF2CA4D--></AD_ELEMENT>
 
+<!--DC806316C0494E3CBE88A1F4216DB641--><AD_ELEMENT>
+<!--DC806316C0494E3CBE88A1F4216DB641-->  <AD_ELEMENT_ID><![CDATA[DC806316C0494E3CBE88A1F4216DB641]]></AD_ELEMENT_ID>
+<!--DC806316C0494E3CBE88A1F4216DB641-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--DC806316C0494E3CBE88A1F4216DB641-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--DC806316C0494E3CBE88A1F4216DB641-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--DC806316C0494E3CBE88A1F4216DB641-->  <COLUMNNAME><![CDATA[displayTitle]]></COLUMNNAME>
+<!--DC806316C0494E3CBE88A1F4216DB641-->  <NAME><![CDATA[Show Title]]></NAME>
+<!--DC806316C0494E3CBE88A1F4216DB641-->  <PRINTNAME><![CDATA[Show Title]]></PRINTNAME>
+<!--DC806316C0494E3CBE88A1F4216DB641-->  <DESCRIPTION><![CDATA[This field allows to specify whether the title of a grid form item should be displayed]]></DESCRIPTION>
+<!--DC806316C0494E3CBE88A1F4216DB641-->  <HELP><![CDATA[This field allows to specify whether the title of a grid form item should be displayed]]></HELP>
+<!--DC806316C0494E3CBE88A1F4216DB641-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--DC806316C0494E3CBE88A1F4216DB641-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--DC806316C0494E3CBE88A1F4216DB641--></AD_ELEMENT>
+
+<!--E726F553F3C04DE791C8E9C1752227F9--><AD_ELEMENT>
+<!--E726F553F3C04DE791C8E9C1752227F9-->  <AD_ELEMENT_ID><![CDATA[E726F553F3C04DE791C8E9C1752227F9]]></AD_ELEMENT_ID>
+<!--E726F553F3C04DE791C8E9C1752227F9-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--E726F553F3C04DE791C8E9C1752227F9-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--E726F553F3C04DE791C8E9C1752227F9-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--E726F553F3C04DE791C8E9C1752227F9-->  <COLUMNNAME><![CDATA[Clientsidevalidation]]></COLUMNNAME>
+<!--E726F553F3C04DE791C8E9C1752227F9-->  <NAME><![CDATA[Client Side Validation]]></NAME>
+<!--E726F553F3C04DE791C8E9C1752227F9-->  <PRINTNAME><![CDATA[Client Side Validation]]></PRINTNAME>
+<!--E726F553F3C04DE791C8E9C1752227F9-->  <DESCRIPTION><![CDATA[JavaScript function to be executed before invoking the backend Handler.]]></DESCRIPTION>
+<!--E726F553F3C04DE791C8E9C1752227F9-->  <HELP><![CDATA[JavaScript function to be executed before invoking the backend Handler.
+This function (manually coded), can:
+ - Perform validations on the parameters, being possible to prevent execution in case these validations are not satisfied.
+ - Request for additional info to complete the parameter values.]]></HELP>
+<!--E726F553F3C04DE791C8E9C1752227F9-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--E726F553F3C04DE791C8E9C1752227F9-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--E726F553F3C04DE791C8E9C1752227F9--></AD_ELEMENT>
+
 <!--E94A0F7EABF6467D8853C51369B6D23A--><AD_ELEMENT>
 <!--E94A0F7EABF6467D8853C51369B6D23A-->  <AD_ELEMENT_ID><![CDATA[E94A0F7EABF6467D8853C51369B6D23A]]></AD_ELEMENT_ID>
 <!--E94A0F7EABF6467D8853C51369B6D23A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -636,6 +735,30 @@
 <!--F39469FBB4F041BFBC730BB9E0691F29-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--F39469FBB4F041BFBC730BB9E0691F29--></AD_ELEMENT>
 
+<!--FAF5CE55DE8E4B26A9DC0610CFB30AC3--><AD_ELEMENT>
+<!--FAF5CE55DE8E4B26A9DC0610CFB30AC3-->  <AD_ELEMENT_ID><![CDATA[FAF5CE55DE8E4B26A9DC0610CFB30AC3]]></AD_ELEMENT_ID>
+<!--FAF5CE55DE8E4B26A9DC0610CFB30AC3-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FAF5CE55DE8E4B26A9DC0610CFB30AC3-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FAF5CE55DE8E4B26A9DC0610CFB30AC3-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FAF5CE55DE8E4B26A9DC0610CFB30AC3-->  <COLUMNNAME><![CDATA[EM_Obuiapp_Default_Expression]]></COLUMNNAME>
+<!--FAF5CE55DE8E4B26A9DC0610CFB30AC3-->  <NAME><![CDATA[Default Expression]]></NAME>
+<!--FAF5CE55DE8E4B26A9DC0610CFB30AC3-->  <PRINTNAME><![CDATA[Default Expression]]></PRINTNAME>
+<!--FAF5CE55DE8E4B26A9DC0610CFB30AC3-->  <DESCRIPTION><![CDATA[Defines a expression used to filter the property]]></DESCRIPTION>
+<!--FAF5CE55DE8E4B26A9DC0610CFB30AC3-->  <HELP><![CDATA[Defines a JavaScript expression that will be evaluated in the server side and used as default value for the property. You can use any type of variable but it must match the property type, examples:
+
+true - the property associated is a  boolean
+"Hello" - the property associated is a string
+5.3 - the property associated is a number
+
+You can also access the Openbravo API through the OB object and do some more complex expressions, e.g.
+
+OB.getSession().getAttribute("SESSIONVAR");
+
+This will retrieve the session variable SESSIONVAR and use it as default value for the filter of this field.]]></HELP>
+<!--FAF5CE55DE8E4B26A9DC0610CFB30AC3-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--FAF5CE55DE8E4B26A9DC0610CFB30AC3-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--FAF5CE55DE8E4B26A9DC0610CFB30AC3--></AD_ELEMENT>
+
 <!--FC093F3F9DD64F81828FE06AB2CC4FEB--><AD_ELEMENT>
 <!--FC093F3F9DD64F81828FE06AB2CC4FEB-->  <AD_ELEMENT_ID><![CDATA[FC093F3F9DD64F81828FE06AB2CC4FEB]]></AD_ELEMENT_ID>
 <!--FC093F3F9DD64F81828FE06AB2CC4FEB-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_FIELD.xml	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_FIELD.xml	Fri Jun 13 09:13:47 2014 +0200
@@ -901,6 +901,35 @@
 <!--220497F9740C4949B9BB9DDFAFD8F2CD-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--220497F9740C4949B9BB9DDFAFD8F2CD--></AD_FIELD>
 
+<!--22EE69B13DC74251AE028E1DA5F829BB--><AD_FIELD>
+<!--22EE69B13DC74251AE028E1DA5F829BB-->  <AD_FIELD_ID><![CDATA[22EE69B13DC74251AE028E1DA5F829BB]]></AD_FIELD_ID>
+<!--22EE69B13DC74251AE028E1DA5F829BB-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--22EE69B13DC74251AE028E1DA5F829BB-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--22EE69B13DC74251AE028E1DA5F829BB-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--22EE69B13DC74251AE028E1DA5F829BB-->  <NAME><![CDATA[On Load Function]]></NAME>
+<!--22EE69B13DC74251AE028E1DA5F829BB-->  <DESCRIPTION><![CDATA[In this field a javascript function can be defined. This function will be executed when the parameter window is loaded, just after the default values are set.]]></DESCRIPTION>
+<!--22EE69B13DC74251AE028E1DA5F829BB-->  <HELP><![CDATA[In this field a javascript function can be defined. This function will be executed when the parameter window is loaded, just after the default values are set.]]></HELP>
+<!--22EE69B13DC74251AE028E1DA5F829BB-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--22EE69B13DC74251AE028E1DA5F829BB-->  <AD_TAB_ID><![CDATA[FF80818132D7FB620132D819C1720046]]></AD_TAB_ID>
+<!--22EE69B13DC74251AE028E1DA5F829BB-->  <AD_COLUMN_ID><![CDATA[D52ED01D76CF458FB2D71398D326CF14]]></AD_COLUMN_ID>
+<!--22EE69B13DC74251AE028E1DA5F829BB-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--22EE69B13DC74251AE028E1DA5F829BB-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--22EE69B13DC74251AE028E1DA5F829BB-->  <DISPLAYLOGIC><![CDATA[@Uipattern@='OBUIAPP_PickAndExecute']]></DISPLAYLOGIC>
+<!--22EE69B13DC74251AE028E1DA5F829BB-->  <DISPLAYLENGTH><![CDATA[200]]></DISPLAYLENGTH>
+<!--22EE69B13DC74251AE028E1DA5F829BB-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--22EE69B13DC74251AE028E1DA5F829BB-->  <SEQNO><![CDATA[130]]></SEQNO>
+<!--22EE69B13DC74251AE028E1DA5F829BB-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--22EE69B13DC74251AE028E1DA5F829BB-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--22EE69B13DC74251AE028E1DA5F829BB-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--22EE69B13DC74251AE028E1DA5F829BB-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--22EE69B13DC74251AE028E1DA5F829BB-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--22EE69B13DC74251AE028E1DA5F829BB-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--22EE69B13DC74251AE028E1DA5F829BB-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--22EE69B13DC74251AE028E1DA5F829BB-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--22EE69B13DC74251AE028E1DA5F829BB-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--22EE69B13DC74251AE028E1DA5F829BB-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--22EE69B13DC74251AE028E1DA5F829BB--></AD_FIELD>
+
 <!--2667CF4C44DB40DAAB0EB19C2B1A864C--><AD_FIELD>
 <!--2667CF4C44DB40DAAB0EB19C2B1A864C-->  <AD_FIELD_ID><![CDATA[2667CF4C44DB40DAAB0EB19C2B1A864C]]></AD_FIELD_ID>
 <!--2667CF4C44DB40DAAB0EB19C2B1A864C-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -1072,6 +1101,45 @@
 <!--2F84AAB44351416C8F48DC36CE6B9E58-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--2F84AAB44351416C8F48DC36CE6B9E58--></AD_FIELD>
 
+<!--2FF944B417B544C8A8F8757F1C9F3E35--><AD_FIELD>
+<!--2FF944B417B544C8A8F8757F1C9F3E35-->  <AD_FIELD_ID><![CDATA[2FF944B417B544C8A8F8757F1C9F3E35]]></AD_FIELD_ID>
+<!--2FF944B417B544C8A8F8757F1C9F3E35-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--2FF944B417B544C8A8F8757F1C9F3E35-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--2FF944B417B544C8A8F8757F1C9F3E35-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--2FF944B417B544C8A8F8757F1C9F3E35-->  <NAME><![CDATA[Default Expression]]></NAME>
+<!--2FF944B417B544C8A8F8757F1C9F3E35-->  <DESCRIPTION><![CDATA[Defines a expression used to filter the property]]></DESCRIPTION>
+<!--2FF944B417B544C8A8F8757F1C9F3E35-->  <HELP><![CDATA[Defines a JavaScript expression that will be evaluated in the server side and used as default value for the property. You can use any type of variable but it must match the property type, examples:
+
+true - the property associated is a  boolean
+"Hello" - the property associated is a string
+5.3 - the property associated is a number
+
+You can also access the Openbravo API through the OB object and do some more complex expressions, e.g.
+
+OB.getSession().getAttribute("SESSIONVAR");
+
+This will retrieve the session variable SESSIONVAR and use it as default value for the filter of this field.]]></HELP>
+<!--2FF944B417B544C8A8F8757F1C9F3E35-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--2FF944B417B544C8A8F8757F1C9F3E35-->  <AD_TAB_ID><![CDATA[107]]></AD_TAB_ID>
+<!--2FF944B417B544C8A8F8757F1C9F3E35-->  <AD_COLUMN_ID><![CDATA[AF57BA1162E94EA49127C3B88B543601]]></AD_COLUMN_ID>
+<!--2FF944B417B544C8A8F8757F1C9F3E35-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--2FF944B417B544C8A8F8757F1C9F3E35-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--2FF944B417B544C8A8F8757F1C9F3E35-->  <DISPLAYLOGIC><![CDATA[@WindowType@ = 'OBUIAPP_PickAndExecute']]></DISPLAYLOGIC>
+<!--2FF944B417B544C8A8F8757F1C9F3E35-->  <DISPLAYLENGTH><![CDATA[2000]]></DISPLAYLENGTH>
+<!--2FF944B417B544C8A8F8757F1C9F3E35-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--2FF944B417B544C8A8F8757F1C9F3E35-->  <SEQNO><![CDATA[280]]></SEQNO>
+<!--2FF944B417B544C8A8F8757F1C9F3E35-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--2FF944B417B544C8A8F8757F1C9F3E35-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--2FF944B417B544C8A8F8757F1C9F3E35-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--2FF944B417B544C8A8F8757F1C9F3E35-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--2FF944B417B544C8A8F8757F1C9F3E35-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--2FF944B417B544C8A8F8757F1C9F3E35-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--2FF944B417B544C8A8F8757F1C9F3E35-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--2FF944B417B544C8A8F8757F1C9F3E35-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--2FF944B417B544C8A8F8757F1C9F3E35-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--2FF944B417B544C8A8F8757F1C9F3E35-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--2FF944B417B544C8A8F8757F1C9F3E35--></AD_FIELD>
+
 <!--312B596239AF498EBAF36C1B9A54D2A8--><AD_FIELD>
 <!--312B596239AF498EBAF36C1B9A54D2A8-->  <AD_FIELD_ID><![CDATA[312B596239AF498EBAF36C1B9A54D2A8]]></AD_FIELD_ID>
 <!--312B596239AF498EBAF36C1B9A54D2A8-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -1923,6 +1991,36 @@
 <!--5D3C389803814348BD688DED4772571E-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--5D3C389803814348BD688DED4772571E--></AD_FIELD>
 
+<!--5EFE4AC6E5A343308FB084BCD6F019A3--><AD_FIELD>
+<!--5EFE4AC6E5A343308FB084BCD6F019A3-->  <AD_FIELD_ID><![CDATA[5EFE4AC6E5A343308FB084BCD6F019A3]]></AD_FIELD_ID>
+<!--5EFE4AC6E5A343308FB084BCD6F019A3-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--5EFE4AC6E5A343308FB084BCD6F019A3-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--5EFE4AC6E5A343308FB084BCD6F019A3-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--5EFE4AC6E5A343308FB084BCD6F019A3-->  <NAME><![CDATA[Column Number]]></NAME>
+<!--5EFE4AC6E5A343308FB084BCD6F019A3-->  <DESCRIPTION><![CDATA[Column number in which the current field is set (allowed values ​​between 1 and 4)]]></DESCRIPTION>
+<!--5EFE4AC6E5A343308FB084BCD6F019A3-->  <HELP><![CDATA[Column number in which the current field is set (allowed values ​​between 1 and 4)
+]]></HELP>
+<!--5EFE4AC6E5A343308FB084BCD6F019A3-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--5EFE4AC6E5A343308FB084BCD6F019A3-->  <AD_TAB_ID><![CDATA[FF80818132D8C36D0132D8C4936F0006]]></AD_TAB_ID>
+<!--5EFE4AC6E5A343308FB084BCD6F019A3-->  <AD_COLUMN_ID><![CDATA[416B600071A3481FAFF4B9CE6EB2B991]]></AD_COLUMN_ID>
+<!--5EFE4AC6E5A343308FB084BCD6F019A3-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--5EFE4AC6E5A343308FB084BCD6F019A3-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--5EFE4AC6E5A343308FB084BCD6F019A3-->  <DISPLAYLOGIC><![CDATA[@Startinnewline@='N']]></DISPLAYLOGIC>
+<!--5EFE4AC6E5A343308FB084BCD6F019A3-->  <DISPLAYLENGTH><![CDATA[12]]></DISPLAYLENGTH>
+<!--5EFE4AC6E5A343308FB084BCD6F019A3-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--5EFE4AC6E5A343308FB084BCD6F019A3-->  <SEQNO><![CDATA[165]]></SEQNO>
+<!--5EFE4AC6E5A343308FB084BCD6F019A3-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--5EFE4AC6E5A343308FB084BCD6F019A3-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--5EFE4AC6E5A343308FB084BCD6F019A3-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--5EFE4AC6E5A343308FB084BCD6F019A3-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--5EFE4AC6E5A343308FB084BCD6F019A3-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--5EFE4AC6E5A343308FB084BCD6F019A3-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--5EFE4AC6E5A343308FB084BCD6F019A3-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--5EFE4AC6E5A343308FB084BCD6F019A3-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--5EFE4AC6E5A343308FB084BCD6F019A3-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--5EFE4AC6E5A343308FB084BCD6F019A3-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--5EFE4AC6E5A343308FB084BCD6F019A3--></AD_FIELD>
+
 <!--611FA547A7F24D2EA63AFF6C87633287--><AD_FIELD>
 <!--611FA547A7F24D2EA63AFF6C87633287-->  <AD_FIELD_ID><![CDATA[611FA547A7F24D2EA63AFF6C87633287]]></AD_FIELD_ID>
 <!--611FA547A7F24D2EA63AFF6C87633287-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -2293,6 +2391,46 @@
 <!--76CAB6BE742942CD89029B72F155A6C6-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--76CAB6BE742942CD89029B72F155A6C6--></AD_FIELD>
 
+<!--784DC50B8A1845C6BFDED5F3A7DC0702--><AD_FIELD>
+<!--784DC50B8A1845C6BFDED5F3A7DC0702-->  <AD_FIELD_ID><![CDATA[784DC50B8A1845C6BFDED5F3A7DC0702]]></AD_FIELD_ID>
+<!--784DC50B8A1845C6BFDED5F3A7DC0702-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--784DC50B8A1845C6BFDED5F3A7DC0702-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--784DC50B8A1845C6BFDED5F3A7DC0702-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--784DC50B8A1845C6BFDED5F3A7DC0702-->  <NAME><![CDATA[Compatibility with Legacy Grids]]></NAME>
+<!--784DC50B8A1845C6BFDED5F3A7DC0702-->  <DESCRIPTION><![CDATA[This flags is used to specify if this process should be compatible with the legacy parameter windows.]]></DESCRIPTION>
+<!--784DC50B8A1845C6BFDED5F3A7DC0702-->  <HELP><![CDATA[This flags is used to specify if this process should be compatible with the legacy parameter windows.
+
+The legacy parameter windows could only contain one grid, so the _selection and _allRows properties of the grid were directly accesible in the handler from the params object. I.e:
+
+JSONArray gridRows = jsonparams.getJSONArray(ApplicationConstants.ALL_ROWS_PARAM);
+
+New process definitions should access these value like this:
+JSONObject myGridItem = jsonparams.getJSONObject("myGridItemName");
+JSONArray myGridSelectedRows = myGridItem.getJSONArray("_selection");
+
+The 'Compatibility with Legacy Grids' flag should only be checked if its handler retrieves the grid values in the old way.
+]]></HELP>
+<!--784DC50B8A1845C6BFDED5F3A7DC0702-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--784DC50B8A1845C6BFDED5F3A7DC0702-->  <AD_TAB_ID><![CDATA[FF80818132D7FB620132D819C1720046]]></AD_TAB_ID>
+<!--784DC50B8A1845C6BFDED5F3A7DC0702-->  <AD_COLUMN_ID><![CDATA[3E8FC3621ACE40258A020FE6B0E7A9E0]]></AD_COLUMN_ID>
+<!--784DC50B8A1845C6BFDED5F3A7DC0702-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--784DC50B8A1845C6BFDED5F3A7DC0702-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--784DC50B8A1845C6BFDED5F3A7DC0702-->  <DISPLAYLOGIC><![CDATA[@Uipattern@='OBUIAPP_PickAndExecute']]></DISPLAYLOGIC>
+<!--784DC50B8A1845C6BFDED5F3A7DC0702-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
+<!--784DC50B8A1845C6BFDED5F3A7DC0702-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--784DC50B8A1845C6BFDED5F3A7DC0702-->  <SEQNO><![CDATA[140]]></SEQNO>
+<!--784DC50B8A1845C6BFDED5F3A7DC0702-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--784DC50B8A1845C6BFDED5F3A7DC0702-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--784DC50B8A1845C6BFDED5F3A7DC0702-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--784DC50B8A1845C6BFDED5F3A7DC0702-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--784DC50B8A1845C6BFDED5F3A7DC0702-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--784DC50B8A1845C6BFDED5F3A7DC0702-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--784DC50B8A1845C6BFDED5F3A7DC0702-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--784DC50B8A1845C6BFDED5F3A7DC0702-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--784DC50B8A1845C6BFDED5F3A7DC0702-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--784DC50B8A1845C6BFDED5F3A7DC0702-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--784DC50B8A1845C6BFDED5F3A7DC0702--></AD_FIELD>
+
 <!--7895CDC316C84F95A564A5356E32878A--><AD_FIELD>
 <!--7895CDC316C84F95A564A5356E32878A-->  <AD_FIELD_ID><![CDATA[7895CDC316C84F95A564A5356E32878A]]></AD_FIELD_ID>
 <!--7895CDC316C84F95A564A5356E32878A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -2349,6 +2487,35 @@
 <!--799E6B0463014657B4CF8ABEE25C7ADC-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--799E6B0463014657B4CF8ABEE25C7ADC--></AD_FIELD>
 
+<!--79F3FF6D4FB845D9BAA38846716D2CE9--><AD_FIELD>
+<!--79F3FF6D4FB845D9BAA38846716D2CE9-->  <AD_FIELD_ID><![CDATA[79F3FF6D4FB845D9BAA38846716D2CE9]]></AD_FIELD_ID>
+<!--79F3FF6D4FB845D9BAA38846716D2CE9-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--79F3FF6D4FB845D9BAA38846716D2CE9-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--79F3FF6D4FB845D9BAA38846716D2CE9-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--79F3FF6D4FB845D9BAA38846716D2CE9-->  <NAME><![CDATA[Show Title]]></NAME>
+<!--79F3FF6D4FB845D9BAA38846716D2CE9-->  <DESCRIPTION><![CDATA[This field allows to specify whether the title of a grid form item should be displayed]]></DESCRIPTION>
+<!--79F3FF6D4FB845D9BAA38846716D2CE9-->  <HELP><![CDATA[This field allows to specify whether the title of a grid form item should be displayed]]></HELP>
+<!--79F3FF6D4FB845D9BAA38846716D2CE9-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--79F3FF6D4FB845D9BAA38846716D2CE9-->  <AD_TAB_ID><![CDATA[FF80818132D8C36D0132D8C4936F0006]]></AD_TAB_ID>
+<!--79F3FF6D4FB845D9BAA38846716D2CE9-->  <AD_COLUMN_ID><![CDATA[4737ABA46AA14ACAB3BF0D8DB72F3EFE]]></AD_COLUMN_ID>
+<!--79F3FF6D4FB845D9BAA38846716D2CE9-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--79F3FF6D4FB845D9BAA38846716D2CE9-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--79F3FF6D4FB845D9BAA38846716D2CE9-->  <DISPLAYLOGIC><![CDATA[@AD_REFERENCE_ID@='FF80818132D8F0F30132D9BC395D0038']]></DISPLAYLOGIC>
+<!--79F3FF6D4FB845D9BAA38846716D2CE9-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
+<!--79F3FF6D4FB845D9BAA38846716D2CE9-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--79F3FF6D4FB845D9BAA38846716D2CE9-->  <SEQNO><![CDATA[210]]></SEQNO>
+<!--79F3FF6D4FB845D9BAA38846716D2CE9-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--79F3FF6D4FB845D9BAA38846716D2CE9-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--79F3FF6D4FB845D9BAA38846716D2CE9-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--79F3FF6D4FB845D9BAA38846716D2CE9-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--79F3FF6D4FB845D9BAA38846716D2CE9-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--79F3FF6D4FB845D9BAA38846716D2CE9-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--79F3FF6D4FB845D9BAA38846716D2CE9-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--79F3FF6D4FB845D9BAA38846716D2CE9-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--79F3FF6D4FB845D9BAA38846716D2CE9-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--79F3FF6D4FB845D9BAA38846716D2CE9-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--79F3FF6D4FB845D9BAA38846716D2CE9--></AD_FIELD>
+
 <!--79F725EF00774420845FCAAEC4720CFC--><AD_FIELD>
 <!--79F725EF00774420845FCAAEC4720CFC-->  <AD_FIELD_ID><![CDATA[79F725EF00774420845FCAAEC4720CFC]]></AD_FIELD_ID>
 <!--79F725EF00774420845FCAAEC4720CFC-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -2408,6 +2575,33 @@
 <!--7A4EC561701D4749B0CBF843C686EE4E-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--7A4EC561701D4749B0CBF843C686EE4E--></AD_FIELD>
 
+<!--7AAA0FAB33C1401C9FEEE6CEE51A6150--><AD_FIELD>
+<!--7AAA0FAB33C1401C9FEEE6CEE51A6150-->  <AD_FIELD_ID><![CDATA[7AAA0FAB33C1401C9FEEE6CEE51A6150]]></AD_FIELD_ID>
+<!--7AAA0FAB33C1401C9FEEE6CEE51A6150-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--7AAA0FAB33C1401C9FEEE6CEE51A6150-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--7AAA0FAB33C1401C9FEEE6CEE51A6150-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--7AAA0FAB33C1401C9FEEE6CEE51A6150-->  <NAME><![CDATA[On Change Function]]></NAME>
+<!--7AAA0FAB33C1401C9FEEE6CEE51A6150-->  <HELP><![CDATA[This function needs to be the global id of a javascript function which is called on the client whenever the value of the field changes.]]></HELP>
+<!--7AAA0FAB33C1401C9FEEE6CEE51A6150-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--7AAA0FAB33C1401C9FEEE6CEE51A6150-->  <AD_TAB_ID><![CDATA[FF80818132D8C36D0132D8C4936F0006]]></AD_TAB_ID>
+<!--7AAA0FAB33C1401C9FEEE6CEE51A6150-->  <AD_COLUMN_ID><![CDATA[DE06CD53DAAF4B9CBE82B9605BEA4ED2]]></AD_COLUMN_ID>
+<!--7AAA0FAB33C1401C9FEEE6CEE51A6150-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--7AAA0FAB33C1401C9FEEE6CEE51A6150-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--7AAA0FAB33C1401C9FEEE6CEE51A6150-->  <DISPLAYLENGTH><![CDATA[255]]></DISPLAYLENGTH>
+<!--7AAA0FAB33C1401C9FEEE6CEE51A6150-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--7AAA0FAB33C1401C9FEEE6CEE51A6150-->  <SEQNO><![CDATA[230]]></SEQNO>
+<!--7AAA0FAB33C1401C9FEEE6CEE51A6150-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--7AAA0FAB33C1401C9FEEE6CEE51A6150-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--7AAA0FAB33C1401C9FEEE6CEE51A6150-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--7AAA0FAB33C1401C9FEEE6CEE51A6150-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--7AAA0FAB33C1401C9FEEE6CEE51A6150-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--7AAA0FAB33C1401C9FEEE6CEE51A6150-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--7AAA0FAB33C1401C9FEEE6CEE51A6150-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--7AAA0FAB33C1401C9FEEE6CEE51A6150-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--7AAA0FAB33C1401C9FEEE6CEE51A6150-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--7AAA0FAB33C1401C9FEEE6CEE51A6150-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--7AAA0FAB33C1401C9FEEE6CEE51A6150--></AD_FIELD>
+
 <!--7B75A0BCD43C4095932114A53A2CEF9F--><AD_FIELD>
 <!--7B75A0BCD43C4095932114A53A2CEF9F-->  <AD_FIELD_ID><![CDATA[7B75A0BCD43C4095932114A53A2CEF9F]]></AD_FIELD_ID>
 <!--7B75A0BCD43C4095932114A53A2CEF9F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -2677,7 +2871,7 @@
 <!--865E6707D439406D8F3C60819C372B9E-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--865E6707D439406D8F3C60819C372B9E-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
 <!--865E6707D439406D8F3C60819C372B9E-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--865E6707D439406D8F3C60819C372B9E-->  <SEQNO><![CDATA[210]]></SEQNO>
+<!--865E6707D439406D8F3C60819C372B9E-->  <SEQNO><![CDATA[240]]></SEQNO>
 <!--865E6707D439406D8F3C60819C372B9E-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--865E6707D439406D8F3C60819C372B9E-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--865E6707D439406D8F3C60819C372B9E-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -3198,6 +3392,35 @@
 <!--A18395235A384646AB5A9C7A1020DE20-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--A18395235A384646AB5A9C7A1020DE20--></AD_FIELD>
 
+<!--A2825CDBB547403C9272006563BEF109--><AD_FIELD>
+<!--A2825CDBB547403C9272006563BEF109-->  <AD_FIELD_ID><![CDATA[A2825CDBB547403C9272006563BEF109]]></AD_FIELD_ID>
+<!--A2825CDBB547403C9272006563BEF109-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--A2825CDBB547403C9272006563BEF109-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--A2825CDBB547403C9272006563BEF109-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--A2825CDBB547403C9272006563BEF109-->  <NAME><![CDATA[Number of Displayed Rows]]></NAME>
+<!--A2825CDBB547403C9272006563BEF109-->  <DESCRIPTION><![CDATA[The height of the grid will be adjusted to display the number of rows specified in this field.]]></DESCRIPTION>
+<!--A2825CDBB547403C9272006563BEF109-->  <HELP><![CDATA[The height of the grid will be adjusted to display the number of rows specified in this field.]]></HELP>
+<!--A2825CDBB547403C9272006563BEF109-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--A2825CDBB547403C9272006563BEF109-->  <AD_TAB_ID><![CDATA[FF80818132D8C36D0132D8C4936F0006]]></AD_TAB_ID>
+<!--A2825CDBB547403C9272006563BEF109-->  <AD_COLUMN_ID><![CDATA[018328092C15478F8E3F523E43172748]]></AD_COLUMN_ID>
+<!--A2825CDBB547403C9272006563BEF109-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--A2825CDBB547403C9272006563BEF109-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--A2825CDBB547403C9272006563BEF109-->  <DISPLAYLOGIC><![CDATA[@AD_REFERENCE_ID@='FF80818132D8F0F30132D9BC395D0038']]></DISPLAYLOGIC>
+<!--A2825CDBB547403C9272006563BEF109-->  <DISPLAYLENGTH><![CDATA[12]]></DISPLAYLENGTH>
+<!--A2825CDBB547403C9272006563BEF109-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--A2825CDBB547403C9272006563BEF109-->  <SEQNO><![CDATA[115]]></SEQNO>
+<!--A2825CDBB547403C9272006563BEF109-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--A2825CDBB547403C9272006563BEF109-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--A2825CDBB547403C9272006563BEF109-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--A2825CDBB547403C9272006563BEF109-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--A2825CDBB547403C9272006563BEF109-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--A2825CDBB547403C9272006563BEF109-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--A2825CDBB547403C9272006563BEF109-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--A2825CDBB547403C9272006563BEF109-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--A2825CDBB547403C9272006563BEF109-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--A2825CDBB547403C9272006563BEF109-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--A2825CDBB547403C9272006563BEF109--></AD_FIELD>
+
 <!--A5B64F83D49444078A23EC57093C4809--><AD_FIELD>
 <!--A5B64F83D49444078A23EC57093C4809-->  <AD_FIELD_ID><![CDATA[A5B64F83D49444078A23EC57093C4809]]></AD_FIELD_ID>
 <!--A5B64F83D49444078A23EC57093C4809-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -4635,6 +4858,38 @@
 <!--F9C02B45EC1544F0B4EA67504E5929C0-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--F9C02B45EC1544F0B4EA67504E5929C0--></AD_FIELD>
 
+<!--FA25A0E775044EE180C711CC19F8E225--><AD_FIELD>
+<!--FA25A0E775044EE180C711CC19F8E225-->  <AD_FIELD_ID><![CDATA[FA25A0E775044EE180C711CC19F8E225]]></AD_FIELD_ID>
+<!--FA25A0E775044EE180C711CC19F8E225-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FA25A0E775044EE180C711CC19F8E225-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FA25A0E775044EE180C711CC19F8E225-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FA25A0E775044EE180C711CC19F8E225-->  <NAME><![CDATA[Client Side Validation]]></NAME>
+<!--FA25A0E775044EE180C711CC19F8E225-->  <DESCRIPTION><![CDATA[JavaScript function to be executed before invoking the backend Handler.]]></DESCRIPTION>
+<!--FA25A0E775044EE180C711CC19F8E225-->  <HELP><![CDATA[JavaScript function to be executed before invoking the backend Handler.
+This function (manually coded), can:
+ - Perform validations on the parameters, being possible to prevent execution in case these validations are not satisfied.
+ - Request for additional info to complete the parameter values.]]></HELP>
+<!--FA25A0E775044EE180C711CC19F8E225-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--FA25A0E775044EE180C711CC19F8E225-->  <AD_TAB_ID><![CDATA[FF80818132D7FB620132D819C1720046]]></AD_TAB_ID>
+<!--FA25A0E775044EE180C711CC19F8E225-->  <AD_COLUMN_ID><![CDATA[FBE51D267FA543F88F2A301528587343]]></AD_COLUMN_ID>
+<!--FA25A0E775044EE180C711CC19F8E225-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--FA25A0E775044EE180C711CC19F8E225-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--FA25A0E775044EE180C711CC19F8E225-->  <DISPLAYLOGIC><![CDATA[@Uipattern@='OBUIAPP_PickAndExecute']]></DISPLAYLOGIC>
+<!--FA25A0E775044EE180C711CC19F8E225-->  <DISPLAYLENGTH><![CDATA[200]]></DISPLAYLENGTH>
+<!--FA25A0E775044EE180C711CC19F8E225-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--FA25A0E775044EE180C711CC19F8E225-->  <SEQNO><![CDATA[120]]></SEQNO>
+<!--FA25A0E775044EE180C711CC19F8E225-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--FA25A0E775044EE180C711CC19F8E225-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--FA25A0E775044EE180C711CC19F8E225-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--FA25A0E775044EE180C711CC19F8E225-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--FA25A0E775044EE180C711CC19F8E225-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--FA25A0E775044EE180C711CC19F8E225-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--FA25A0E775044EE180C711CC19F8E225-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--FA25A0E775044EE180C711CC19F8E225-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--FA25A0E775044EE180C711CC19F8E225-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--FA25A0E775044EE180C711CC19F8E225-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--FA25A0E775044EE180C711CC19F8E225--></AD_FIELD>
+
 <!--FBB6C7E587984DBC9AB858EC876EC1E5--><AD_FIELD>
 <!--FBB6C7E587984DBC9AB858EC876EC1E5-->  <AD_FIELD_ID><![CDATA[FBB6C7E587984DBC9AB858EC876EC1E5]]></AD_FIELD_ID>
 <!--FBB6C7E587984DBC9AB858EC876EC1E5-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MENU.xml	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MENU.xml	Fri Jun 13 09:13:47 2014 +0200
@@ -10,8 +10,8 @@
 <!--1005400002-->  <ISSUMMARY><![CDATA[N]]></ISSUMMARY>
 <!--1005400002-->  <ACTION><![CDATA[OBUIAPP_OpenView]]></ACTION>
 <!--1005400002-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--1005400002-->  <OPENLINKINBROWSER><![CDATA[N]]></OPENLINKINBROWSER>
 <!--1005400002-->  <EM_OBUIAPP_VIEW_IMPL_ID><![CDATA[FF808081329B023101329B0CE2080013]]></EM_OBUIAPP_VIEW_IMPL_ID>
-<!--1005400002-->  <OPENLINKINBROWSER><![CDATA[N]]></OPENLINKINBROWSER>
 <!--1005400002--></AD_MENU>
 
 <!--6FD97ECD72B4405FA1442FD8673AE571--><AD_MENU>
@@ -79,8 +79,8 @@
 <!--FF8080812EB90459012EBA72B4E7004D-->  <ISSUMMARY><![CDATA[N]]></ISSUMMARY>
 <!--FF8080812EB90459012EBA72B4E7004D-->  <ACTION><![CDATA[OBUIAPP_OpenView]]></ACTION>
 <!--FF8080812EB90459012EBA72B4E7004D-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--FF8080812EB90459012EBA72B4E7004D-->  <OPENLINKINBROWSER><![CDATA[N]]></OPENLINKINBROWSER>
 <!--FF8080812EB90459012EBA72B4E7004D-->  <EM_OBUIAPP_VIEW_IMPL_ID><![CDATA[FF8080812EB90459012EBA225DDB0029]]></EM_OBUIAPP_VIEW_IMPL_ID>
-<!--FF8080812EB90459012EBA72B4E7004D-->  <OPENLINKINBROWSER><![CDATA[N]]></OPENLINKINBROWSER>
 <!--FF8080812EB90459012EBA72B4E7004D--></AD_MENU>
 
 <!--FF8081813157AED2013157C149F40039--><AD_MENU>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MESSAGE.xml	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MESSAGE.xml	Fri Jun 13 09:13:47 2014 +0200
@@ -120,6 +120,18 @@
 <!--07272FCDEEA64054AF2F983D9814EE00-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
 <!--07272FCDEEA64054AF2F983D9814EE00--></AD_MESSAGE>
 
+<!--07AA67107E904AC9A1E80B407C9894BB--><AD_MESSAGE>
+<!--07AA67107E904AC9A1E80B407C9894BB-->  <AD_MESSAGE_ID><![CDATA[07AA67107E904AC9A1E80B407C9894BB]]></AD_MESSAGE_ID>
+<!--07AA67107E904AC9A1E80B407C9894BB-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--07AA67107E904AC9A1E80B407C9894BB-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--07AA67107E904AC9A1E80B407C9894BB-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--07AA67107E904AC9A1E80B407C9894BB-->  <VALUE><![CDATA[obuiapp_parameter_numcol_chk]]></VALUE>
+<!--07AA67107E904AC9A1E80B407C9894BB-->  <MSGTEXT><![CDATA[Only values between 1 and 4 may be entered into the field Column Number.]]></MSGTEXT>
+<!--07AA67107E904AC9A1E80B407C9894BB-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--07AA67107E904AC9A1E80B407C9894BB-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--07AA67107E904AC9A1E80B407C9894BB-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
+<!--07AA67107E904AC9A1E80B407C9894BB--></AD_MESSAGE>
+
 <!--090A37D22DDB1C89012DDB22CE910012--><AD_MESSAGE>
 <!--090A37D22DDB1C89012DDB22CE910012-->  <AD_MESSAGE_ID><![CDATA[090A37D22DDB1C89012DDB22CE910012]]></AD_MESSAGE_ID>
 <!--090A37D22DDB1C89012DDB22CE910012-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE.xml	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE.xml	Fri Jun 13 09:13:47 2014 +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.23010]]></VERSION>
+<!--9BA0836A3CD74EE4AB48753A47211BCC-->  <VERSION><![CDATA[2.1.23473]]></VERSION>
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <DESCRIPTION><![CDATA[Provides the main application components for the openbravo user interface]]></DESCRIPTION>
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <HELP><![CDATA[Provides the main application components for the openbravo user interface. The main layout incorporates a navigation bar and a main view area.]]></HELP>
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <URL><![CDATA[http://forge.openbravo.com/projects/clientapplication]]></URL>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Jun 13 09:13:47 2014 +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.23010]]></STARTVERSION>
+<!--15D7CE8D95D043189162DBABA54A1F61-->  <STARTVERSION><![CDATA[2.1.23473]]></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.23010]]></STARTVERSION>
+<!--60A170212F36499D83B8AD38D01F46B3-->  <STARTVERSION><![CDATA[2.1.23473]]></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.23010]]></STARTVERSION>
+<!--824D60CB352E4099B1D8C903CA139DAE-->  <STARTVERSION><![CDATA[3.0.23473]]></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.23010]]></STARTVERSION>
+<!--E8FD820AFE3D4FE08C02FC47769026AD-->  <STARTVERSION><![CDATA[8.1.23473]]></STARTVERSION>
 <!--E8FD820AFE3D4FE08C02FC47769026AD-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--E8FD820AFE3D4FE08C02FC47769026AD-->  <DEPENDANT_MODULE_NAME><![CDATA[Smartclient]]></DEPENDANT_MODULE_NAME>
 <!--E8FD820AFE3D4FE08C02FC47769026AD-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_TAB.xml	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_TAB.xml	Fri Jun 13 09:13:47 2014 +0200
@@ -24,6 +24,8 @@
 <!--13FE911F7F684A47801DF55525BAD4A1-->  <UIPATTERN><![CDATA[STD]]></UIPATTERN>
 <!--13FE911F7F684A47801DF55525BAD4A1-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--13FE911F7F684A47801DF55525BAD4A1-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--13FE911F7F684A47801DF55525BAD4A1-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--13FE911F7F684A47801DF55525BAD4A1-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--13FE911F7F684A47801DF55525BAD4A1-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--13FE911F7F684A47801DF55525BAD4A1-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--13FE911F7F684A47801DF55525BAD4A1-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -52,6 +54,8 @@
 <!--25EB9212730C4E88B95C75BFCD6F5EBF-->  <UIPATTERN><![CDATA[STD]]></UIPATTERN>
 <!--25EB9212730C4E88B95C75BFCD6F5EBF-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--25EB9212730C4E88B95C75BFCD6F5EBF-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--25EB9212730C4E88B95C75BFCD6F5EBF-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--25EB9212730C4E88B95C75BFCD6F5EBF-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--25EB9212730C4E88B95C75BFCD6F5EBF-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--25EB9212730C4E88B95C75BFCD6F5EBF-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--25EB9212730C4E88B95C75BFCD6F5EBF-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -81,6 +85,8 @@
 <!--49B33DC2EDFD45A48EECE139AD5E9AC9-->  <UIPATTERN><![CDATA[STD]]></UIPATTERN>
 <!--49B33DC2EDFD45A48EECE139AD5E9AC9-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--49B33DC2EDFD45A48EECE139AD5E9AC9-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--49B33DC2EDFD45A48EECE139AD5E9AC9-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--49B33DC2EDFD45A48EECE139AD5E9AC9-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--49B33DC2EDFD45A48EECE139AD5E9AC9-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--49B33DC2EDFD45A48EECE139AD5E9AC9-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--49B33DC2EDFD45A48EECE139AD5E9AC9-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -110,6 +116,8 @@
 <!--6D732D027FFA4FB1BD0140ED3B606C0E-->  <UIPATTERN><![CDATA[STD]]></UIPATTERN>
 <!--6D732D027FFA4FB1BD0140ED3B606C0E-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--6D732D027FFA4FB1BD0140ED3B606C0E-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--6D732D027FFA4FB1BD0140ED3B606C0E-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--6D732D027FFA4FB1BD0140ED3B606C0E-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--6D732D027FFA4FB1BD0140ED3B606C0E-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--6D732D027FFA4FB1BD0140ED3B606C0E-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--6D732D027FFA4FB1BD0140ED3B606C0E-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -139,6 +147,8 @@
 <!--6EFD1987E93847DE87AD7B70282FBDF1-->  <UIPATTERN><![CDATA[STD]]></UIPATTERN>
 <!--6EFD1987E93847DE87AD7B70282FBDF1-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--6EFD1987E93847DE87AD7B70282FBDF1-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--6EFD1987E93847DE87AD7B70282FBDF1-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--6EFD1987E93847DE87AD7B70282FBDF1-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--6EFD1987E93847DE87AD7B70282FBDF1-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--6EFD1987E93847DE87AD7B70282FBDF1-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--6EFD1987E93847DE87AD7B70282FBDF1-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -168,6 +178,8 @@
 <!--7BF1D74F5C60424088416584DFD1EC1F-->  <UIPATTERN><![CDATA[STD]]></UIPATTERN>
 <!--7BF1D74F5C60424088416584DFD1EC1F-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--7BF1D74F5C60424088416584DFD1EC1F-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--7BF1D74F5C60424088416584DFD1EC1F-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--7BF1D74F5C60424088416584DFD1EC1F-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--7BF1D74F5C60424088416584DFD1EC1F-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--7BF1D74F5C60424088416584DFD1EC1F-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--7BF1D74F5C60424088416584DFD1EC1F-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -197,6 +209,8 @@
 <!--D26230D6D21546C6970E79FF1C51165E-->  <UIPATTERN><![CDATA[STD]]></UIPATTERN>
 <!--D26230D6D21546C6970E79FF1C51165E-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--D26230D6D21546C6970E79FF1C51165E-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--D26230D6D21546C6970E79FF1C51165E-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--D26230D6D21546C6970E79FF1C51165E-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--D26230D6D21546C6970E79FF1C51165E-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--D26230D6D21546C6970E79FF1C51165E-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--D26230D6D21546C6970E79FF1C51165E-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -226,6 +240,8 @@
 <!--D275449FFACC4539A401336214FDBF94-->  <UIPATTERN><![CDATA[STD]]></UIPATTERN>
 <!--D275449FFACC4539A401336214FDBF94-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--D275449FFACC4539A401336214FDBF94-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--D275449FFACC4539A401336214FDBF94-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--D275449FFACC4539A401336214FDBF94-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--D275449FFACC4539A401336214FDBF94-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--D275449FFACC4539A401336214FDBF94-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--D275449FFACC4539A401336214FDBF94-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -257,6 +273,8 @@
 <!--F648835984F842AF906FA5F97EF6641B-->  <UIPATTERN><![CDATA[STD]]></UIPATTERN>
 <!--F648835984F842AF906FA5F97EF6641B-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--F648835984F842AF906FA5F97EF6641B-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--F648835984F842AF906FA5F97EF6641B-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--F648835984F842AF906FA5F97EF6641B-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--F648835984F842AF906FA5F97EF6641B-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--F648835984F842AF906FA5F97EF6641B-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--F648835984F842AF906FA5F97EF6641B-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -286,6 +304,8 @@
 <!--FF8080812EFBEA81012EFBED3F58000C-->  <UIPATTERN><![CDATA[STD]]></UIPATTERN>
 <!--FF8080812EFBEA81012EFBED3F58000C-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--FF8080812EFBEA81012EFBED3F58000C-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--FF8080812EFBEA81012EFBED3F58000C-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--FF8080812EFBEA81012EFBED3F58000C-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--FF8080812EFBEA81012EFBED3F58000C-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--FF8080812EFBEA81012EFBED3F58000C-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--FF8080812EFBEA81012EFBED3F58000C-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -315,6 +335,8 @@
 <!--FF8081813157AED2013157BF6D810023-->  <UIPATTERN><![CDATA[STD]]></UIPATTERN>
 <!--FF8081813157AED2013157BF6D810023-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--FF8081813157AED2013157BF6D810023-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--FF8081813157AED2013157BF6D810023-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--FF8081813157AED2013157BF6D810023-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--FF8081813157AED2013157BF6D810023-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--FF8081813157AED2013157BF6D810023-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--FF8081813157AED2013157BF6D810023-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -342,6 +364,8 @@
 <!--FF80818132D7FB620132D819C1720046-->  <UIPATTERN><![CDATA[STD]]></UIPATTERN>
 <!--FF80818132D7FB620132D819C1720046-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--FF80818132D7FB620132D819C1720046-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--FF80818132D7FB620132D819C1720046-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--FF80818132D7FB620132D819C1720046-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--FF80818132D7FB620132D819C1720046-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--FF80818132D7FB620132D819C1720046-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--FF80818132D7FB620132D819C1720046-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -369,6 +393,8 @@
 <!--FF80818132D85DB50132D86374920010-->  <UIPATTERN><![CDATA[STD]]></UIPATTERN>
 <!--FF80818132D85DB50132D86374920010-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--FF80818132D85DB50132D86374920010-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--FF80818132D85DB50132D86374920010-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--FF80818132D85DB50132D86374920010-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--FF80818132D85DB50132D86374920010-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--FF80818132D85DB50132D86374920010-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--FF80818132D85DB50132D86374920010-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -397,6 +423,8 @@
 <!--FF80818132D8C36D0132D8C4936F0006-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--FF80818132D8C36D0132D8C4936F0006-->  <DISPLAYLOGIC><![CDATA[@Uipattern@!'M']]></DISPLAYLOGIC>
 <!--FF80818132D8C36D0132D8C4936F0006-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--FF80818132D8C36D0132D8C4936F0006-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--FF80818132D8C36D0132D8C4936F0006-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--FF80818132D8C36D0132D8C4936F0006-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--FF80818132D8C36D0132D8C4936F0006-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--FF80818132D8C36D0132D8C4936F0006-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -425,6 +453,8 @@
 <!--FF80818132F27A590132F28008350006-->  <UIPATTERN><![CDATA[STD]]></UIPATTERN>
 <!--FF80818132F27A590132F28008350006-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--FF80818132F27A590132F28008350006-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--FF80818132F27A590132F28008350006-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--FF80818132F27A590132F28008350006-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--FF80818132F27A590132F28008350006-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--FF80818132F27A590132F28008350006-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--FF80818132F27A590132F28008350006-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/OBSERDS_DATASOURCE.xml	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/OBSERDS_DATASOURCE.xml	Fri Jun 13 09:13:47 2014 +0200
@@ -12,6 +12,19 @@
 <!--090A37D22E61FE94012E621729090048-->  <USEASTABLEDATAORIGIN><![CDATA[N]]></USEASTABLEDATAORIGIN>
 <!--090A37D22E61FE94012E621729090048--></OBSERDS_DATASOURCE>
 
+<!--3C1148C0AB604DE1B51B7EA4112C325F--><OBSERDS_DATASOURCE>
+<!--3C1148C0AB604DE1B51B7EA4112C325F-->  <OBSERDS_DATASOURCE_ID><![CDATA[3C1148C0AB604DE1B51B7EA4112C325F]]></OBSERDS_DATASOURCE_ID>
+<!--3C1148C0AB604DE1B51B7EA4112C325F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--3C1148C0AB604DE1B51B7EA4112C325F-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--3C1148C0AB604DE1B51B7EA4112C325F-->  <AD_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_MODULE_ID>
+<!--3C1148C0AB604DE1B51B7EA4112C325F-->  <NAME><![CDATA[HQL Tables Datasource]]></NAME>
+<!--3C1148C0AB604DE1B51B7EA4112C325F-->  <DESCRIPTION><![CDATA[HQL Tables Datasource]]></DESCRIPTION>
+<!--3C1148C0AB604DE1B51B7EA4112C325F-->  <CLASSNAME><![CDATA[org.openbravo.service.datasource.HQLDataSourceService]]></CLASSNAME>
+<!--3C1148C0AB604DE1B51B7EA4112C325F-->  <OBCLKER_TEMPLATE_ID><![CDATA[2BAD445C2A0343C58E455F9BD379C690]]></OBCLKER_TEMPLATE_ID>
+<!--3C1148C0AB604DE1B51B7EA4112C325F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--3C1148C0AB604DE1B51B7EA4112C325F-->  <USEASTABLEDATAORIGIN><![CDATA[Y]]></USEASTABLEDATAORIGIN>
+<!--3C1148C0AB604DE1B51B7EA4112C325F--></OBSERDS_DATASOURCE>
+
 <!--99B9CC42FDEA4CA7A4EE35BC49D61E0E--><OBSERDS_DATASOURCE>
 <!--99B9CC42FDEA4CA7A4EE35BC49D61E0E-->  <OBSERDS_DATASOURCE_ID><![CDATA[99B9CC42FDEA4CA7A4EE35BC49D61E0E]]></OBSERDS_DATASOURCE_ID>
 <!--99B9CC42FDEA4CA7A4EE35BC49D61E0E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/ApplicationComponentProvider.java	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/ApplicationComponentProvider.java	Fri Jun 13 09:13:47 2014 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2010-2013 Openbravo SLU
+ * All portions are Copyright (C) 2010-2014 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -155,6 +155,8 @@
     globalResources.add(createStaticResource(
         "web/org.openbravo.client.application/js/form/formitem/ob-formitem-characteristics.js",
         true));
+    globalResources.add(createStaticResource(
+        "web/org.openbravo.client.application/js/form/formitem/ob-formitem-pickeditgrid.js", true));
 
     globalResources.add(createStaticResource(
         "web/org.openbravo.client.application/js/toolbar/ob-toolbar.js", false));
@@ -287,6 +289,8 @@
     globalResources.add(createStaticResource(
         "web/org.openbravo.client.application/js/process/ob-pick-and-execute-view.js", false));
     globalResources.add(createStaticResource(
+        "web/org.openbravo.client.application/js/process/ob-parameter-window-form.js", false));
+    globalResources.add(createStaticResource(
         "web/org.openbravo.client.application/js/process/ob-parameter-window-view.js", false));
 
     // Return Material
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/ApplicationConstants.java	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/ApplicationConstants.java	Fri Jun 13 09:13:47 2014 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2010-2013 Openbravo SLU
+ * All portions are Copyright (C) 2010-2014 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -42,6 +42,7 @@
   public static final String MAIN_LAYOUT_ID = "Application";
   public static final String MAIN_LAYOUT_VIEW_COMPONENT_ID = "View";
   public static final String MAIN_LAYOUT_TEMPLATE_ID = "9E97FF309FE44C61A761F50801F79349";
+  public static final String HQL_TABLE_DATASOURCE_ID = "3C1148C0AB604DE1B51B7EA4112C325F";
 
   public static final String PROPERTIES_TEMPLATE_ID = "DA488BBACB294198AA36A93F03F9561B";
   public static final String PROPERTIES_COMPONENT_ID = "Properties";
@@ -62,6 +63,7 @@
 
   public static final String DATASOURCEBASEDTABLE = "Datasource";
   public static final String TABLEBASEDTABLE = "Table";
+  public static final String HQLBASEDTABLE = "HQL";
 
   static {
     try {
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/ApplicationUtils.java	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/ApplicationUtils.java	Fri Jun 13 09:13:47 2014 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2010-2011 Openbravo SLU
+ * All portions are Copyright (C) 2010-2014 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -152,6 +152,15 @@
       }
     }
 
+    // handle a special case: the data origin type of the parentTab is not a table and there is only
+    // one linkToParent property in the subtab
+    if (returnProperty == null) {
+      if (!ApplicationConstants.TABLEBASEDTABLE.equals(parentTab.getTable().getDataOriginType())
+          && thisEntity.getParentProperties().size() == 1) {
+        returnProperty = thisEntity.getParentProperties().get(0);
+      }
+    }
+
     return (returnProperty != null ? returnProperty.getName() : "");
   }
 
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/process/BaseProcessActionHandler.java	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/process/BaseProcessActionHandler.java	Fri Jun 13 09:13:47 2014 +0200
@@ -84,13 +84,28 @@
           }
         }
       }
-
       // Set information for audit trail
       SessionInfo.setProcessType("PD");
       SessionInfo.setProcessId(processId);
       SessionInfo.setDBSessionInfo(OBDal.getInstance().getConnection(false));
 
-      return doExecute(parameters, content);
+      // Adds compatibility with legacy process definitions
+      // If the handler of the process definition has not been updated, then it expects the
+      // _selection and _allRows properties to be accessible directly from the _params object
+      Process process = OBDal.getInstance().get(Process.class, processId);
+      String updatedContent = content;
+      if (process.isGridlegacy()) {
+        JSONObject jsonRequest = new JSONObject(content);
+        if (!jsonRequest.isNull("_params")) {
+          JSONObject jsonparams = jsonRequest.getJSONObject("_params");
+          String gridParamName = jsonparams.names().getString(0);
+          JSONObject jsongrid = jsonparams.getJSONObject(gridParamName);
+          jsonRequest.put("_selection", jsongrid.getJSONArray("_selection"));
+          jsonRequest.put("_allRows", jsongrid.getJSONArray("_allRows"));
+          updatedContent = jsonRequest.toString();
+        }
+      }
+      return doExecute(parameters, updatedContent);
 
     } catch (Exception e) {
       log.error("Error trying to execute process request: " + e.getMessage(), e);
@@ -164,7 +179,7 @@
       }
       retval.put(entries.getKey(), entries.getValue().toString());
     }
-    return new HashMap<String, String>();
+    return retval;
   }
 
   protected abstract JSONObject doExecute(Map<String, Object> parameters, String content);
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/process/DefaultsProcessActionHandler.java	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/process/DefaultsProcessActionHandler.java	Fri Jun 13 09:13:47 2014 +0200
@@ -11,20 +11,25 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2012-2013 Openbravo SLU
+ * All portions are Copyright (C) 2012-2014 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
  */
 package org.openbravo.client.application.process;
 
+import java.util.ArrayList;
+import java.util.List;
 import java.util.Map;
 
 import javax.servlet.http.HttpSession;
 
 import org.apache.log4j.Logger;
+import org.codehaus.jettison.json.JSONException;
 import org.codehaus.jettison.json.JSONObject;
 import org.openbravo.base.model.Entity;
+import org.openbravo.base.model.ModelProvider;
+import org.openbravo.base.model.Property;
 import org.openbravo.base.model.domaintype.BooleanDomainType;
 import org.openbravo.base.model.domaintype.DomainType;
 import org.openbravo.base.model.domaintype.ForeignKeyDomainType;
@@ -33,12 +38,17 @@
 import org.openbravo.client.application.ParameterUtils;
 import org.openbravo.client.application.Process;
 import org.openbravo.client.kernel.KernelConstants;
+import org.openbravo.client.kernel.KernelUtils;
 import org.openbravo.client.kernel.reference.UIDefinition;
 import org.openbravo.client.kernel.reference.UIDefinitionController;
+import org.openbravo.dal.core.DalUtil;
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.data.Sqlc;
 import org.openbravo.model.ad.domain.Reference;
+import org.openbravo.model.ad.ui.Field;
+import org.openbravo.model.ad.ui.Tab;
+import org.openbravo.model.ad.ui.Window;
 
 /**
  * This ActionHandler is invoked when opening a Process Definition window. It is in charge of
@@ -49,6 +59,7 @@
 public class DefaultsProcessActionHandler extends BaseProcessActionHandler {
 
   private static final Logger log = Logger.getLogger(DefaultsProcessActionHandler.class);
+  private static final String WINDOW_REFERENCE_ID = "FF80818132D8F0F30132D9BC395D0038";
 
   @Override
   protected final JSONObject doExecute(Map<String, Object> parameters, String content) {
@@ -63,60 +74,138 @@
       }
       final Process processDefinition = OBDal.getInstance().get(Process.class, processId);
       JSONObject defaults = new JSONObject();
+      JSONObject filterExpressions = new JSONObject();
+      final List<Parameter> orderedParams = new ArrayList<Parameter>();
 
-      for (Parameter param : processDefinition.getOBUIAPPParameterList()) {
-        if (param.getDefaultValue() != null) {
+      // Reorder params in a list in order to compute in order based on the dependencies of default
+      // values
+      final boolean paramsOrdered = reorderParams(processDefinition, orderedParams, context);
 
-          Reference reference = param.getReferenceSearchKey();
-          if (reference == null) {
-            reference = param.getReference();
+      if (paramsOrdered) {
+
+        for (Parameter param : orderedParams) {
+          if (param.getDefaultValue() != null) {
+
+            Reference reference = param.getReferenceSearchKey();
+            if (reference == null) {
+              reference = param.getReference();
+            }
+
+            UIDefinition uiDefinition = UIDefinitionController.getInstance().getUIDefinition(
+                reference);
+
+            String rawDefaultValue = param.getDefaultValue();
+
+            Object defaultValue;
+            String inpName = null;
+            if (isSessionDefaultValue(rawDefaultValue) && context != null) {
+              // Transforms the default value from @columnName@ to the column inp name
+              inpName = "inp"
+                  + Sqlc.TransformaNombreColumna(getDependentDefaultValue(rawDefaultValue));
+              defaultValue = context.get(inpName);
+              inpName = "inp" + Sqlc.TransformaNombreColumna(param.getDBColumnName());
+            } else {
+              defaultValue = ParameterUtils.getJSExpressionResult(fixRequestMap(parameters),
+                  (HttpSession) parameters.get(KernelConstants.HTTP_SESSION), rawDefaultValue);
+              if (context == null) {
+                context = new JSONObject();
+              }
+              inpName = "inp" + Sqlc.TransformaNombreColumna(param.getDBColumnName());
+            }
+            if (!context.has(inpName)) {
+              context.put(inpName, defaultValue);
+            }
+            DomainType domainType = uiDefinition.getDomainType();
+            if (defaultValue != null && defaultValue instanceof String
+                && domainType instanceof ForeignKeyDomainType) {
+              // default value is ID of a FK, look for the identifier
+              Entity referencedEntity = ((ForeignKeyDomainType) domainType)
+                  .getForeignKeyColumn(param.getDBColumnName()).getProperty().getEntity();
+
+              BaseOBObject record = OBDal.getInstance().get(referencedEntity.getName(),
+                  defaultValue);
+              if (record != null) {
+                String identifier = record.getIdentifier();
+                JSONObject def = new JSONObject();
+                def.put("value", defaultValue);
+                def.put("identifier", identifier);
+                defaults.put(param.getDBColumnName(), def);
+              }
+            } else {
+              if (domainType instanceof BooleanDomainType) {
+                defaultValue = ((BooleanDomainType) domainType)
+                    .createFromString((String) defaultValue);
+              }
+              defaults.put(param.getDBColumnName(), defaultValue);
+            }
           }
+          if (WINDOW_REFERENCE_ID.equals(param.getReference().getId())) {
+            if (param.getReferenceSearchKey().getOBUIAPPRefWindowList().size() > 0) {
+              final Window window = param.getReferenceSearchKey().getOBUIAPPRefWindowList().get(0)
+                  .getWindow();
+              final Tab tab = window.getADTabList().get(0);
+              final String entityName = tab.getTable().getName();
+              final Entity entity = ModelProvider.getInstance().getEntity(entityName);
+              JSONObject gridJson = new JSONObject();
 
-          UIDefinition uiDefinition = UIDefinitionController.getInstance().getUIDefinition(
-              reference);
+              for (Field field : tab.getADFieldList()) {
+                if (field.getObuiappDefaultExpression() != null) {
+                  String rawDefaultExpression = field.getObuiappDefaultExpression();
+                  Object defaultExpression;
+                  defaultExpression = ParameterUtils.getJSExpressionResult(
+                      fixRequestMap(parameters),
+                      (HttpSession) parameters.get(KernelConstants.HTTP_SESSION),
+                      rawDefaultExpression);
 
-          String rawDefaultValue = param.getDefaultValue();
+                  if (defaultExpression != null && !defaultExpression.equals("")
+                      && !defaultExpression.equals("''")) {
+                    Property property = null;
+                    if (field.getColumn() != null) {
+                      property = KernelUtils.getInstance().getPropertyFromColumn(field.getColumn());
+                    } else if (field.getProperty() != null) {
+                      property = DalUtil.getPropertyFromPath(entity, field.getProperty());
+                    }
+                    if (property != null && property.getTargetEntity() != null
+                        && !property.isOneToMany()) {
+                      final BaseOBObject bob = OBDal.getInstance().get(
+                          property.getTargetEntity().getName(), defaultExpression);
+                      defaultExpression = bob.getIdentifier();
+                    }
+                  }
 
-          Object defaultValue;
-          if (isSessionDefaultValue(rawDefaultValue) && context != null) {
-            // Transforms the default value from @columnName@ to the column inp name
-            String inpName = "inp"
-                + Sqlc.TransformaNombreColumna(rawDefaultValue.substring(1,
-                    rawDefaultValue.length() - 1));
-            defaultValue = context.get(inpName);
-          } else {
-            defaultValue = ParameterUtils.getJSExpressionResult(fixRequestMap(parameters),
-                (HttpSession) parameters.get(KernelConstants.HTTP_SESSION), rawDefaultValue);
-          }
-
-          DomainType domainType = uiDefinition.getDomainType();
-          if (defaultValue != null && defaultValue instanceof String
-              && domainType instanceof ForeignKeyDomainType) {
-            // default value is ID of a FK, look for the identifier
-            Entity referencedEntity = ((ForeignKeyDomainType) domainType)
-                .getForeignKeyColumn(param.getDBColumnName()).getProperty().getEntity();
-
-            BaseOBObject record = OBDal.getInstance().get(referencedEntity.getName(), defaultValue);
-            if (record != null) {
-              String identifier = record.getIdentifier();
-              JSONObject def = new JSONObject();
-              def.put("value", defaultValue);
-              def.put("identifier", identifier);
-              defaults.put(param.getDBColumnName(), def);
+                  if (defaultExpression != null && !defaultExpression.equals("")
+                      && !defaultExpression.equals("''")) {
+                    String fieldName = field.getProperty();
+                    if (fieldName != null) {
+                      gridJson.put(fieldName.replace(DalUtil.DOT, DalUtil.FIELDSEPARATOR),
+                          defaultExpression);
+                    } else {
+                      gridJson.put(
+                          entity.getPropertyByColumnName(field.getColumn().getDBColumnName())
+                              .getName().replace(DalUtil.DOT, DalUtil.FIELDSEPARATOR),
+                          defaultExpression);
+                    }
+                  }
+                }
+              }
+              log.debug("Implicit Filters for process " + processDefinition + ", grid: "
+                  + param.getDBColumnName() + "\n" + gridJson.toString());
+              filterExpressions.put(param.getDBColumnName(), gridJson);
             }
-          } else {
-            if (domainType instanceof BooleanDomainType) {
-              defaultValue = ((BooleanDomainType) domainType)
-                  .createFromString((String) defaultValue);
-            }
-            defaults.put(param.getDBColumnName(), defaultValue);
           }
         }
+        log.debug("Defaults for process " + processDefinition + "\n" + defaults.toString());
+
+        JSONObject results = new JSONObject();
+        results.put("defaults", defaults);
+        results.put("filterExpressions", filterExpressions);
+        return results;
+      } else {
+        return new JSONObject();
       }
-      log.debug("Defaults for process " + processDefinition + "\n" + defaults.toString());
-      return defaults;
     } catch (Exception e) {
-      log.error("Error trying getting defaults for process: " + e.getMessage(), e);
+      log.error(
+          "Error trying getting defaults and Filter Expressions for process: " + e.getMessage(), e);
       return new JSONObject();
     } finally {
       OBContext.restorePreviousMode();
@@ -133,4 +222,70 @@
       return false;
     }
   }
+
+  // Returns true if it orders all the params in a list taking into account the dependencies of the
+  // defaults. It returns false of is not able to order all the params because of dependencies in
+  // circle
+  private boolean reorderParams(Process processDefinition, List<Parameter> orderedParams,
+      JSONObject context) {
+    final List<String> paramsAddedToOrderList = new ArrayList<String>();
+    List<Parameter> paramsWithDefaultValue = new ArrayList<Parameter>();
+    String dependentDefaultValue = null;
+    Parameter parameter = null;
+    int i = 0;
+
+    try {
+
+      for (Parameter param : processDefinition.getOBUIAPPParameterList()) {
+        if (param.getDefaultValue() != null) {
+          paramsWithDefaultValue.add(param);
+        } else {
+          orderedParams.add(param);
+          paramsAddedToOrderList.add(param.getDBColumnName());
+        }
+      }
+
+      while (!paramsWithDefaultValue.isEmpty()) {
+        if (i == paramsWithDefaultValue.size()) {
+          log.error("Error getting default values for process: " + processDefinition.getName()
+              + ". Default values not properly defined, circle dependencies found");
+          return false;
+        }
+        parameter = paramsWithDefaultValue.get(i);
+        if (!isSessionDefaultValue(parameter.getDefaultValue())) {
+          orderedParams.add(parameter);
+          paramsAddedToOrderList.add(parameter.getDBColumnName());
+          paramsWithDefaultValue.remove(i);
+          i = 0;
+        } else {
+          dependentDefaultValue = getDependentDefaultValue(parameter.getDefaultValue());
+          String inpName = "inp" + Sqlc.TransformaNombreColumna(dependentDefaultValue);
+          if (paramsAddedToOrderList.contains(dependentDefaultValue)
+              || context.get(inpName) != null) {
+            orderedParams.add(parameter);
+            paramsAddedToOrderList.add(parameter.getDBColumnName());
+            paramsWithDefaultValue.remove(i);
+            i = 0;
+          } else {
+            i++;
+          }
+        }
+      }
+    } catch (JSONException e) {
+      log.error("Error getting defaults and Filter Expressions for process: " + e.getMessage(), e);
+      return false;
+    }
+    return true;
+  }
+
+  /**
+   * Removes the leading and preceding '@' from a default value
+   * 
+   * @param rawDefaultValue
+   *          defaultValue surrounded by '@', i.e. '@AD_USER_ID@'
+   * @return the rawDefaultValue, after removing the first and the last caracters
+   */
+  private String getDependentDefaultValue(String rawDefaultValue) {
+    return rawDefaultValue.substring(1, rawDefaultValue.length() - 1);
+  }
 }
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-param-window-parameter.ftl	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-param-window-parameter.ftl	Fri Jun 13 09:13:47 2014 +0200
@@ -12,7 +12,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2012-2013 Openbravo SLU
+ * All portions are Copyright (C) 2012-2014 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -22,10 +22,14 @@
 
 <#macro createParameter param>
 {
+  
+  <#if param.grid>
+    type:'OBPickEditGridItem',      
+  <#else>
     type: '${param.type}',
-    title: '${param.title?js_string}',
-    name: '${param.name?js_string}',
-    
+  </#if>
+  title: '${param.title?js_string}',
+  name: '${param.name?js_string}',
   <#if param.type != "OBSectionItem">
     paramId: '${param.id}',
     width: '${param.width?js_string}',
@@ -39,13 +43,16 @@
     <#if param.redrawOnChange>
       redrawOnChange: true,
     </#if>
+    <#if param.onChangeFunction?? && param.onChangeFunction != "" > <#-- TODO: Check why "param.onChangeFunction??" is needed -->
+        onChangeFunction: ${param.onChangeFunction?js_string},
+    </#if>
     <#if param.showIf != "" >
       showIf: function(item, value, form, currentValues, context) {
         return (${param.showIf});
       },
     </#if>
     <#if param.readOnlyIf != "" >
-      readOnlyIf: function(currentValues) {
+      readOnlyIf: function(currentValues,context) {
         return (${param.readOnlyIf});
       },
     </#if>
@@ -63,5 +70,12 @@
     </#list>
     ]
   </#if>
+  <#if param.grid> 
+    , displayedRowsNumber: ${param.numberOfDisplayedRows}
+    , showTitle: ${param.showTitle?string}
+    ,viewProperties: {
+    ${param.tabView}
+    }
+   </#if>
 }
 </#macro>
\ No newline at end of file
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-pick-and-execute-view-tab.js.ftl	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-pick-and-execute-view-tab.js.ftl	Fri Jun 13 09:13:47 2014 +0200
@@ -102,6 +102,6 @@
       </#if>
     </#list>
     },
-
-    dataSource: ${tabComponent.dataSourceJavaScript}
+    
+    dataSourceProperties: ${tabComponent.dataSourceJavaScript}
 </#macro>
\ No newline at end of file
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-pick-and-execute-view-window.js.ftl	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-pick-and-execute-view-window.js.ftl	Fri Jun 13 09:13:47 2014 +0200
@@ -12,7 +12,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2011-2013 Openbravo SLU
+ * All portions are Copyright (C) 2011-2014 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -28,6 +28,12 @@
     processId: '${data.processId?js_string}',
     actionHandler: '${data.actionHandler?js_string}',
     popup: ${data.popup?string}, 
+    <#if data.clientSideValidation??>
+        clientSideValidation: ${data.clientSideValidation?js_string},
+    </#if>
+    <#if data.onLoadFunction??>
+        onLoadFunction: ${data.onLoadFunction?js_string},
+    </#if>
     <#list data.buttonList as button>
     <#if button_index == 0>buttons:{</#if>
     '${button.searchKey?js_string}':'${button.name?js_string}'<#if button_has_next>,<#else>},</#if>
@@ -35,17 +41,7 @@
     viewProperties: {
       fields: [
     <#list data.paramHandler.parameters as param>
-      <#if param.grid>
-      {
-        isGrid: true,
-        viewProperties: {
-          ${param.tabView}
-        }
-      }
-      <#if param_has_next>,</#if>
-      <#else>
       <@createParameter param/><#if param_has_next>,</#if>
-      </#if>
     </#list>    
      ]
     },
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-tree-grid.js.ftl	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-tree-grid.js.ftl	Fri Jun 13 09:13:47 2014 +0200
@@ -25,6 +25,8 @@
     orderedTree:  ${data.orderedTree?string},
     applyWhereClauseToChildren:  ${data.applyWhereClauseToChildren?string},
     dataSourceId:  '${data.dataSourceId}',
+    canReorderRecords: ${data.canReorderRecords?string},
+    showNodeIcons: ${data.showNodeIcons?string},
     treeStructure:  '${data.treeStructure}',
     fields: this.gridFields
 })
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-view-field.js.ftl	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-view-field.js.ftl	Fri Jun 13 09:13:47 2014 +0200
@@ -12,7 +12,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2010-2012 Openbravo SLU
+ * All portions are Copyright (C) 2010-2014 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -26,6 +26,9 @@
 {
 <@compress single_line=true>
     name: '${field.name?js_string}',
+    <#if field.id??>
+        id: '${field.id?js_string}',
+    </#if>
     <#if field.label != ''>
         title: '${field.label?js_string}',
     </#if>
@@ -106,6 +109,11 @@
         <#if field.validationFunction != "">
             validationFn: ${field.validationFunction},
         </#if>
+        <#if field.displayLogicGrid != "">
+          displayLogicGrid: function(currentValues, context){
+            return (${field.displayLogicGrid});
+          },
+        </#if>         
         <#if field.showSummary>
             showGridSummary: true,
             showGroupSummary: true,
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-view-tab.js.ftl	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-view-tab.js.ftl	Fri Jun 13 09:13:47 2014 +0200
@@ -39,6 +39,11 @@
                     return (${tabComponent.showIf});
                 },
     </#if>
+    <#if tabComponent.defaultTreeViewLogicIf != "" >
+        defaultTreeViewLogicIf: function(context) {
+                    return (${tabComponent.defaultTreeViewLogicIf});
+                },
+    </#if>
 
      <#if tabComponent.preferenceAttributesNames != "" >
         sessionAttributesNames: [${tabComponent.preferenceAttributesNames}],
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java	Fri Jun 13 09:13:47 2014 +0200
@@ -139,8 +139,8 @@
       List<String> jsExcuteCode = new ArrayList<String>();
       Map<String, Object> hiddenInputs = new HashMap<String, Object>();
 
-      boolean dataSourceBasedTable = ApplicationConstants.DATASOURCEBASEDTABLE.equals(tab
-          .getTable().getDataOriginType());
+      boolean databaseBasedTable = ApplicationConstants.TABLEBASEDTABLE.equals(tab.getTable()
+          .getDataOriginType());
 
       log.debug("Form Initialization Component Execution. Tab Name: " + tab.getWindow().getName()
           + "." + tab.getName() + " Tab Id:" + tab.getId());
@@ -152,9 +152,9 @@
         log.debug("Changed field: " + changedColumn);
       }
 
-      // If the table is based in a datasource there is no BaseOBObject associated to it, don't try
+      // If the table is not based in db table there is no BaseOBObject associated to it, don't try
       // to retrieve the row
-      if (!dataSourceBasedTable && rowId != null && !rowId.equals("null")) {
+      if (databaseBasedTable && rowId != null && !rowId.equals("null")) {
         row = OBDal.getInstance().get(tab.getTable().getName(), rowId);
       }
       JSONObject jsContent = new JSONObject();
@@ -183,8 +183,8 @@
             .getJSONArray("overwrittenAuxiliaryInputs"));
       }
 
-      // If the table is based in a datasource, don't try to create a BaseOBObject
-      if (!dataSourceBasedTable) {
+      // If the table is not based in a db table, don't try to create a BaseOBObject
+      if (databaseBasedTable) {
         // create the row from the json content then
         if (row == null) {
           final JsonToDataConverter fromJsonConverter = OBProvider.getInstance().get(
@@ -231,9 +231,9 @@
       // First the parent record is retrieved and the session variables for the parent records are
       // set
       long t1 = System.currentTimeMillis();
-      // If the table is based in a datasource, don't try to retrieve the parent record (the row is
-      // null because datasource based tables do not have BaseOBObjects)
-      if (!dataSourceBasedTable) {
+      // If the table is not based in a db table, don't try to retrieve the parent record (the row
+      // is null because tables not based on db tables do not have BaseOBObjects)
+      if (databaseBasedTable) {
         parentRecord = setSessionVariablesInParent(mode, tab, row, parentId);
       }
 
@@ -305,6 +305,10 @@
         log.error("Error while generating the error JSON object: " + jsonString, e);
       }
     } finally {
+
+      // Clear session to prevent slow flush
+      OBDal.getInstance().getSession().clear();
+
       OBContext.restorePreviousMode();
     }
     return null;
@@ -935,13 +939,13 @@
 
   private void setValuesInRequest(String mode, Tab tab, BaseOBObject row, JSONObject jsContent) {
 
-    boolean dataSourceBasedTable = ApplicationConstants.DATASOURCEBASEDTABLE.equals(tab.getTable()
+    boolean tableBasedTable = ApplicationConstants.TABLEBASEDTABLE.equals(tab.getTable()
         .getDataOriginType());
 
     List<Field> fields = getADFieldList(tab.getId());
     // If the table is based on a datasource it is not possible to initialize the values from the
     // database
-    if (mode.equals("EDIT") && !dataSourceBasedTable) {
+    if (mode.equals("EDIT") && tableBasedTable) {
       // In EDIT mode we initialize them from the database
       List<Column> columns = getADColumnList(tab.getTable().getId());
 
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBTreeGridComponent.java	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBTreeGridComponent.java	Fri Jun 13 09:13:47 2014 +0200
@@ -75,6 +75,27 @@
     }
   }
 
+  public boolean isCanReorderRecords() {
+    String uiPattern = tab.getUIPattern();
+    boolean isReadOnlyTree = tab.isReadOnlyTree();
+    if (uiPattern.equals("RO") || isReadOnlyTree) {
+      return false;
+    } else {
+      return true;
+    }
+  }
+
+  public boolean isShowNodeIcons() {
+    String uiPattern = tab.getUIPattern();
+    boolean isShowTreeNodeIcons = tab.isShowTreeNodeIcons();
+    boolean isReadOnlyTree = tab.isReadOnlyTree();
+    if ((uiPattern.equals("RO") || isReadOnlyTree) && !isShowTreeNodeIcons) {
+      return false;
+    } else {
+      return true;
+    }
+  }
+
   public boolean isApplyWhereClauseToChildren() {
     TableTree tableTree = tab.getTableTree();
     return tableTree.isApplyWhereClauseToChildNodes();
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewFieldHandler.java	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewFieldHandler.java	Fri Jun 13 09:13:47 2014 +0200
@@ -111,6 +111,7 @@
 
     final List<Field> fieldsInDynamicExpression = new ArrayList<Field>();
     final Map<Field, String> displayLogicMap = new HashMap<Field, String>();
+    final Map<Field, String> displayLogicGridMap = new HashMap<Field, String>();
     final Map<Field, String> readOnlyLogicMap = new HashMap<Field, String>();
 
     // Processing dynamic expressions (display logic)
@@ -144,7 +145,7 @@
             propertiesInButtonFieldDisplayLogic.add(property.getName());
           }
         } else {
-          if (!fieldExpression.isDisplayed()) {
+          if (!fieldExpression.isDisplayed() || !fieldExpression.isShowInGridView()) {
             Property property = entity.getPropertyByColumnName(fieldExpression.getColumn()
                 .getDBColumnName());
             if (!hiddenPropertiesInDisplayLogic.contains(property.getName())) {
@@ -155,6 +156,26 @@
       }
     }
 
+    // Processing display Logic Grid
+    for (Field f : adFields) {
+      if (f.getDisplaylogicgrid() == null || f.getDisplaylogicgrid().equals("") || !f.isActive()
+          || !(f.isDisplayed() || f.isShowInGridView())) {
+        continue;
+      }
+
+      final DynamicExpressionParser parser = new DynamicExpressionParser(f.getDisplaylogicgrid(),
+          tab);
+      displayLogicGridMap.put(f, parser.getJSExpression());
+
+      log.debug(f.getTab().getId() + " - " + f.getName() + " >>> " + parser.getJSExpression());
+
+      for (Field fieldExpression : parser.getFields()) {
+        if (!fieldsInDynamicExpression.contains(fieldExpression)) {
+          fieldsInDynamicExpression.add(fieldExpression);
+        }
+      }
+    }
+
     // Processing dynamic expression (read-only logic)
     for (Field f : adFields) {
       if (f.getColumn() == null || f.getColumn().getReadOnlyLogic() == null
@@ -256,6 +277,8 @@
         viewField.setField(field);
         viewField.setRedrawOnChange(fieldsInDynamicExpression.contains(field));
         viewField.setShowIf(displayLogicMap.get(field) != null ? displayLogicMap.get(field) : "");
+        viewField.setDisplayLogicGrid(displayLogicGridMap.get(field) != null ? displayLogicGridMap
+            .get(field) : "");
         viewField.setReadOnlyIf(readOnlyLogicMap.get(field) != null ? readOnlyLogicMap.get(field)
             : "");
         // Positioning some fields in odd-columns
@@ -301,8 +324,11 @@
         viewField.setProperty(property);
 
         viewField.setField(field);
+        viewField.setId(field);
         viewField.setRedrawOnChange(fieldsInDynamicExpression.contains(field));
         viewField.setShowIf(displayLogicMap.get(field) != null ? displayLogicMap.get(field) : "");
+        viewField.setDisplayLogicGrid(displayLogicGridMap.get(field) != null ? displayLogicGridMap
+            .get(field) : "");
         viewField.setReadOnlyIf(readOnlyLogicMap.get(field) != null ? readOnlyLogicMap.get(field)
             : "");
         // Positioning some fields in odd-columns
@@ -541,6 +567,8 @@
 
     public String getName();
 
+    public String getId();
+
     public String getType();
 
     public boolean getIsAuditField();
@@ -587,6 +615,7 @@
 
     public boolean getHasDefaultValue();
 
+    public String getDisplayLogicGrid();
   }
 
   public class OBViewFieldAudit implements OBViewFieldDefinition {
@@ -847,6 +876,14 @@
       return false;
     }
 
+    public String getDisplayLogicGrid() {
+      return "";
+    }
+
+    public String getId() {
+      return null;
+    }
+
   }
 
   public class OBClientClassField implements OBViewFieldDefinition {
@@ -855,7 +892,10 @@
     private boolean redrawOnChange = false;
     private String showIf = "";
     private String readOnlyIf = "";
+    private String displaylogicgrid = "";
+
     private int gridSort = 0;
+    private String id;
 
     public String getOnChangeFunction() {
       return field.getOnChangeFunction();
@@ -1073,6 +1113,16 @@
       return readOnlyIf;
     }
 
+    public String getDisplayLogicGrid() {
+      return displaylogicgrid;
+    }
+
+    public void setDisplayLogicGrid(String displaylogicgridExpression) {
+      if (this.getDisplayLogicGrid() != null) {
+        this.displaylogicgrid = displaylogicgridExpression;
+      }
+    }
+
     public boolean isDisplayed() {
       return field.isDisplayed() != null && field.isDisplayed();
     }
@@ -1096,6 +1146,10 @@
     public boolean isShowSummary() {
       return false;
     }
+
+    public String getId() {
+      return null;
+    }
   }
 
   public class OBViewField implements OBViewFieldDefinition {
@@ -1107,7 +1161,9 @@
     private boolean redrawOnChange = false;
     private String showIf = "";
     private String readOnlyIf = "";
+    private String displayLogicGrid = "";
     private int gridSort = 0;
+    private String id;
 
     public String getClientClass() {
       return field.getClientclass() == null ? "" : field.getClientclass();
@@ -1353,6 +1409,14 @@
       this.field = field;
     }
 
+    public void setId(Field field) {
+      this.id = field.getId();
+    }
+
+    public String getId() {
+      return id;
+    }
+
     public boolean getStandardField() {
       return true;
     }
@@ -1483,6 +1547,17 @@
       return "";
     }
 
+    public String getDisplayLogicGrid() {
+      if (field.getDisplaylogicgrid() != null) {
+        return this.displayLogicGrid;
+      }
+      return "";
+    }
+
+    public void setDisplayLogicGrid(String displayLogicGridExpression) {
+      this.displayLogicGrid = displayLogicGridExpression;
+    }
+
     public boolean isShowSummary() {
       if (field.isOBUIAPPShowSummary() != null || field.getObuiappSummaryfn() != null) {
         return field.getObuiappSummaryfn() != null || field.isOBUIAPPShowSummary();
@@ -1658,6 +1733,14 @@
     public boolean isDisplayed() {
       return true;
     }
+
+    public String getDisplayLogicGrid() {
+      return "";
+    }
+
+    public String getId() {
+      return null;
+    }
   }
 
   public class OBViewFieldGroup extends DefaultVirtualField {
@@ -2089,6 +2172,14 @@
       return true;
     }
 
+    public String getDisplayLogicGrid() {
+      return "";
+    }
+
+    public String getId() {
+      return null;
+    }
+
   }
 
   public static class FormFieldComparator implements Comparator<Field> {
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewParameterHandler.java	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewParameterHandler.java	Fri Jun 13 09:13:47 2014 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2012-2013 Openbravo SLU 
+ * All portions are Copyright (C) 2012-2014 Openbravo SLU 
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -42,6 +42,7 @@
 public class OBViewParameterHandler {
   private static final Logger log = Logger.getLogger(OBViewParameterHandler.class);
   private static final String WINDOW_REFERENCE_ID = "FF80818132D8F0F30132D9BC395D0038";
+  private static final int NUMBER_COLUMNS = 4;
   private Process process;
   private ParameterWindowComponent paramWindow;
 
@@ -88,7 +89,9 @@
     List<OBViewParameter> params = new ArrayList<OBViewParameterHandler.OBViewParameter>();
     OBViewParamGroup currentGroup = null;
     FieldGroup currentADFieldGroup = null;
+    int pos = 1;
     for (Parameter param : process.getOBUIAPPParameterList()) {
+
       if (!(param.isActive()
           && (!param.isFixed() || param.getReference().getId().equals(WINDOW_REFERENCE_ID)) && (!param
           .getReference().getId().equals(ParameterWindowComponent.BUTTON_LIST_REFERENCE_ID)))) {
@@ -125,7 +128,31 @@
         parameter.addListReferenceValues(param.getReferenceSearchKey());
       }
 
+      // Add spacers to order the field in the column number defined
+      if (param.isStartinnewline()) {
+        pos = 1;
+      }
+      if (pos > NUMBER_COLUMNS) {
+        pos = pos - NUMBER_COLUMNS;
+      }
+
+      if (param.getNumColumn() != null) {
+        int spaces = 0;
+        if (pos > param.getNumColumn().intValue()) {
+          spaces = NUMBER_COLUMNS - (pos - param.getNumColumn().intValue());
+        } else {
+          spaces = param.getNumColumn().intValue() - pos;
+        }
+        for (int i = 0; i < spaces; i++) {
+          final OBViewParamSpacer spacer = new OBViewParamSpacer();
+          params.add(spacer);
+          pos++;
+        }
+
+      }
       params.add(parameter);
+      pos++;
+
     }
     return params;
   }
@@ -294,6 +321,18 @@
       return parameter.getLength();
     }
 
+    public String getOnChangeFunction() {
+      return parameter.getOnChangeFunction();
+    }
+
+    public Long getNumberOfDisplayedRows() {
+      return parameter.getDisplayedRows() != null ? parameter.getDisplayedRows() : 8;
+    }
+
+    public boolean getShowTitle() {
+      return parameter.isDisplayTitle();
+    }
+
     public class ValueMapValue {
       final String key;
       final String value;
@@ -360,6 +399,51 @@
     }
   }
 
+  public class OBViewParamSpacer extends OBViewParameter {
+    @Override
+    public String getType() {
+      return "spacer";
+    }
+
+    public String getName() {
+      return "";
+    }
+
+    public boolean getPersonalizable() {
+      return false;
+
+    }
+
+    public boolean isGrid() {
+      return false;
+    }
+
+    public String getTitle() {
+      return "";
+    }
+
+    public String getId() {
+      return "";
+    }
+
+    public String getWidth() {
+      return "";
+    }
+
+    public boolean isRequired() {
+      return false;
+    }
+
+    public String getParameterProperties() {
+      return "";
+    }
+
+    public String getOnChangeFunction() {
+      return "";
+    }
+
+  }
+
   public void setParamWindow(ParameterWindowComponent parameterWindowComponent) {
     this.paramWindow = parameterWindowComponent;
   }
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewTab.java	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewTab.java	Fri Jun 13 09:13:47 2014 +0200
@@ -61,6 +61,7 @@
 import org.openbravo.model.ad.ui.Process;
 import org.openbravo.model.ad.ui.Tab;
 import org.openbravo.model.ad.ui.TabTrl;
+import org.openbravo.service.datasource.DataSourceComponent;
 import org.openbravo.service.datasource.DataSourceConstants;
 import org.openbravo.service.db.DalConnectionProvider;
 import org.openbravo.service.json.JsonConstants;
@@ -129,7 +130,16 @@
     if (sb.length() > 0) {
       dsParameters.put(JsonConstants.ADDITIONAL_PROPERTIES_PARAMETER, sb.toString());
     }
-    final Component component = dsComponentProvider.getComponent(dsId, dsParameters);
+    // If the tab is based on a hql table, then the tableId must be passed to the datasource so that
+    // it can build the datasource properties based on the columns of the table
+    if (ApplicationConstants.HQLBASEDTABLE.equals(tab.getTable().getDataOriginType())) {
+      dsParameters.put("tableId", tab.getTable().getId());
+    }
+    DataSourceComponent component = (DataSourceComponent) dsComponentProvider.getComponent(dsId,
+        dsParameters);
+    if ("OBUIAPP_PickAndExecute".equals(tab.getWindow().getWindowType())) {
+      component.setIncludeCreationCode(false);
+    }
     return component.generate();
   }
 
@@ -467,10 +477,13 @@
 
   public String getDataSourceId() {
     String dataSourceId = null;
-    if (ApplicationConstants.TABLEBASEDTABLE.equals(tab.getTable().getDataOriginType())) {
+    String dataOriginType = tab.getTable().getDataOriginType();
+    if (ApplicationConstants.TABLEBASEDTABLE.equals(dataOriginType)) {
       dataSourceId = tab.getTable().getName();
-    } else {
+    } else if (ApplicationConstants.DATASOURCEBASEDTABLE.equals(dataOriginType)) {
       dataSourceId = tab.getTable().getObserdsDatasource().getId();
+    } else if (ApplicationConstants.HQLBASEDTABLE.equals(dataOriginType)) {
+      dataSourceId = ApplicationConstants.HQL_TABLE_DATASOURCE_ID;
     }
     return dataSourceId;
   }
@@ -617,6 +630,24 @@
     }
   }
 
+  public String getDefaultTreeViewLogicIf() {
+
+    String jsExpression = null;
+    if (tab.getDefaultTreeViewLogic() != null && !tab.getDefaultTreeViewLogic().isEmpty()) {
+      boolean inpColumnNames = true;
+      final DynamicExpressionParser parser = new DynamicExpressionParser(
+          tab.getDefaultTreeViewLogic(), tab, inpColumnNames);
+      jsExpression = parser.getJSExpression();
+      // Retrieves the preference attributes used in the display logic of the tab
+      setPreferenceAttributesFromParserResult(parser, this.getWindowId());
+    }
+    if (jsExpression != null) {
+      return jsExpression;
+    } else {
+      return "";
+    }
+  }
+
   private void setPreferenceAttributesFromParserResult(DynamicExpressionParser parser,
       String windowId) {
     for (String attrName : parser.getSessionAttributes()) {
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/ParameterWindowComponent.java	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/ParameterWindowComponent.java	Fri Jun 13 09:13:47 2014 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2012-2013 Openbravo SLU
+ * All portions are Copyright (C) 2012-2014 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -125,6 +125,14 @@
     return process.getId();
   }
 
+  public String getClientSideValidation() {
+    return process.getClientSideValidation();
+  }
+
+  public String getOnLoadFunction() {
+    return process.getLoadFunction();
+  }
+
   public List<org.openbravo.model.ad.domain.List> getButtonList() {
     for (Parameter p : process.getOBUIAPPParameterList()) {
       if (p.isActive() && p.getReference().getId().equals(BUTTON_LIST_REFERENCE_ID)) {
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-characteristics.js	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-characteristics.js	Fri Jun 13 09:13:47 2014 +0200
@@ -501,6 +501,7 @@
     // See issue #24750
     if (this.grid.parentElement.data) {
       this.grid.parentElement.data.localData = null;
+      this.grid.parentElement.data.allRows = null;
     }
 
     this.internalValue = value;
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-datetime.js	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-datetime.js	Fri Jun 13 09:13:47 2014 +0200
@@ -137,13 +137,22 @@
     } else {
       this.showPickerTimeItem = false;
     }
+    if (OB.Format.dateTime.toUpperCase().lastIndexOf(' A') !== -1 && OB.Format.dateTime.toUpperCase().lastIndexOf(' A') === OB.Format.dateTime.length - 2) {
+      this.use24HourTime = false;
+    } else {
+      this.use24HourTime = true;
+    }
     return this.Super('doInit', arguments);
   },
 
   parseValue: function () {
     var parseVal = this.Super('parseValue', arguments);
     if (this.showTime && parseVal.indexOf(' ') === -1) {
-      parseVal = parseVal + ' ' + '00:00:00';
+      if (this.use24HourTime) {
+        parseVal = parseVal + ' ' + '00:00:00';
+      } else {
+        parseVal = parseVal + ' ' + '12:00:00 AM';
+      }
     }
     return parseVal;
   },
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-fk-filter.js	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-fk-filter.js	Fri Jun 13 09:13:47 2014 +0200
@@ -66,8 +66,12 @@
 
       // make sure that we send the same parameters as the grid
       onFetchData: function (criteria, requestProperties) {
+        var gridView = grid.view;
         requestProperties = requestProperties || {};
-        requestProperties.params = grid.getFetchRequestParams(requestProperties.params);
+        requestProperties.params = grid.getFetchRequestParams(requestProperties.params) || {};
+        if (gridView) {
+          requestProperties.params.tabId = gridView.tabId || (gridView.sourceView && gridView.sourceView.tabId);
+        }
         delete me.forceReload;
       },
 
@@ -152,6 +156,37 @@
     return this.Super('destroy', arguments);
   },
 
+  // When the selected value is part of the pickList the grid is already filtered,
+  // so no additional request is required. But when there is a keyword entered,
+  // the grid has to be filtered. Refer issue, https://issues.openbravo.com/view.php?id=26700.
+  handleEditorExit: function () {
+    var value = this.getValue(),
+        performFetch = false,
+        rows, i;
+    if (this.pickList && this.pickList.data && (this.pickList.data.allRows || this.pickList.data.localData)) {
+      rows = this.pickList.data.allRows || this.pickList.data.localData;
+    }
+    if (value && isc.isA.Array(value) && value.length > 0 && rows) {
+      for (i = 0; i < value.length; i++) {
+        if (value[i].indexOf('==') === 0) {
+          value[i] = value[i].substring(2, value[i].length);
+          if (rows.find('name', value[i]) === undefined) {
+            performFetch = true;
+          }
+        }
+      }
+    } else {
+      if (rows && rows.find('name', value)) {
+        performFetch = true;
+      }
+    }
+    if (performFetch) {
+      this.Super('handleEditorExit', arguments);
+    } else {
+      return value;
+    }
+  },
+
   // note: can't override changed as it is used by the filter editor 
   // itself, see the RecordEditor source code and the changed event
   change: function (form, item, value, oldValue) {
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-list-filter.js	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-list-filter.js	Fri Jun 13 09:13:47 2014 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2011-2013 Openbravo SLU
+ * All portions are Copyright (C) 2011-2014 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -59,6 +59,9 @@
           value[i] = value[i].substring(2, value[i].length);
         }
       }
+    } else {
+      // If no value is selected, deselect all
+      this.pickList.selection.deselectAll();
     }
     this.selectItemFromValue(value);
   },
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-list.js	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-list.js	Fri Jun 13 09:13:47 2014 +0200
@@ -77,11 +77,13 @@
     //adding double equals to filter the exact value and not all matching sub strings.
     //Refer issue https://issues.openbravo.com/view.php?id=24574.
     referenceType = isc.SimpleType.getType(this.type).editorType;
-    if (value && referenceType !== 'OBListItem') {
+    if (value && isc.isA.Array(value) && referenceType !== 'OBListItem') {
+      // value is an array when picking in a FK selector drop down
+      // add '==' if needed
       for (i = 0; i < value.length; i++) {
         //do not append when composite identifiers are present.
-        if (value[i].indexOf(" - ") === -1) {
-          value[i] = "==" + value[i];
+        if (value[i].indexOf(' - ') === -1) {
+          value[i] = '==' + value[i];
         }
       }
     }
@@ -151,8 +153,13 @@
 
     // not found add/create a new one
     entry[valueField] = id;
+
+    if (id && identifier) {
+      entry[OB.Constants.ID] = id;
+      entry[OB.Constants.IDENTIFIER] = identifier;
+    }
+
     entries.push(entry);
-
     this.setEntries(entries);
   },
 
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-number.js	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-number.js	Fri Jun 13 09:13:47 2014 +0200
@@ -548,6 +548,13 @@
     }
 
     ret = this.Super('parseValueExpressions', [value, fieldName, operator]);
+
+    // if operator is not supported remove it
+    if (!this.validOperators.contains(ret.operator)) {
+      ret.operator = '';
+      ret.value = '';
+      this.setValue('');
+    }
     if (ret && ret.start) {
       ret.start = this.convertToTypedValue(ret.start);
     }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-pickeditgrid.js	Fri Jun 13 09:13:47 2014 +0200
@@ -0,0 +1,130 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use. this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2014 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+
+
+// == OBPickEditGridItem ==
+isc.ClassFactory.defineClass('OBPickEditGridItem', isc.CanvasItem);
+
+isc.OBPickEditGridItem.addProperties({
+  rowSpan: 1,
+  colSpan: 4,
+  defaultFilter: null,
+
+  // validator at item level, check grid has no errors
+  validators: {
+    condition: function (item) {
+      var grid = item.canvas.viewGrid,
+          hasErrors = false,
+          undef, i, j, fields, selection, len, allRows, record, lineNumbers;
+      grid.endEditing();
+      fields = grid.getFields();
+      selection = grid.getSelectedRecords() || [];
+      len = selection.length;
+      allRows = grid.data.allRows || grid.data.localData || grid.data;
+      for (i = 0; i < len; i++) {
+        record = grid.getEditedRecord(grid.getRecordIndex(selection[i]));
+        for (j = 0; j < fields.length; j++) {
+          if (fields[j].required) {
+            if (record[fields[j].name] === null || record[fields[j].name] === '' || record[fields[j] === undef]) {
+              hasErrors = true;
+              if (lineNumbers === undef) {
+                lineNumbers = grid.getRecordIndex(selection[i]).toString();
+              } else {
+                lineNumbers = lineNumbers + ',' + grid.getRecordIndex(selection[i]).toString();
+              }
+            }
+          }
+        }
+      }
+      if (hasErrors) {
+        if (item.form.errorMessage) {
+          item.form.errorMessage = item.form.errorMessage + '. ' + item.title + ': ' + lineNumbers;
+        } else {
+          item.form.errorMessage = item.title + ': ' + lineNumbers;
+        }
+      }
+      return !(hasErrors || grid.hasErrors());
+    }
+  },
+
+  init: function () {
+    var me = this,
+        pickAndExecuteViewProperties = {};
+    pickAndExecuteViewProperties.viewProperties = this.viewProperties;
+    pickAndExecuteViewProperties.view = this.view;
+    pickAndExecuteViewProperties.parameterName = this.name;
+    if (this.view.isPickAndExecuteWindow) {
+      this.view.resized = function (messagebarVisible) {
+        if (messagebarVisible) {
+          me.canvas.setHeight(me.view.height - (95 + me.view.messageBar.height));
+        } else {
+          me.canvas.setHeight(me.view.height - 95);
+        }
+        me.canvas.redraw();
+      };
+    } else {
+      pickAndExecuteViewProperties.height = 45 + OB.Styles.Process.PickAndExecute.gridCellHeight * this.displayedRowsNumber;
+    }
+    this.canvas = isc.OBPickAndExecuteView.create(pickAndExecuteViewProperties);
+    this.Super('init', arguments);
+    this.selectionLayout = this.canvas;
+  },
+
+  getValue: function () {
+    var allProperties = {},
+        grid = this.canvas.viewGrid,
+        allRows, len, i, selection, tmp;
+    selection = grid.getSelectedRecords() || [];
+    len = selection.length;
+    allRows = grid.data.allRows || grid.data.localData || grid.data;
+    allProperties._selection = [];
+    allProperties._allRows = [];
+    for (i = 0; i < len; i++) {
+      tmp = isc.addProperties({}, selection[i], grid.getEditedRecord(grid.getRecordIndex(selection[i])));
+      allProperties._selection.push(tmp);
+    }
+    len = (allRows && allRows.length) || 0;
+    if (!(grid.data.resultSize) || (len < grid.data.resultSize)) {
+      for (i = 0; i < len; i++) {
+        tmp = isc.addProperties({}, allRows[i], grid.getEditedRecord(grid.getRecordIndex(allRows[i])));
+        allProperties._allRows.push(tmp);
+      }
+    }
+    return (allProperties);
+  },
+
+  setDisabled: function (newState) {
+    this.Super('setDisabled', arguments);
+    if (newState === true) {
+      this.setDisabled(false);
+      this.canvas.viewGrid.setCanEdit(false);
+    } else {
+      this.canvas.viewGrid.setCanEdit(true);
+    }
+  },
+
+  setDefaultFilter: function (defaultFilter) {
+    this.defaultFilter = defaultFilter;
+  },
+
+  destroy: function () {
+    this.canvas.destroy();
+    this.Super('destroy', arguments);
+  }
+});
\ No newline at end of file
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-text.js	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-text.js	Fri Jun 13 09:13:47 2014 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2011-2012 Openbravo SLU
+ * All portions are Copyright (C) 2011-2014 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -140,5 +140,14 @@
       return ret.replace('undefined', '');
     }
     return ret;
+  },
+
+  // Solve a small bug on iBetweenInclusive criteria
+  // See issue https://issues.openbravo.com/view.php?id=26504
+  setCriterion: function (criterion) {
+    if (criterion && (criterion.operator === 'iBetweenInclusive' || criterion.operator === 'betweenInclusive') && criterion.end.indexOf('ZZZZZZZZZZ') !== -1) {
+      criterion.end = criterion.end.substring(0, criterion.end.length - 10);
+    }
+    this.Super('setCriterion', arguments);
   }
 });
\ No newline at end of file
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-time.js	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-time.js	Fri Jun 13 09:13:47 2014 +0200
@@ -30,12 +30,7 @@
   operator: 'equals',
   validateOnExit: true,
   showHint: false,
-  timeFormatter: 'to24HourTime',
-  displayFormat: 'to24HourTime',
-  short24TimeFormat: 'HH:MM:SS',
-  shortTimeFormat: 'HH:MM:SS',
-  long24TimeFormat: 'HH:MM:SS',
-  longTimeFormat: 'HH:MM:SS',
+  timeFormatter: isc.Time.displayFormat,
 
   mapValueToDisplay: function (value) {
     var newValue = value;
@@ -146,7 +141,6 @@
   init: function () {
     var oldShowHint, hint, formatDefinition = OB.Utilities.getTimeFormatDefinition();
 
-    this.timeFormatter = formatDefinition.timeFormatter;
     this.timeFormat = formatDefinition.timeFormat;
 
     this.Super('init', arguments);
@@ -573,7 +567,7 @@
       this.precission = 'hour';
     }
 
-    if (this.timeFormat.toUpperCase().indexOf('AM') !== -1 || this.timeFormat.toUpperCase().indexOf('PM') !== -1) {
+    if (this.timeFormat.toUpperCase().indexOf(isc.Time.AMIndicator) !== -1 || this.timeFormat.toUpperCase().indexOf(isc.Time.PMIndicator) !== -1) {
       this.is24hTime = false;
     }
 
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-tree-filter.js	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-tree-filter.js	Fri Jun 13 09:13:47 2014 +0200
@@ -137,7 +137,7 @@
           if (jsonData.response.error) {
             dsResponse.error = jsonData.response.error;
           }
-          if (jsonData.response && jsonData.response.data) {
+          if (jsonData.response && jsonData.response.data && me.showNodeIcons) {
             for (i = 0; i < jsonData.response.data.length; i++) {
               node = jsonData.response.data[i];
               if (node.showDropIcon) {
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-tree.js	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-tree.js	Fri Jun 13 09:13:47 2014 +0200
@@ -294,7 +294,7 @@
       if (jsonData.response.error) {
         dsResponse.error = jsonData.response.error;
       }
-      if (jsonData.response && jsonData.response.data) {
+      if (jsonData.response && jsonData.response.data && me.showNodeIcons) {
         for (i = 0; i < jsonData.response.data.length; i++) {
           node = jsonData.response.data[i];
           if (node.showDropIcon) {
@@ -529,7 +529,7 @@
           if (jsonData.response.error) {
             dsResponse.error = jsonData.response.error;
           }
-          if (jsonData.response && jsonData.response.data) {
+          if (jsonData.response && jsonData.response.data && me.showNodeIcons) {
             for (i = 0; i < jsonData.response.data.length; i++) {
               node = jsonData.response.data[i];
               if (node.showDropIcon) {
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-onchange-registry.js	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-onchange-registry.js	Fri Jun 13 09:13:47 2014 +0200
@@ -68,7 +68,12 @@
   },
 
   getFieldEntry: function (tabId, item) {
-    var tabEntry, field = item.name;
+    var tabEntry, field;
+    if (item.grid && item.grid.parameterName) {
+      field = item.grid.parameterName + OB.Constants.FIELDSEPARATOR + item.name;
+    } else {
+      field = item.name;
+    }
     if (!this.registry[tabId]) {
       return;
     }
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js	Fri Jun 13 09:13:47 2014 +0200
@@ -150,8 +150,8 @@
         // if there is a display field or an identifier field accompanying the
         // status bar field and it has a value then always use that
         // one
-        if (item.displayField && this.getValue(item.displayField)) {
-          displayedValue = this.getValue(item.displayField);
+        if (item.displayField && this.getValue(item.name + OB.Constants.FIELDSEPARATOR + item.displayField)) {
+          displayedValue = this.getValue(item.name + OB.Constants.FIELDSEPARATOR + item.displayField);
         } else if (this.getValue(item.name + OB.Constants.FIELDSEPARATOR + OB.Constants.IDENTIFIER)) {
           displayedValue = this.getValue(item.name + OB.Constants.FIELDSEPARATOR + OB.Constants.IDENTIFIER);
         }
@@ -783,7 +783,7 @@
     if (columnValues) {
       for (prop in columnValues) {
         if (columnValues.hasOwnProperty(prop)) {
-          this.processColumnValue(prop, columnValues[prop], gridEditInformation);
+          this.processColumnValue(prop, columnValues[prop], gridEditInformation, request.params.MODE);
         }
       }
     }
@@ -859,6 +859,7 @@
 
     length = this.getFields().length;
 
+    this.view.handleDefaultTreeView();
     //Updates the visibility of the tabs before they are shown to the client
     this.view.updateSubtabVisibility();
 
@@ -957,7 +958,7 @@
     this.fetchData(criteria);
   },
 
-  processColumnValue: function (columnName, columnValue, gridEditInformation) {
+  processColumnValue: function (columnName, columnValue, gridEditInformation, mode) {
     // Modifications in this method should go also in setColumnValuesInEditValues because both almost do the same
     var typeInstance;
     var assignValue;
@@ -987,6 +988,13 @@
       return;
     }
 
+    // combos for table and tableDir require cache to be invalidated whenever
+    // value is set in order to force DS request when pickList is opened because
+    // validation might have been changed in this situation
+    if (field.invalidateLocalValueMapCache) {
+      field.invalidateLocalValueMapCache();
+    }
+
     // note field can be a datasource field, see above, in that case
     // don't set the entries    
     if (field.form && entries && field.setEntries) {
@@ -1142,6 +1150,13 @@
       return;
     }
 
+    // combos for table and tableDir require cache to be invalidated whenever
+    // value is set in order to force DS request when pickList is opened because
+    // validation might have been changed in this situation
+    if (field && field.invalidateLocalValueMapCache) {
+      field.invalidateLocalValueMapCache();
+    }
+
     if (entries) {
       length = entries.length;
       for (i = 0; i < length; i++) {
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-grid.js	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-grid.js	Fri Jun 13 09:13:47 2014 +0200
@@ -777,10 +777,14 @@
     }
   },
 
-  checkShowFilterFunnelIcon: function (criteria) {
+  checkShowFilterFunnelIcon: function (criteria, messageBar) {
     if (!this.filterImage) {
       return;
     }
+    // if no message bar is provided, use the message bar of the view 
+    if (!messageBar && this.view && this.view.messageBar) {
+      messageBar = this.view.messageBar;
+    }
     var gridIsFiltered = this.isGridFiltered(criteria);
     var noParentOrParentSelected = !this.view || !this.view.parentView || (this.view.parentView.viewGrid.getSelectedRecords() && this.view.parentView.viewGrid.getSelectedRecords().length > 0);
 
@@ -789,10 +793,10 @@
       this.filterImage.show(true);
       this.setSingleRecordFilterMessage();
       return;
-    } else if (this.filterClause && gridIsFiltered) {
+    } else if ((this.filterClause || this.sqlFilterClause) && gridIsFiltered) {
       this.filterImage.prompt = OB.I18N.getLabel('OBUIAPP_GridFilterBothToolTip');
       this.filterImage.show(true);
-    } else if (this.filterClause) {
+    } else if (this.filterClause || this.sqlFilterClause) {
       this.filterImage.prompt = OB.I18N.getLabel('OBUIAPP_GridFilterImplicitToolTip');
       this.filterImage.show(true);
     } else if (gridIsFiltered) {
@@ -806,12 +810,12 @@
       this.filterImage.hide();
     }
 
-    if (this.filterClause && !this.view.isShowingForm && (this.view.messageBar && !this.view.messageBar.isVisible())) {
+    if ((this.filterClause || this.sqlFilterClause) && !this.view.isShowingForm && (messageBar && !messageBar.isVisible())) {
       var showMessageProperty = OB.PropertyStore.get('OBUIAPP_ShowImplicitFilterMsg'),
           showMessage = (showMessageProperty !== 'N' && showMessageProperty !== '"N"' && noParentOrParentSelected);
       if (showMessage) {
-        this.view.messageBar.setMessage(isc.OBMessageBar.TYPE_INFO, '<div><div class="' + OB.Styles.MessageBar.leftMsgContainerStyle + '">' + this.filterName + '<br/>' + OB.I18N.getLabel('OBUIAPP_ClearFilters') + '</div><div class="' + OB.Styles.MessageBar.rightMsgContainerStyle + '"><a href="#" class="' + OB.Styles.MessageBar.rightMsgTextStyle + '" onclick="' + 'window[\'' + this.view.messageBar.ID + '\'].hide(); OB.PropertyStore.set(\'OBUIAPP_ShowImplicitFilterMsg\', \'N\');">' + OB.I18N.getLabel('OBUIAPP_NeverShowMessageAgain') + '</a></div></div>', ' ');
-        this.view.messageBar.hasFilterMessage = true;
+        messageBar.setMessage(isc.OBMessageBar.TYPE_INFO, '<div><div class="' + OB.Styles.MessageBar.leftMsgContainerStyle + '">' + this.filterName + '<br/>' + OB.I18N.getLabel('OBUIAPP_ClearFilters') + '</div><div class="' + OB.Styles.MessageBar.rightMsgContainerStyle + '"><a href="#" class="' + OB.Styles.MessageBar.rightMsgTextStyle + '" onclick="' + 'window[\'' + this.view.messageBar.ID + '\'].hide(); OB.PropertyStore.set(\'OBUIAPP_ShowImplicitFilterMsg\', \'N\');">' + OB.I18N.getLabel('OBUIAPP_NeverShowMessageAgain') + '</a></div></div>', ' ');
+        messageBar.hasFilterMessage = true;
       }
     }
   },
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-tree-grid.js	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-tree-grid.js	Fri Jun 13 09:13:47 2014 +0200
@@ -24,6 +24,7 @@
 isc.OBTreeGrid.addProperties({
   showOpenIcons: true,
   showDropIcons: false,
+  showNodeIcons: true,
   openerImage: OB.Styles.skinsPath + 'Default/org.openbravo.client.application/images/tree-grid/iconTree.png',
   openerIconSize: 16,
   showCustomIconOpen: true,
@@ -166,7 +167,7 @@
         record = data[i];
         for (j = 0; j < dateFields.length; j++) {
           fieldName = dateFields[j];
-          if (!isc.isA.Date(record[fieldName]) && isc.isA.Date(isc.Date.parseSchemaDate(record[fieldName]))) {
+          if (record[fieldName] && !isc.isA.Date(record[fieldName]) && isc.isA.Date(isc.Date.parseSchemaDate(record[fieldName]))) {
             record[fieldName] = isc.Date.parseSchemaDate(record[fieldName]);
           }
         }
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-tree-view-grid.js	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-tree-view-grid.js	Fri Jun 13 09:13:47 2014 +0200
@@ -82,7 +82,7 @@
 
   // Sets the fields of the datasource and extends the transformRequest and transformResponse functions
   setDataSource: function (ds, fields) {
-    var me = this;
+    var ret, me = this;
     ds.transformRequest = function (dsRequest) {
       dsRequest.params = dsRequest.params || {};
       dsRequest.params._startRow = 0;
@@ -112,7 +112,7 @@
       if (jsonData.response.error) {
         dsResponse.error = jsonData.response.error;
       }
-      if (jsonData.response && jsonData.response.data) {
+      if (jsonData.response && jsonData.response.data && me.showNodeIcons) {
         for (i = 0; i < jsonData.response.data.length; i++) {
           node = jsonData.response.data[i];
           if (node.showDropIcon) {
@@ -152,7 +152,11 @@
     ds.primaryKeys = {
       id: 'id'
     };
-    return this.Super('setDataSource', [ds, fields]);
+    ret = this.Super('setDataSource', [ds, fields]);
+    if (isc.isA.Function(this.view.executeWhenTreeGridDSReady)) {
+      this.view.executeWhenTreeGridDSReady();
+    }
+    return ret;
   },
 
   // Used to copy the fields from the OBViewGrid to the OBTreeViewGrid.
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js	Fri Jun 13 09:13:47 2014 +0200
@@ -1584,11 +1584,16 @@
       // ui-pattern: single record/edit mode
       this.view.openDefaultEditView(this.getRecord(startRow));
     } else if (this.data && this.data.getLength() === 1) {
-      // one record select it directly
-      record = this.getRecord(0);
-      // this select method prevents state changing if the record
-      // was already selected
-      this.doSelectSingleRecord(record);
+
+      // Prevent the selection of an old record
+      // See issue https://issues.openbravo.com/view.php?id=26679
+      if (!this.view.viewForm.isNew) {
+        // one record select it directly
+        record = this.getRecord(0);
+        // this select method prevents state changing if the record
+        // was already selected
+        this.doSelectSingleRecord(record);
+      }
 
       // Call to updateButtonState to force a call to the FIC in setsession mode
       // See issue https://issues.openbravo.com/view.php?id=22655
@@ -1933,6 +1938,10 @@
               shouldRemove = true;
             }
           }
+        } else if (criterion.fieldName === this.view.parentProperty + OB.Constants.FIELDSEPARATOR + OB.Constants.IDENTIFIER && criterion.operator === 'iEquals') {
+          // Prevent the filtering of a parent column if it is shown on grid
+          // See issue https://issues.openbravo.com/view.php?id=26767
+          shouldRemove = true;
         }
 
         if (shouldRemove) {
@@ -1947,13 +1956,19 @@
           }
 
           for (j = 0; j < this.fields.length; j++) {
-            if (this.fields[j].name === fieldName && isc.SimpleType.getType(this.fields[j].type).inheritsFrom === 'datetime') {
-              if (criteria.criteria[i].criteria) {
-                for (k = 0; k < criteria.criteria[i].criteria.length; k++) {
-                  criteria.criteria[i].criteria[k].minutesTimezoneOffset = currentTimeZoneOffsetInMinutes;
+            if (this.fields[j].name === fieldName) {
+              if (isc.SimpleType.getType(this.fields[j].type).inheritsFrom === 'datetime') {
+                if (criteria.criteria[i].criteria) {
+                  for (k = 0; k < criteria.criteria[i].criteria.length; k++) {
+                    criteria.criteria[i].criteria[k].minutesTimezoneOffset = currentTimeZoneOffsetInMinutes;
+                  }
+                } else {
+                  criteria.criteria[i].minutesTimezoneOffset = currentTimeZoneOffsetInMinutes;
                 }
-              } else {
-                criteria.criteria[i].minutesTimezoneOffset = currentTimeZoneOffsetInMinutes;
+              } else if (isc.SimpleType.getType(this.fields[j].type).inheritsFrom === 'text' && (criterion.operator === 'iBetweenInclusive' || criterion.operator === 'betweenInclusive') && criterion.end.indexOf('ZZZZZZZZZZ') === -1) {
+                // Fix of iBetweenInclusive criteria
+                // See issue https://issues.openbravo.com/view.php?id=26504
+                criterion.end = criterion.end + 'ZZZZZZZZZZ';
               }
               break;
             }
@@ -2872,7 +2887,7 @@
     this.view.standardWindow.autoSaveDone(this.view, true);
 
     // if nothing else got selected, select ourselves then
-    if (!this.getSelectedRecord()) {
+    if (!this.getSelectedRecord() || (this.getSelectedRecord().id === record._originalId)) {
       this.selectRecord(record);
       keepSelection = true;
       this.view.refreshChildViews(keepSelection);
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js	Fri Jun 13 09:13:47 2014 +0200
@@ -264,7 +264,16 @@
 
     this.toolBar.updateButtonState(true, false, true);
 
+    // It will only enter if this is a lazy initialized tab
+    // this.standardWindow.getClass().uiPattern will only exists after setWindowSettings is executed
+    if (this.standardWindow.getClass().uiPattern) {
+      this.setReadOnly(this.standardWindow.getClass().uiPattern[this.tabId] === isc.OBStandardView.UI_PATTERN_READONLY);
+      this.setSingleRecord(this.standardWindow.getClass().uiPattern[this.tabId] === isc.OBStandardView.UI_PATTERN_SINGLERECORD);
+      this.setEditOrDeleteOnly(this.standardWindow.getClass().uiPattern[this.tabId] === isc.OBStandardView.UI_PATTERN_EDITORDELETEONLY);
+    }
+
     // Update the subtab visibility before the tabs are shown to the client
+    this.handleDefaultTreeView();
     this.updateSubtabVisibility();
   },
 
@@ -380,6 +389,54 @@
 
   },
 
+  handleDefaultTreeView: function (parentContextInfo) {
+    var contextInfo, tabViewPane, length, i, p;
+    contextInfo = this.getContextInfo(false, true, true);
+
+    for (p in parentContextInfo) {
+      // While evaluating the 'defaultTreeViewLogicIf' the parent contextInfo is needed
+      // because based on the parent selected record, the current view will be shown
+      // in tree view or in grid view mode.
+      if (parentContextInfo.hasOwnProperty(p)) {
+        contextInfo[p] = parentContextInfo[p];
+      }
+    }
+
+    if (this.treeGrid && isc.isA.Function(this.defaultTreeViewLogicIf)) {
+      if (this.defaultTreeViewLogicIf(contextInfo)) {
+        if (!this.isShowingTree) {
+          if (this.treeGrid.getDataSource()) {
+            OB.ToolbarUtils.showTreeGrid(this);
+          } else {
+            this.defaultTreeView = true;
+          }
+        }
+      } else if (this.isShowingTree) {
+        OB.ToolbarUtils.hideTreeGrid(this);
+      }
+    }
+
+    if (this.childTabSet) {
+      length = this.childTabSet.tabs.length;
+      for (i = 0; i < length; i++) {
+        tabViewPane = this.childTabSet.tabs[i].pane;
+        if (tabViewPane.handleDefaultTreeView) {
+          this.addPreferenceValues(contextInfo, tabViewPane);
+          tabViewPane.handleDefaultTreeView(contextInfo);
+        }
+      }
+    }
+  },
+
+  executeWhenTreeGridDSReady: function () {
+    if (this.defaultTreeView) {
+      // If the default visualization of the tab is the tree grid, it needs to be shown after
+      // the tree grid datasource has been set. That's why it is handled here.
+      this.handleDefaultTreeView();
+      delete this.defaultTreeView;
+    }
+  },
+
   // handles different ways by which an error can be passed from the 
   // system, translates this to an object with a type, title and message
   setErrorMessageFromResponse: function (resp, data, req) {
@@ -511,14 +568,13 @@
         }
       });
 
-      // the grid should not show the image fields
-      // see issue 20049 (https://issues.openbravo.com/view.php?id=20049)
-      completeFieldsWithoutImages = this.removeImageFields(this.viewGrid.completeFields);
-      fieldsWithoutImages = this.removeImageFields(this.viewGrid.fields);
-
-      this.viewGrid.setDataSource(this.dataSource, completeFieldsWithoutImages || fieldsWithoutImages);
-
       if (this.viewGrid) {
+        // the grid should not show the image fields
+        // see issue 20049 (https://issues.openbravo.com/view.php?id=20049)
+        completeFieldsWithoutImages = this.removeImageFields(this.viewGrid.completeFields);
+        fieldsWithoutImages = this.removeImageFields(this.viewGrid.fields);
+
+        this.viewGrid.setDataSource(this.dataSource, completeFieldsWithoutImages || fieldsWithoutImages);
         this.viewGrid.setWidth('100%');
         this.viewGrid.setView(this);
         this.formGridLayout.addMember(this.viewGrid);
@@ -527,6 +583,8 @@
       if (this.treeGrid) {
         this.treeGrid.setWidth('100%');
         this.treeGrid.setView(this);
+        // The following method sets the tree grid datasource in an asynchronous way.
+        // In order to execute actions once it has been set, use the 'executeWhenTreeGridDSReady' function.
         OB.Datasource.get(this.treeGrid.dataSourceId, this.treeGrid, null, true);
         this.treeGrid.hide();
         this.formGridLayout.addMember(this.treeGrid);
@@ -1529,6 +1587,7 @@
 
     // Update the tab visibility after a record has been selected and its session
     // attributes have been updated
+    this.handleDefaultTreeView();
     this.updateSubtabVisibility();
 
     // If the record has been automatically selected because was the only record in the header tab,
@@ -1959,6 +2018,7 @@
             }
             me.viewForm.view.attachmentExists = attachmentExists;
             //compute and apply tab display logic again after fetching auxilary inputs.
+            me.handleDefaultTreeView();
             me.updateSubtabVisibility();
           });
         }
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js	Fri Jun 13 09:13:47 2014 +0200
@@ -717,9 +717,10 @@
         saveCallback;
 
     saveCallback = function (ok) {
+      var dirtyEditForm = me.getDirtyEditForm();
       if (!ok) {
-        if (me.getDirtyEditForm()) {
-          me.getDirtyEditForm().resetForm();
+        if (dirtyEditForm) {
+          dirtyEditForm.resetForm();
         }
         if (action) {
           OB.Utilities.callAction(action);
@@ -727,8 +728,21 @@
         return;
       }
 
+      // If me.getDirtyEditForm() is undefined -> only for new created records that have not been modified
+      // See issue https://issues.openbravo.com/view.php?id=26628
+      if (!dirtyEditForm) {
+        if (me.activeView && !me.activeView.isShowingForm) {
+          // Look if the record is new
+          if (me.activeView.viewGrid.getEditForm() && me.activeView.viewGrid.getEditForm().isNew) {
+            // Set a new dirtyEditForm
+            dirtyEditForm = me.activeView.viewGrid.getEditForm();
+          }
+        }
+      }
+
+
       // if not dirty or we know that the object has errors
-      if (!me.getDirtyEditForm() || (me.getDirtyEditForm() && !me.getDirtyEditForm().validateForm())) {
+      if (!dirtyEditForm || (dirtyEditForm && !dirtyEditForm.validateForm())) {
         // clean up before calling the action, as the action
         // can set dirty form again
         me.cleanUpAutoSaveProperties();
@@ -754,7 +768,7 @@
 
       me.isAutoSaving = true;
       me.forceDialogOnFailure = forceDialogOnFailure;
-      me.getDirtyEditForm().autoSave();
+      dirtyEditForm.autoSave();
     };
 
     if (this.getClass().autoSave && this.getClass().showAutoSaveConfirmation) {
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/personalization/ob-manage-views.js	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/personalization/ob-manage-views.js	Fri Jun 13 09:13:47 2014 +0200
@@ -98,7 +98,7 @@
 // ** {{{OB.Personalization.applyViewDefinition}}} **
 // Apply a selected view definition to a window
 OB.Personalization.applyViewDefinition = function (persId, viewDefinition, standardWindow) {
-  var i, view, viewTabDefinition, length = standardWindow.views.length,
+  var i, view, viewTabDefinition, showTreeGrid, length = standardWindow.views.length,
       windowDefinition = viewDefinition.window;
 
   // delete the current form personalization 
@@ -150,11 +150,16 @@
     view = standardWindow.views[i];
     viewTabDefinition = viewDefinition[view.tabId];
     if (viewTabDefinition) {
+      if (viewTabDefinition.viewMode === 'tree' && view.treeGrid) {
+        showTreeGrid = true;
+      } else {
+        showTreeGrid = false;
+      }
       if (view.childTabSet && viewTabDefinition.selectedTab) {
         view.childTabSet.selectTab(viewTabDefinition.selectedTab);
       }
       if (view.isRootView || view.isRenderedChildView) {
-        OB.Personalization.applyViewDefinitionToView(view, viewTabDefinition);
+        OB.Personalization.applyViewDefinitionToView(view, viewTabDefinition, showTreeGrid);
       } else {
         // If the view has not been rendered yet, store the 'initialTabDefinition' to be able
         // to set the proper view definition as soon as the view be loaded.
@@ -166,7 +171,7 @@
 
 // ** {{{OB.Personalization.applyViewDefinitionToView}}} **
 // Apply a passed view definition to a particular view
-OB.Personalization.applyViewDefinitionToView = function (view, viewTabDefinition) {
+OB.Personalization.applyViewDefinitionToView = function (view, viewTabDefinition, showTreeGrid) {
   if (!view || !viewTabDefinition) {
     return;
   }
@@ -178,12 +183,8 @@
   // if there is no record selected etc.
   if (view.isShowingForm) {
     view.switchFormGridVisibility();
-  } else if (view.isShowingTree) {
-    if (view.viewGrid && view.treeGrid) {
-      view.viewGrid.show();
-      view.treeGrid.hide();
-    }
-    view.isShowingTree = false;
+  } else if (view.isShowingTree && !showTreeGrid) {
+    OB.ToolbarUtils.hideTreeGrid(view);
   }
 
   if (viewTabDefinition.grid) {
@@ -197,6 +198,12 @@
       view.viewGrid.refreshContents();
     }
   }
+  if (showTreeGrid) {
+    // Execute 'OB.ToolbarUtils.showTreeGrid' even if the tree grid is already shown because this function
+    // also copies some configuration (criteria, ...) of the grid to the tree grid. This is needed because
+    // the grid state has changed just before in the line 'view.viewGrid.setViewState(viewTabDefinition.grid)'
+    OB.ToolbarUtils.showTreeGrid(view);
+  }
   if (viewTabDefinition.form && view.viewForm.getDataSource()) {
     OB.Personalization.personalizeForm(viewTabDefinition, view.viewForm);
   }
@@ -231,8 +238,9 @@
       if (view.isShowingTree) {
         // Copy the criteria from the tree grid to the view grid
         view.treeGrid.copyCriteriaToViewGrid();
+        persDataByTab.viewMode = 'tree';
       }
-      // ahd the grid state
+      // and the grid state
       persDataByTab.grid = view.viewGrid.getViewState(false, true);
 
       if (view.childTabSet && view.childTabSet.getSelectedTabNumber() >= 0) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-parameter-window-form.js	Fri Jun 13 09:13:47 2014 +0200
@@ -0,0 +1,62 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use. this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2014 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+
+isc.ClassFactory.defineClass('OBParameterWindowForm', isc.DynamicForm);
+
+// = OBParameterWindowForm =
+// The OBParameterWindowForm is the DynamicForm used in the OBParameterWindowView
+isc.OBParameterWindowForm.addProperties({
+  paramWindow: null,
+  width: '99%',
+  titleSuffix: '',
+  requiredTitleSuffix: '',
+  autoFocus: true,
+  titleOrientation: 'top',
+  numCols: 4,
+  showErrorIcons: false,
+  colWidths: ['*', '*', '*', '*'],
+  itemChanged: function (item, newValue) {
+    this.paramWindow.handleReadOnlyLogic();
+    this.paramWindow.handleDisplayLogicForGridColumns();
+    this.paramWindow.okButton.setEnabled(this.paramWindow.allRequiredParametersSet());
+  },
+
+  // this function is invoked on the blur action of the formitems
+  // this is the proper place to execute the client-side callouts
+  handleItemChange: function (item) {
+    var affectedParams, i, field;
+    // Execute onChangeFunctions if they exist
+    if (this && OB.OnChangeRegistry.hasOnChange(this.paramWindow.viewId, item)) {
+      OB.OnChangeRegistry.call(this.paramWindow.viewId, item, this.paramWindow, this, this.paramWindow.viewGrid);
+    }
+    // Check validation rules (subordinated fields), when value of a
+    // parent field is changed, all its subordinated are reset
+    affectedParams = this.paramWindow.dynamicColumns[item.name];
+    if (!affectedParams) {
+      return;
+    }
+    for (i = 0; i < affectedParams.length; i++) {
+      field = this.getField(affectedParams[i]);
+      if (field && field.setValue) {
+        field.setValue(null);
+        this.itemChanged(field, null);
+      }
+    }
+  }
+});
\ No newline at end of file
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-parameter-window-view.js	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-parameter-window-view.js	Fri Jun 13 09:13:47 2014 +0200
@@ -50,53 +50,31 @@
   initWidget: function () {
     var i, field, items = [],
         buttonLayout = [],
-        okButton, newButton, cancelButton, view = this,
-        newShowIf, params;
+        newButton, cancelButton, view = this,
+        newShowIf, params, updatedExpandSection;
+
 
     // Buttons
 
     function actionClick() {
-      var hasErrors = false,
-          grid, fields, selection, len, allRows, lineNumbers, i, j, record, undef;
       view.messageBar.hide();
-      if (view.grid && view.grid.viewGrid) {
-        grid = view.grid.viewGrid;
-        fields = grid.getFields();
-        selection = grid.getSelectedRecords() || [];
-        len = selection.length;
-        allRows = grid.data.allRows || grid.data.localData || grid.data;
-        for (i = 0; i < len; i++) {
-          record = grid.getEditedRecord(grid.getRecordIndex(selection[i]));
-          for (j = 0; j < fields.length; j++) {
-            if (fields[j].required) {
-              if (record[fields[j].name] === null || record[fields[j] === undef]) {
-                hasErrors = true;
-                if (lineNumbers === undef) {
-                  lineNumbers = grid.getRecordIndex(selection[i]).toString();
-                } else {
-                  lineNumbers = lineNumbers + "," + grid.getRecordIndex(selection[i]).toString();
-                }
-              }
-            }
+      view.theForm.errorMessage = '';
+      if (view.validate()) {
+        view.doProcess(this._buttonValue);
+      } else {
+        // If the messageBar is visible, it means that it has been set due to a custom validation inside view.validate()
+        // so we don't want to overwrite it with the generic OBUIAPP_ErrorInFields message
+        if (!view.messageBar.isVisible()) {
+          if (view.theForm.errorMessage) {
+            view.messageBar.setMessage(isc.OBMessageBar.TYPE_ERROR, null, OB.I18N.getLabel('OBUIAPP_FillMandatoryFields') + ' ' + view.theForm.errorMessage);
+          } else {
+            view.messageBar.setMessage(isc.OBMessageBar.TYPE_ERROR, null, OB.I18N.getLabel('OBUIAPP_ErrorInFields'));
           }
         }
       }
-      if (!hasErrors) {
-        if (view.validate()) {
-          view.doProcess(this._buttonValue);
-        } else {
-          // If the messageBar is visible, it means that it has been set due to a custom validation inside view.validate()
-          // so we don't want to overwrite it with the generic OBUIAPP_ErrorInFields message
-          if (!view.messageBar.isVisible()) {
-            view.messageBar.setMessage(isc.OBMessageBar.TYPE_ERROR, null, OB.I18N.getLabel('OBUIAPP_ErrorInFields'));
-          }
-        }
-      } else {
-        view.messageBar.setMessage(isc.OBMessageBar.TYPE_ERROR, null, OB.I18N.getLabel('OBUIAPP_FillMandatoryFields') + " " + lineNumbers);
-      }
     }
 
-    okButton = isc.OBFormButton.create({
+    this.okButton = isc.OBFormButton.create({
       title: OB.I18N.getLabel('OBUIAPP_Done'),
       realTitle: '',
       _buttonValue: 'DONE',
@@ -129,8 +107,8 @@
         }
       }
     } else {
-      buttonLayout.push(okButton);
-      OB.TestRegistry.register('org.openbravo.client.application.process.pickandexecute.button.ok', okButton);
+      buttonLayout.push(this.okButton);
+      OB.TestRegistry.register('org.openbravo.client.application.process.pickandexecute.button.ok', this.okButton);
       if (this.popup) {
         buttonLayout.push(isc.LayoutSpacer.create({
           width: 32
@@ -164,29 +142,65 @@
     // Message bar
     this.messageBar = isc.OBMessageBar.create({
       visibility: 'hidden',
-      view: this
+      view: this,
+      show: function () {
+        var showMessageBar = true;
+        this.Super('show', arguments);
+        view.resized(showMessageBar);
+      },
+      hide: function () {
+        var showMessageBar = false;
+        this.Super('hide', arguments);
+        view.resized(showMessageBar);
+      }
     });
     this.members.push(this.messageBar);
 
     newShowIf = function (item, value, form, values) {
-      var currentValues = isc.shallowClone(values || form.view.getCurrentValues()),
-          context = {},
-          originalShowIfValue = false;
+      var currentValues, originalShowIfValue = false,
+          parentContext;
 
+      currentValues = isc.shallowClone(values) || {};
+      if (isc.isA.emptyObject(currentValues) && form && form.view) {
+        currentValues = isc.shallowClone(form.view.getCurrentValues());
+      } else if (isc.isA.emptyObject(currentValues) && form && form.getValues) {
+        currentValues = isc.shallowClone(form.getValues());
+      }
       OB.Utilities.fixNull250(currentValues);
+      parentContext = (this.view.sourceView && this.view.sourceView.getContextInfo(false, true, true, true)) || {};
 
       try {
         if (isc.isA.Function(this.originalShowIf)) {
-          originalShowIfValue = this.originalShowIf(item, value, form, currentValues, context);
+          originalShowIfValue = this.originalShowIf(item, value, form, currentValues, parentContext);
         } else {
           originalShowIfValue = isc.JSON.decode(this.originalShowIf);
         }
       } catch (_exception) {
         isc.warn(_exception + ' ' + _exception.message + ' ' + _exception.stack);
       }
+      if (originalShowIfValue && item.defaultFilter !== null && item.getType() === 'OBPickEditGridItem') {
+        item.canvas.viewGrid.setFilterEditorCriteria(item.defaultFilter);
+        item.canvas.viewGrid.filterByEditor();
+      }
+      if (this.view && this.view.theForm) {
+        this.view.theForm.markForRedraw();
+      }
       return originalShowIfValue;
     };
 
+    // this function is only used in OBSectionItems that are collapsed originally
+    // this is done to force the data fetch of its stored OBPickEditGridItems
+    updatedExpandSection = function () {
+      var i, itemName, item;
+      this.originalExpandSection();
+      for (i = 0; i < this.itemIds.length; i++) {
+        itemName = this.itemIds[i];
+        item = this.form.getItem(itemName);
+        if (item.type === 'OBPickEditGridItem' && !isc.isA.ResultSet(item.canvas.viewGrid.data)) {
+          item.canvas.viewGrid.fetchData(item.canvas.viewGrid.getCriteria());
+        }
+      }
+    };
     // Parameters
     if (this.viewProperties.fields) {
       for (i = 0; i < this.viewProperties.fields.length; i++) {
@@ -199,56 +213,42 @@
           field.originalShowIf = field.showIf;
           field.showIf = newShowIf;
         }
-        if (field.isGrid) {
-          this.grid = isc.OBPickAndExecuteView.create(field);
-        } else {
-          items.push(field);
+        if (field.onChangeFunction) {
+          // the default
+          field.onChangeFunction.sort = 50;
+
+          OB.OnChangeRegistry.register(this.viewId, field.name, field.onChangeFunction, 'default');
         }
+
+        if (field.type === 'OBSectionItem' && !field.sectionExpanded) {
+          // modifies the expandSection function of OBSectionItems collapsed originally to avoid having 
+          // unloaded grids when a section is expanded for the first time
+          field.originalExpandSection = isc.OBSectionItem.getPrototype().expandSection;
+          field.expandSection = updatedExpandSection;
+        }
+        items.push(field);
+
       }
 
       if (items.length !== 0) {
         // create form if there items to include
-        this.theForm = isc.DynamicForm.create({
-          paramWindow: this,
-          width: '99%',
-          titleSuffix: '',
-          requiredTitleSuffix: '',
-          autoFocus: true,
-          titleOrientation: 'top',
-          numCols: 4,
-          showErrorIcons: false,
-          colWidths: ['*', '*', '*', '*'],
-          itemChanged: function (item, newValue) {
-            var affectedParams, i, field;
-
-            this.paramWindow.handleReadOnlyLogic();
-
-            // Check validation rules (subordinated fields), when value of a
-            // parent field is changed, all its subordinated are reset
-            affectedParams = this.paramWindow.dynamicColumns[item.name];
-            if (!affectedParams) {
-              return;
-            }
-            for (i = 0; i < affectedParams.length; i++) {
-              field = this.getField(affectedParams[i]);
-              if (field && field.setValue) {
-                field.setValue(null);
-              }
-            }
-          }
+        this.theForm = isc.OBParameterWindowForm.create({
+          paramWindow: this
         });
-
+        // If there is only one paremeter, it is a grid and the window is opened in a popup, then the window is a P&E window
+        if (items && items.length === 1 && items[0].type === 'OBPickEditGridItem' && this.popup) {
+          this.isPickAndExecuteWindow = true;
+        }
         this.theForm.setItems(items);
-        this.members.push(this.theForm);
+        this.formContainerLayout = isc.OBFormContainerLayout.create({});
+        this.formContainerLayout.addMember(this.theForm);
+        this.members.push(this.formContainerLayout);
       }
     }
-    if (this.grid) {
-      this.members.push(this.grid);
-    }
 
 
     if (this.popup) {
-      this.firstFocusedItem = okButton;
+      this.firstFocusedItem = this.okButton;
       this.popupButtons = isc.HLayout.create({
         align: 'center',
         width: '100%',
@@ -392,13 +392,6 @@
         return validForm;
       }
     }
-
-    if (this.grid) {
-      viewGrid = this.grid.viewGrid;
-
-      viewGrid.endEditing();
-      return !viewGrid.hasErrors();
-    }
     return true;
   },
 
@@ -408,9 +401,6 @@
       if (this.theForm) {
         this.theForm.hide();
       }
-      if (this.grid) {
-        this.grid.hide();
-      }
       if (this.popupButtons) {
         this.popupButtons.hide();
       }
@@ -428,9 +418,6 @@
       if (this.theForm) {
         this.theForm.show();
       }
-      if (this.grid) {
-        this.grid.show();
-      }
 
       this.loading.hide();
     }
@@ -439,7 +426,7 @@
   doProcess: function (btnValue) {
     var i, tmp, view = this,
         grid, allProperties = (this.sourceView && this.sourceView.getContextInfo(false, true, false, true)) || {},
-        selection, len, allRows, params, tab;
+        selection, len, allRows, params, tab, actionHandlerCall;
     // activeView = view.parentWindow && view.parentWindow.activeView,  ???.
     if (this.resultLayout && this.resultLayout.destroy) {
       this.resultLayout.destroy();
@@ -453,44 +440,31 @@
       tab.setTitle(OB.I18N.getLabel('OBUIAPP_ProcessTitle_Executing', [this.tabTitle]));
     }
 
-    if (this.grid) {
-      // TODO: Support for multiple grids
-      grid = this.grid.viewGrid;
-      selection = grid.getSelectedRecords() || [];
-      len = selection.length;
-      allRows = grid.data.allRows || grid.data.localData || grid.data;
-      allProperties._selection = [];
-      allProperties._allRows = [];
-
-      for (i = 0; i < len; i++) {
-        tmp = isc.addProperties({}, selection[i], grid.getEditedRecord(grid.getRecordIndex(selection[i])));
-        allProperties._selection.push(tmp);
-      }
-
-      len = (allRows && allRows.length) || 0;
-      // Only send _allRows if all rows are cached
-      if (!(grid.data.resultSize) || (len < grid.data.resultSize)) {
-        for (i = 0; i < len; i++) {
-          tmp = isc.addProperties({}, allRows[i], grid.getEditedRecord(grid.getRecordIndex(allRows[i])));
-          allProperties._allRows.push(tmp);
-        }
-      }
-    }
-
     allProperties._buttonValue = btnValue || 'DONE';
 
     allProperties._params = this.getContextInfo();
 
-    OB.RemoteCallManager.call(this.actionHandler, allProperties, {
-      processId: this.processId,
-      windowId: this.windowId
-    }, function (rpcResponse, data, rpcRequest) {
-      view.handleResponse(true, (data && data.message), (data && data.responseActions), (data && data.retryExecution), data);
-    });
+    actionHandlerCall = function (me) {
+      OB.RemoteCallManager.call(me.actionHandler, allProperties, {
+        processId: me.processId,
+        windowId: me.windowId
+      }, function (rpcResponse, data, rpcRequest) {
+        view.handleResponse(true, (data && data.message), (data && data.responseActions), (data && data.retryExecution), data);
+      });
+    };
+
+    if (this.clientSideValidation) {
+      this.clientSideValidation(this, actionHandlerCall);
+    } else {
+      actionHandlerCall(this);
+    }
   },
 
-  handleDefaults: function (defaults) {
-    var i, field, def;
+  handleDefaults: function (result) {
+    var i, field, def, defaults = result.defaults,
+        filterExpressions = result.filterExpressions,
+        defaultFilter = {},
+        gridsToBeFiltered = [];
     if (!this.theForm) {
       return;
     }
@@ -507,20 +481,82 @@
               field.setValue(def.value);
             }
           } else {
-            field.setValue(def);
+            field.setValue(this.getTypeSafeValue(field.typeInstance, def));
           }
         }
       }
     }
+    for (i in filterExpressions) {
+      if (filterExpressions.hasOwnProperty(i)) {
+        field = this.theForm.getItem(i);
+        defaultFilter = {};
+        isc.addProperties(defaultFilter, filterExpressions[i]);
+        field.setDefaultFilter(defaultFilter);
+        if (field.isVisible() && !field.showIf) {
+          field.canvas.viewGrid.setFilterEditorCriteria(defaultFilter);
+          gridsToBeFiltered.push(field.canvas.viewGrid);
+        }
+      }
+    }
+
+
+    if (this.onLoadFunction) {
+      this.onLoadFunction(this);
+    }
+
+    // filter after applying the onLoadFunction, just in case it has modified the filter editor criteria of a grid.
+    // this way it a double requests for these grids is avoided
+    for (i = 0; i < gridsToBeFiltered.length; i++) {
+      gridsToBeFiltered[i].filterByEditor();
+    }
 
     this.handleReadOnlyLogic();
 
     // redraw to execute display logic
     this.theForm.markForRedraw();
+
+    this.okButton.setEnabled(this.allRequiredParametersSet());
+
+    this.handleDisplayLogicForGridColumns();
   },
 
+  /**
+   * Given a string value, it returns the proper value according to the provided type
+   */
+  getTypeSafeValue: function (type, stringValue) {
+    var isNumber;
+    if (!type) {
+      return stringValue;
+    }
+    isNumber = isc.SimpleType.inheritsFrom(type, 'integer') || isc.SimpleType.inheritsFrom(type, 'float');
+    if (isNumber && OB.Utilities.Number.IsValidValueString(type, stringValue)) {
+      return OB.Utilities.Number.OBMaskedToJS(stringValue, type.decSeparator, type.groupSeparator);
+    } else {
+      return stringValue;
+    }
+  },
+
+
   // Checks params with readonly logic enabling or disabling them based on it
   handleReadOnlyLogic: function () {
+    var form, fields, i, field, parentContext;
+
+    form = this.theForm;
+    if (!form) {
+      return;
+    }
+    parentContext = (this.sourceView && this.sourceView.getContextInfo(false, true, true, true)) || {};
+
+    fields = form.getFields();
+    for (i = 0; i < fields.length; i++) {
+      field = form.getField(i);
+      if (field.readOnlyIf && field.setDisabled) {
+        field.setDisabled(field.readOnlyIf(form.getValues(), parentContext));
+      }
+    }
+  },
+
+  handleDisplayLogicForGridColumns: function () {
     var form, fields, i, field;
 
     form = this.theForm;
@@ -531,8 +567,10 @@
     fields = form.getFields();
     for (i = 0; i < fields.length; i++) {
       field = form.getField(i);
-      if (field.readOnlyIf && field.setDisabled) {
-        field.setDisabled(field.readOnlyIf(form.getValues()));
+      if (field.canvas) {
+        if (field.canvas.viewGrid) {
+          field.canvas.viewGrid.evaluateDisplayLogicForGridColumns();
+        }
       }
     }
   },
@@ -552,5 +590,20 @@
     }
 
     return result;
+  },
+
+  // returns true if any non-grid required parameter does not have a value
+  allRequiredParametersSet: function () {
+    var i, item, length = this.theForm.getItems().length,
+        value, undef, nullValue = null;
+    for (i = 0; i < length; i++) {
+      item = this.theForm.getItems()[i];
+      value = item.getValue();
+      // do not take into account the grid parameters when looking for required parameters without value
+      if (item.type !== 'OBPickEditGridItem' && item.required && item.isVisible() && value !== false && value !== 0 && !value) {
+        return false;
+      }
+    }
+    return true;
   }
 });
\ No newline at end of file
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-grid.js	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-grid.js	Fri Jun 13 09:13:47 2014 +0200
@@ -47,10 +47,15 @@
   autoFitFieldsFillViewport: true,
   confirmDiscardEdits: false,
   animateRemoveRecord: false,
+  // this attribute helps to set an attribute only if the edit form has not been initialized
+  editFormInitialized: false,
   removeFieldProperties: {
     width: 32
   },
 
+  // prevents additional requests when loading data
+  drawAllMaxCells: 0,
+
   //The Cell should be validated each time the focus is changed.
   validateByCell: true,
   // default selection
@@ -62,11 +67,23 @@
 
   initWidget: function () {
     var i, len = this.fields.length,
-        theGrid;
+        theGrid, me = this,
+        filterableProperties, canFilter;
 
     this.selectedIds = [];
     this.deselectedIds = [];
 
+    // the getValuesAsCriteria function of the edit form of the filter editor should always be called with 
+    // advanced = true to guarantee that the returned criteria will have the proper format
+    this.filterEditorDefaults.editFormDefaults = this.filterEditorDefaults.editFormDefaults || {};
+    this.filterEditorDefaults.editFormDefaults.originalGetValuesAsCriteria = isc.DynamicForm.getPrototype().getValuesAsCriteria;
+    this.filterEditorDefaults.editFormDefaults.getValuesAsCriteria = function (advanced, textMatchStyle, returnNulls) {
+      var useAdvancedCriteria = true;
+      return this.originalGetValuesAsCriteria(useAdvancedCriteria, textMatchStyle, returnNulls);
+    };
+
+    this.filterEditorProperties = isc.shallowClone(this.filterEditorProperties);
+
     // the origSetValuesAsCriteria member is added as 'class' level
     // we only need to do it once
     if (!this.filterEditorProperties.origSetValuesAsCriteria) {
@@ -101,16 +118,22 @@
     // useful when working with custom field validators
     for (i = 0; i < len; i++) {
       this.fields[i].grid = this;
+      if (this.fields[i].onChangeFunction) {
+        // the default
+        this.fields[i].onChangeFunction.sort = 50;
+
+        OB.OnChangeRegistry.register(this.ID, this.parameterName + OB.Constants.FIELDSEPARATOR + this.fields[i].name, this.fields[i].onChangeFunction, 'default');
+      }
     }
+    this.setFields(this.fields);
+    // Display logic for grid column
+    this.evaluateDisplayLogicForGridColumns();
 
     // required to show the funnel icon and to work
     this.filterClause = this.gridProperties.filterClause;
     this.sqlFilterClause = this.gridProperties.sqlFilterClause;
     this.lazyFiltering = this.gridProperties.lazyFiltering;
-    if ((this.filterClause || this.sqlFilterClause) && 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.filterName = this.gridProperties.filterName;
 
     this.orderByClause = this.gridProperties.orderByClause;
     this.sqlOrderByClause = this.gridProperties.sqlOrderByClause;
@@ -131,19 +154,59 @@
       view: this.view.buttonOwnerView
     };
 
-    // set properties defined for the grid
-    theGrid = this.view.viewProperties.fields.find(true, 'isGrid');
-    if (theGrid) {
-      this.viewProperties = theGrid.viewProperties;
-    } else {
-      window.warn('grid fiel not found!');
-    }
-
     this.autoFitExpandField = this.getLongestFieldName();
 
+
+    this.dataSource.transformRequest = function (dsRequest) {
+      dsRequest.params = dsRequest.params || {};
+      if (me.view && me.view.theForm) {
+        // include in the request the values of the parameters of the parameter window
+        isc.addProperties(dsRequest.params, me.view.theForm.getValues());
+      }
+      return this.Super('transformRequest', arguments);
+    };
+    filterableProperties = this.getFields().findAll('canFilter', true);
+    if (this.filterClause) {
+      // if there is a filter clause always show the filterEditor, otherwise there would be no funnel
+      // icon and it would not be possible to clear the filter clause
+      canFilter = true;
+    } else {
+      canFilter = false;
+      if (filterableProperties) {
+        for (i = 0; i < filterableProperties.length; i++) {
+          // when looking for filterable columns do not take into account the columns whose name starts with '_' (checkbox, delete button, etc) 
+          if (!filterableProperties[i].name.startsWith('_')) {
+            canFilter = true;
+            break;
+          }
+        }
+      }
+    }
+    // If there are no filterable columns, hide the filter editor
+    if (!canFilter) {
+      this.filterEditorProperties.visibility = 'hidden';
+    }
     this.Super('initWidget', arguments);
   },
 
+  evaluateDisplayLogicForGridColumns: function () {
+    var currentValues = (this.contentView.view.theForm && this.contentView.view.theForm.getValues()) || {},
+        contextInfo = (this.view.buttonOwnerView && this.view.buttonOwnerView.getContextInfo(false, true, true, true)) || {},
+        i, fieldVisibility;
+    // TODO: parse currentValues properly 
+    isc.addProperties(contextInfo, currentValues);
+    for (i = 0; i < this.completeFields.length; i++) {
+      if (this.completeFields[i].displayLogicGrid && isc.isA.Function(this.completeFields[i].displayLogicGrid)) {
+        fieldVisibility = this.completeFields[i].displayLogicGrid(currentValues, contextInfo);
+        if (fieldVisibility) {
+          this.showFields(this.completeFields[i].name);
+        } else {
+          this.hideFields(this.completeFields[i].name);
+        }
+      }
+    }
+  },
+
   getLongestFieldName: function () {
     var len = this.fields.length,
         maxWidth = -1,
@@ -247,9 +310,15 @@
         colNum = this.getEditCol(),
         editField = this.getEditField(colNum),
         undef;
+
+    // Execute onChangeFunctions if they exist
+    if (this && OB.OnChangeRegistry.hasOnChange(this.view.viewId, editField)) {
+      OB.OnChangeRegistry.call(this.ID, editField, this.view, this.view.theForm, this);
+    }
+
     if (editField.required) {
       if (newValue === null || newValue === undef) {
-        this.setFieldError(rowNum, editField.name, "Invalid Value");
+        this.setFieldError(rowNum, editField.name, 'Invalid Value');
       } else {
         this.clearFieldError(rowNum, editField.name);
       }
@@ -267,7 +336,9 @@
       return;
     }
     form = this.getEditForm();
-    this.viewProperties.handleReadOnlyLogic(form.getValues(), this.getContextInfo(), form);
+    if (form) {
+      this.viewProperties.handleReadOnlyLogic(form.getValues(), this.getContextInfo(), form);
+    }
   },
 
   handleFilterEditorSubmit: function (criteria, context) {
@@ -392,20 +463,6 @@
     return this.Super('recordClick', arguments);
   },
 
-
-  // Dummy "createRecordComponent" to fix issue: https://issues.openbravo.com/view.php?id=19879
-  // It seems that if it is not present, Smartclient doesn't perform well the maths to calculate the editing fields width
-  createRecordComponent: function (record, colNum) {
-    var layout = null;
-    if (colNum === 0) {
-      layout = isc.Layout.create({
-        width: 0,
-        height: 0
-      });
-    }
-    return layout;
-  },
-
   getOrgParameter: function () {
     var view = this.view && this.view.buttonOwnerView,
         context, i;
@@ -430,6 +487,7 @@
   clearFilter: function () {
     this.filterClause = null;
     this._cleaningFilter = true;
+    this.contentView.messageBar.hide();
     this.Super('clearFilter', arguments);
     delete this._cleaningFilter;
   },
@@ -541,6 +599,9 @@
 
     for (prop in columnValues) {
       if (columnValues.hasOwnProperty(prop)) {
+        if (columnValues[prop] && columnValues[prop].entries && columnValues[prop].entries.length === 0) {
+          delete columnValues[prop].entries;
+        }
         grid.processColumnValue(rowNum, prop, columnValues[prop]);
       }
     }
@@ -604,6 +665,7 @@
   },
 
   showInlineEditor: function (rowNum, colNum, newCell, newRow, suppressFocus) {
+    var editForm, items, i, updatedBlur;
     // retrieve the initial values only if a new row has been selected
     // see issue https://issues.openbravo.com/view.php?id=20653
     if (newRow) {
@@ -614,6 +676,28 @@
       }
     }
     this.Super('showInlineEditor', arguments);
+
+    // update the blur function of the formitems, so that the OnChangeRegistry functions are called
+    // when the item loses the focus
+    if (!this.editFormInitialized) {
+      // the editForm is created the first time the inline editor is shown
+      this.editFormInitialized = true;
+      editForm = this.getEditForm();
+      if (editForm) {
+        items = editForm.getItems();
+        updatedBlur = function (form, item) {
+          this.original_blur(form, item);
+          // Execute onChangeFunctions if they exist
+          if (this && OB.OnChangeRegistry.hasOnChange(form.grid.ID, item)) {
+            OB.OnChangeRegistry.call(form.grid.ID, item, form.grid.view, form.grid.view.theForm, form.grid);
+          }
+        };
+        for (i = 0; i < items.length; i++) {
+          items[i].original_blur = items[i].blur;
+          items[i].blur = updatedBlur;
+        }
+      }
+    }
   },
 
   hideInlineEditor: function (focusInBody, suppressCMHide) {
@@ -623,7 +707,7 @@
   },
 
   validateRows: function () {
-    var i, row, field, errors, editRowIndexes, editRowIDs, rowIndexID;
+    var i, row, field, errors, editRowIndexes, editRowIDs, rowIndexID, data = this.data.allRows || this.data.localData;
 
     if (!this.neverValidate) {
       return;
@@ -638,8 +722,8 @@
       if (!field.validationFn) {
         continue;
       }
-      for (row = 0; row < this.data.length; row++) {
-        errors = this.validateCellValue(row, i, this.data[row][field.name]);
+      for (row = 0; row < data.length; row++) {
+        errors = this.validateCellValue(row, i, data[row][field.name]);
         if (!errors || isc.isA.emptyArray(errors)) {
           if (editRowIndexes.indexOf(row) !== -1) {
             rowIndexID = editRowIDs[editRowIndexes.indexOf(row)];
@@ -671,5 +755,32 @@
     this.Super('removeRecord', arguments);
 
     this.validateRows();
+  },
+
+  destroy: function () {
+    if (this.dataSource) {
+      this.dataSource.destroy();
+    }
+    this.Super('destroy', arguments);
+  },
+
+  checkShowFilterFunnelIcon: function (criteria) {
+    this.Super('checkShowFilterFunnelIcon', [criteria, this.contentView.messageBar]);
+  },
+
+  removeRecordClick: function (rowNum, colNum) {
+    this.Super('removeRecordClick', arguments);
+    // prevents the deleted line from being partially displayed
+    this.markForRedraw();
+  },
+
+  getMinFieldWidth: function (field, ignoreFieldWidth) {
+    // items like _checkbox, _pin and _delete can have a width smaller than the min field width defined for the grid
+    if (field && field.name && field.name.startsWith('_')) {
+      return field.width;
+    } else {
+      this.Super('getMinFieldWidth', arguments);
+    }
   }
+
 });
\ No newline at end of file
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-view.js	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-view.js	Fri Jun 13 09:13:47 2014 +0200
@@ -46,6 +46,8 @@
 
   gridFields: [],
 
+  messageBar: null,
+
   initWidget: function () {
     var newButton, i, view = this;
 
@@ -58,20 +60,26 @@
     if (this.viewProperties.allowDelete) {
       this._addDeleteField();
     }
+    this.messageBar = isc.OBMessageBar.create({
+      visibility: 'hidden',
+      view: this
+    });
+    this.addMember(this.messageBar);
 
-    this.dataSource = this.viewProperties.dataSource;
-    this.dataSource.view = this;
+    this.dataSourceProperties = this.viewProperties.dataSourceProperties;
+    this.dataSourceProperties.view = this;
     this.title = this.windowTitle;
 
     // the datasource object is defined on viewProperties, do not destroy it
-    this.dataSource.potentiallyShared = true;
+    this.dataSourceProperties.potentiallyShared = true;
 
     this.viewGrid = isc.OBPickAndExecuteGrid.create({
       view: this.view,
+      contentView: this,
       fields: this.gridFields,
       height: '*',
       cellHeight: OB.Styles.Process.PickAndExecute.gridCellHeight,
-      dataSource: this.dataSource,
+      dataSource: OB.Datasource.create(this.dataSourceProperties),
       gridProperties: this.viewProperties.gridProperties,
       selectionAppearance: (this.viewProperties.showSelect ? 'checkbox' : 'rowStyle'),
       selectionType: 'simple',
@@ -79,7 +87,9 @@
       saveLocally: (this.viewProperties.allowDelete || this.viewProperties.allowAdd ? true : false),
       autoSaveEdits: (this.viewProperties.allowDelete || this.viewProperties.allowAdd ? true : false),
       neverValidate: (this.viewProperties.allowDelete || this.viewProperties.allowAdd ? true : false),
-      showGridSummary: this.showGridSummary
+      showGridSummary: this.showGridSummary,
+      viewProperties: this.viewProperties,
+      parameterName: this.parameterName
     });
 
 
@@ -98,7 +108,7 @@
     }
     OB.TestRegistry.register('org.openbravo.client.application.process.pickandexecute.button.addnew', this.addNewButton);
 
-    this.members = [this.viewGrid, isc.HLayout.create({
+    this.members = [this.messageBar, this.viewGrid, isc.HLayout.create({
       height: 1,
       overflow: 'visible',
       align: OB.Styles.Process.PickAndExecute.addNewButtonAlign,
@@ -110,13 +120,6 @@
     this.Super('initWidget', arguments);
     OB.TestRegistry.register('org.openbravo.client.application.process.pickandexecute.popup', this);
 
-    if (this.viewGrid.saveLocally) {
-      // Using "disconnected" data to avoid update/remove/add operations to the back-end
-      // http://www.smartclient.com/docs/8.1/a/b/c/go.html#method..DataSource.fetchData
-      this.dataSource.fetchData(this.viewGrid.getFetchRequestParams(), this.viewGrid.ID + ".setData(data)");
-    } else {
-      this.viewGrid.fetchData();
-    }
   },
 
   prepareGridFields: function (fields) {
@@ -211,6 +214,24 @@
     });
   },
 
+  getContextInfo: function () {
+    var contextInfo = {},
+        record, i, fields, field;
+    if (!this.viewGrid.getSelectedRecords() || this.viewGrid.getSelectedRecords().length !== 1) {
+      return contextInfo;
+    }
+    record = this.viewGrid.getSelectedRecord();
+    for (i = 0; i < this.viewGrid.getFields().length; i++) {
+      field = this.viewGrid.getField(i);
+      if (field.inpColumnName) {
+        contextInfo[field.inpColumnName] = record[field.name];
+      }
+    }
+    contextInfo.inpwindowId = this.viewProperties.standardProperties.inpwindowId;
+    contextInfo.inpTabId = this.viewProperties.standardProperties.inpTabId;
+    return contextInfo;
+  },
+
   // dummy required by OBStandardView.prepareGridFields
   setFieldFormProperties: function () {}
 });
\ No newline at end of file
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-action-button.js	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-action-button.js	Fri Jun 13 09:13:47 2014 +0200
@@ -91,7 +91,7 @@
           paramWindow: true,
           processId: me.processId,
           windowId: me.windowId,
-          windowTitle: me.windowTitle,
+          windowTitle: me.windowTitle || me.realTitle,
           actionHandler: me.command,
           button: me,
           buttons: me.labelValue,
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js	Fri Jun 13 09:13:47 2014 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2010-2013 Openbravo SLU
+ * All portions are Copyright (C) 2010-2014 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):   Sreedhar Sirigiri (TDS), Mallikarjun M (TDS)
  ************************************************************************
@@ -1245,6 +1245,7 @@
           currentContext.viewForm.view.attachmentExists = attachmentExists;
           doRefresh(buttonsByContext[currentContext], currentContext.getCurrentValues() || {}, noneOrMultipleRecordsSelected, noneOrMultipleRecordsSelected, me);
           //compute and apply tab display logic again after fetching auxilary inputs.
+          currentContext.handleDefaultTreeView();
           currentContext.updateSubtabVisibility();
         };
       };
@@ -1337,12 +1338,23 @@
       }
       allProperties = this.view.getContextInfo(false, true, false, true);
       OB.RemoteCallManager.call('org.openbravo.client.application.window.FormInitializationComponent', allProperties, requestParams, function (response, data, request) {
-        var attachmentExists = data.attachmentExists;
+        var attachmentExists = data.attachmentExists,
+            auxInputs = data.auxiliaryInputValues,
+            prop;
         me.view.attachmentExists = attachmentExists;
 
         // Added sessionAttributes to updateSubtabVisibility 
         me.view.viewForm.sessionAttributes = data.sessionAttributes;
-        me.view.viewForm.auxInputs = data.auxiliaryInputValues;
+        if (auxInputs) {
+          this.auxInputs = {};
+          for (prop in auxInputs) {
+            if (auxInputs.hasOwnProperty(prop)) {
+              me.view.viewForm.setValue(prop, auxInputs[prop].value);
+              me.view.viewForm.auxInputs[prop] = auxInputs[prop].value;
+            }
+          }
+        }
+        me.view.handleDefaultTreeView();
         me.view.updateSubtabVisibility();
 
         //Call to refresh the buttons. As its called with noSetSession=true, it will not cause an infinite recursive loop
@@ -1733,14 +1745,11 @@
   view.setContextInfo(view.getContextInfo(true, true, true, true), openPopupTree, true);
 };
 
-OB.ToolbarUtils.toggleTreeGridVisibility = function (view) {
+OB.ToolbarUtils.showTreeGrid = function (view) {
   var treeGrid = view.treeGrid,
       viewGrid = view.viewGrid;
-  if (view.isShowingTree) {
-    viewGrid.show();
-    treeGrid.hide();
-    view.isShowingTree = false;
-  } else {
+
+  if (viewGrid && treeGrid) {
     // Copy the viewGrid fields to the treeGrid, so that both views always display the same fields
     treeGrid.setFields(treeGrid.getTreeGridFields(viewGrid.getFields()));
     treeGrid.copyCriteriaFromViewGrid();
@@ -1749,7 +1758,26 @@
     treeGrid.checkShowFilterFunnelIcon(treeGrid.getCriteria());
     treeGrid.show();
     viewGrid.hide();
-    view.isShowingTree = true;
+  }
+  view.isShowingTree = true;
+};
+
+OB.ToolbarUtils.hideTreeGrid = function (view) {
+  var treeGrid = view.treeGrid,
+      viewGrid = view.viewGrid;
+
+  if (viewGrid && treeGrid) {
+    viewGrid.show();
+    treeGrid.hide();
+  }
+  view.isShowingTree = false;
+};
+
+OB.ToolbarUtils.toggleTreeGridVisibility = function (view) {
+  if (view.isShowingTree) {
+    OB.ToolbarUtils.hideTreeGrid(view);
+  } else {
+    OB.ToolbarUtils.showTreeGrid(view);
   }
 };
 
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities-date.js	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities-date.js	Fri Jun 13 09:13:47 2014 +0200
@@ -62,6 +62,9 @@
   } else if (displayFormat.indexOf(' HH.MI') !== -1) {
     newFormat += ' %H.%M';
   }
+  if (displayFormat.indexOf(' a') !== -1) {
+    newFormat += ' A';
+  }
   return newFormat;
 };
 
@@ -77,7 +80,7 @@
 
   timeFormat = OB.Format.dateTime.substring(OB.Format.dateTime.indexOf(' ') + 1);
 
-  if (timeFormat && timeFormat.toLowerCase().endsWith('a')) {
+  if (timeFormat && timeFormat.toUpperCase().lastIndexOf(' A') !== -1 && timeFormat.toUpperCase().lastIndexOf(' A') === timeFormat.length - 2) {
     is24h = false;
   }
 
@@ -110,15 +113,34 @@
   }
 
   // if already a date then return true
-  var isADate = Object.prototype.toString.call(OBDate) === '[object Date]';
+  var isADate = Object.prototype.toString.call(OBDate) === '[object Date]',
+      PMIndicator = ' PM',
+      AMIndicator = ' AM',
+      is24h = true,
+      isPM = false;
   if (isADate) {
     return OBDate;
   }
 
+  if (window.isc && isc.Time && isc.Time.PMIndicator) {
+    PMIndicator = isc.Time.PMIndicator;
+  }
+  if (window.isc && isc.Time && isc.Time.AMIndicator) {
+    AMIndicator = isc.Time.AMIndicator;
+  }
+
   dateFormat = OB.Utilities.Date.normalizeDisplayFormat(dateFormat);
+  dateFormat = dateFormat.replace(' A', '');
   var dateSeparator = dateFormat.substring(2, 3);
   var timeSeparator = dateFormat.substring(11, 12);
   var isFullYear = (dateFormat.indexOf('%Y') !== -1);
+  if (OBDate.indexOf(PMIndicator) !== 1 || OBDate.indexOf(AMIndicator) !== 1) {
+    is24h = false;
+  }
+  if (!is24h && OBDate.indexOf(PMIndicator) !== -1) {
+    isPM = true;
+  }
+  OBDate = OBDate.replace(AMIndicator, '').replace(PMIndicator, '');
 
   if ((isFullYear ? OBDate.length - 2 : OBDate.length) !== dateFormat.length) {
     return null;
@@ -157,6 +179,15 @@
   minutes = parseInt(minutes, 10);
   seconds = parseInt(seconds, 10);
 
+  if (!is24h) {
+    if (!isPM && hours === 12) {
+      hours = 0;
+    }
+    if (isPM && hours !== 12) {
+      hours = hours + 12;
+    }
+  }
+
   if (day < 1 || day > 31 || month < 1 || month > 12 || year > 99 || fullYear > 9999) {
     return null;
   }
@@ -210,11 +241,25 @@
 OB.Utilities.Date.JSToOB = function (JSDate, dateFormat) {
   dateFormat = OB.Utilities.Date.normalizeDisplayFormat(dateFormat);
 
-  var isADate = Object.prototype.toString.call(JSDate) === '[object Date]';
+  var isADate = Object.prototype.toString.call(JSDate) === '[object Date]',
+      PMIndicator = ' PM',
+      AMIndicator = ' AM',
+      is24h = true,
+      isPM = false;
   if (!isADate) {
     return null;
   }
 
+  if (window.isc && isc.Time && isc.Time.PMIndicator) {
+    PMIndicator = isc.Time.PMIndicator;
+  }
+  if (window.isc && isc.Time && isc.Time.AMIndicator) {
+    AMIndicator = isc.Time.AMIndicator;
+  }
+  if (dateFormat.toUpperCase().lastIndexOf(' A') !== -1 && dateFormat.toUpperCase().lastIndexOf(' A') === dateFormat.length - 2) {
+    is24h = false;
+  }
+
   var year = JSDate.getYear().toString();
   var fullYear = JSDate.getFullYear().toString();
   var month = (JSDate.getMonth() + 1).toString();
@@ -235,6 +280,20 @@
     }
   }
 
+  if (!is24h) {
+    hours = parseInt(hours, 10);
+    if (hours >= 12) {
+      isPM = true;
+    }
+    if (hours > 12) {
+      hours = hours - 12;
+    }
+    if (hours === 0) {
+      hours = 12;
+    }
+    hours = hours.toString();
+  }
+
   while (year.length < 2) {
     year = '0' + year;
   }
@@ -265,6 +324,14 @@
   OBDate = OBDate.replace('%M', minutes);
   OBDate = OBDate.replace('%S', seconds);
 
+  if (!is24h) {
+    if (isPM) {
+      OBDate = OBDate.replace(' A', PMIndicator);
+    } else {
+      OBDate = OBDate.replace(' A', AMIndicator);
+    }
+  }
+
   return OBDate;
 };
 
--- a/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/Default/org.openbravo.client.application/ob-application-menu-styles.js	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/Default/org.openbravo.client.application/ob-application-menu-styles.js	Fri Jun 13 09:13:47 2014 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2011-2013 Openbravo SLU
+ * All portions are Copyright (C) 2011-2014 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -75,6 +75,7 @@
 
 isc.OBApplicationMenuButton.addProperties({
   baseStyle: 'OBNavBarTextButton',
+  clipTitle: false,
   showMenuButtonImage: false,
   align: 'center',
   height: 26,
--- a/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/Default/org.openbravo.client.application/ob-form-styles.css	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/Default/org.openbravo.client.application/ob-form-styles.css	Fri Jun 13 09:13:47 2014 +0200
@@ -39,6 +39,11 @@
   padding: 0px 0px 20px 0px;
 }
 
+.OBParameterWindowForm {
+  margin: 5px 20px 0px 20px;
+  padding: 0px 0px 0px 0px;
+}
+
 .OBFormContainerLayout {
   outline: none;
   background-color: #FFFFFF;
@@ -156,6 +161,62 @@
   width: 100%;
 }
 
+.OBFormField .OBFormFieldDateInputRequired,
+.OBFormField .OBFormFieldDateInputRequiredFocused,
+.OBFormField .OBFormFieldDateInputRequiredDisabled,
+.OBFormField .OBFormFieldDateInputRequiredError,
+.OBFormField .OBFormFieldDateInputRequiredHint,
+
+.OBFormField .OBFormFieldDateInput,
+.OBFormField .OBFormFieldDateInputDisabled,
+.OBFormField .OBFormFieldDateInputFocused,
+.OBFormField .OBFormFieldDateInputError,
+.OBFormField .OBFormFieldDateInputHint,
+
+.OBFormFieldError .OBFormFieldDateInputRequired,
+.OBFormFieldError .OBFormFieldDateInputRequiredFocused,
+.OBFormFieldError .OBFormFieldDateInputRequiredDisabled,
+.OBFormFieldError .OBFormFieldDateInputRequiredError,
+.OBFormFieldError .OBFormFieldDateInputRequiredHint,
+
+.OBFormFieldError .OBFormFieldDateInput,
+.OBFormFieldError .OBFormFieldDateInputDisabled,
+.OBFormFieldError .OBFormFieldDateInputFocused,
+.OBFormFieldError .OBFormFieldDateInputError,
+.OBFormFieldError .OBFormFieldDateInputHint {
+  /* The date input should have a maximum width to ensure that the datepicker button is not
+     too far from the input */
+  max-width: 137px;
+}
+
+html[data-useragent*='MSIE 7.0'] .OBFormField .OBFormFieldDateInputRequired,
+html[data-useragent*='MSIE 7.0'] .OBFormField .OBFormFieldDateInputRequiredFocused,
+html[data-useragent*='MSIE 7.0'] .OBFormField .OBFormFieldDateInputRequiredDisabled,
+html[data-useragent*='MSIE 7.0'] .OBFormField .OBFormFieldDateInputRequiredError,
+html[data-useragent*='MSIE 7.0'] .OBFormField .OBFormFieldDateInputRequiredHint,
+
+html[data-useragent*='MSIE 7.0'] .OBFormField .OBFormFieldDateInput,
+html[data-useragent*='MSIE 7.0'] .OBFormField .OBFormFieldDateInputDisabled,
+html[data-useragent*='MSIE 7.0'] .OBFormField .OBFormFieldDateInputFocused,
+html[data-useragent*='MSIE 7.0'] .OBFormField .OBFormFieldDateInputError,
+html[data-useragent*='MSIE 7.0'] .OBFormField .OBFormFieldDateInputHint,
+
+html[data-useragent*='MSIE 7.0'] .OBFormFieldError .OBFormFieldDateInputRequired,
+html[data-useragent*='MSIE 7.0'] .OBFormFieldError .OBFormFieldDateInputRequiredFocused,
+html[data-useragent*='MSIE 7.0'] .OBFormFieldError .OBFormFieldDateInputRequiredDisabled,
+html[data-useragent*='MSIE 7.0'] .OBFormFieldError .OBFormFieldDateInputRequiredError,
+html[data-useragent*='MSIE 7.0'] .OBFormFieldError .OBFormFieldDateInputRequiredHint,
+
+html[data-useragent*='MSIE 7.0'] .OBFormFieldError .OBFormFieldDateInput,
+html[data-useragent*='MSIE 7.0'] .OBFormFieldError .OBFormFieldDateInputDisabled,
+html[data-useragent*='MSIE 7.0'] .OBFormFieldError .OBFormFieldDateInputFocused,
+html[data-useragent*='MSIE 7.0'] .OBFormFieldError .OBFormFieldDateInputError,
+html[data-useragent*='MSIE 7.0'] .OBFormFieldError .OBFormFieldDateInputHint {
+  /* The previous improvement is not working ok in IE7 or in IE>7 with compatibility mode enabled
+     because the datepicker button is rendered in the corner, as if the input be width: 100% */
+  max-width: none;
+}
+
 .OBFormFieldNumberInput,
 .OBFormFieldNumberInputDisabled,
 .OBFormFieldNumberInputFocused,
--- a/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/Default/org.openbravo.client.application/ob-form-styles.js	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/Default/org.openbravo.client.application/ob-form-styles.js	Fri Jun 13 09:13:47 2014 +0200
@@ -37,6 +37,14 @@
   cellPadding: 0
 });
 
+isc.OBParameterWindowForm.addProperties({
+  styleName: 'OBParameterWindowForm',
+  width: '100%',
+  overflow: 'visible',
+  //  cellBorder: 1, // debug layout
+  cellPadding: 0
+});
+
 isc.OBFormContainerLayout.addProperties({
   styleName: 'OBFormContainerLayout'
 });
@@ -630,4 +638,13 @@
   height: 50,
   width: 450,
   align: 'center'
+});
+
+/* =====================================================================
+ * Grid FormItem Styles
+ =======================================================================*/
+
+isc.OBPickEditGridItem.addProperties({
+  cellStyle: 'OBFormField',
+  titleStyle: 'OBFormFieldLabel'
 });
\ No newline at end of file
--- a/modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE.xml	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE.xml	Fri Jun 13 09:13:47 2014 +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.23010]]></VERSION>
+<!--D393BE6F22BB44B7B728259B34FC795A-->  <VERSION><![CDATA[1.0.23473]]></VERSION>
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <DESCRIPTION><![CDATA[Provides the HTML Widget superclass that allows to create widget classes that embed the html code.]]></DESCRIPTION>
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <HELP><![CDATA[With this module you can define your own widget classes just setting up your own html code or the html code provided by third parties.]]></HELP>
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <URL><![CDATA[http://forge.openbravo.com/projects/htmlwidget]]></URL>
--- a/modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Jun 13 09:13:47 2014 +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.23010]]></STARTVERSION>
+<!--DCE798FBC5B648F7A3C81A6941720A57-->  <STARTVERSION><![CDATA[2.1.23473]]></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.htmlwidget/src-db/database/sourcedata/OBUIAPP_PARAMETER.xml	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/OBUIAPP_PARAMETER.xml	Fri Jun 13 09:13:47 2014 +0200
@@ -18,6 +18,8 @@
 <!--04A58154C5824860BF661F20E1133B35-->  <FIXEDVALUE><![CDATA[300]]></FIXEDVALUE>
 <!--04A58154C5824860BF661F20E1133B35-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--04A58154C5824860BF661F20E1133B35-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--04A58154C5824860BF661F20E1133B35-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--04A58154C5824860BF661F20E1133B35-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--04A58154C5824860BF661F20E1133B35-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[10DE6579FF7A4864AEB31FE957849461]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--04A58154C5824860BF661F20E1133B35--></OBUIAPP_PARAMETER>
 
@@ -38,6 +40,8 @@
 <!--6F083818BA9242D5A6FDF7BE49DB8340-->  <ISFIXED><![CDATA[N]]></ISFIXED>
 <!--6F083818BA9242D5A6FDF7BE49DB8340-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--6F083818BA9242D5A6FDF7BE49DB8340-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--6F083818BA9242D5A6FDF7BE49DB8340-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--6F083818BA9242D5A6FDF7BE49DB8340-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--6F083818BA9242D5A6FDF7BE49DB8340-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[E4C82D04605C4256A74258B770AA8867]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--6F083818BA9242D5A6FDF7BE49DB8340--></OBUIAPP_PARAMETER>
 
@@ -60,6 +64,8 @@
 <!--98F17ED69EDDE56FE040007F01002FE9-->  <FIXEDVALUE><![CDATA[300]]></FIXEDVALUE>
 <!--98F17ED69EDDE56FE040007F01002FE9-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--98F17ED69EDDE56FE040007F01002FE9-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--98F17ED69EDDE56FE040007F01002FE9-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--98F17ED69EDDE56FE040007F01002FE9-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--98F17ED69EDDE56FE040007F01002FE9-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[E4C82D04605C4256A74258B770AA8867]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--98F17ED69EDDE56FE040007F01002FE9--></OBUIAPP_PARAMETER>
 
@@ -80,6 +86,8 @@
 <!--98F17ED69EDFE56FE040007F01002FE9-->  <ISFIXED><![CDATA[N]]></ISFIXED>
 <!--98F17ED69EDFE56FE040007F01002FE9-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--98F17ED69EDFE56FE040007F01002FE9-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--98F17ED69EDFE56FE040007F01002FE9-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--98F17ED69EDFE56FE040007F01002FE9-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--98F17ED69EDFE56FE040007F01002FE9-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[E4C82D04605C4256A74258B770AA8867]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--98F17ED69EDFE56FE040007F01002FE9--></OBUIAPP_PARAMETER>
 
@@ -100,6 +108,8 @@
 <!--C536ED2B36AF452AB6F222EED1BB154C-->  <ISFIXED><![CDATA[Y]]></ISFIXED>
 <!--C536ED2B36AF452AB6F222EED1BB154C-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--C536ED2B36AF452AB6F222EED1BB154C-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--C536ED2B36AF452AB6F222EED1BB154C-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--C536ED2B36AF452AB6F222EED1BB154C-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--C536ED2B36AF452AB6F222EED1BB154C-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[10DE6579FF7A4864AEB31FE957849461]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--C536ED2B36AF452AB6F222EED1BB154C--></OBUIAPP_PARAMETER>
 
@@ -120,6 +130,8 @@
 <!--EBBE09DD0FB74309B16B50584570CF62-->  <ISFIXED><![CDATA[Y]]></ISFIXED>
 <!--EBBE09DD0FB74309B16B50584570CF62-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--EBBE09DD0FB74309B16B50584570CF62-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--EBBE09DD0FB74309B16B50584570CF62-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--EBBE09DD0FB74309B16B50584570CF62-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--EBBE09DD0FB74309B16B50584570CF62-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[10DE6579FF7A4864AEB31FE957849461]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--EBBE09DD0FB74309B16B50584570CF62--></OBUIAPP_PARAMETER>
 
--- a/modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE.xml	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE.xml	Fri Jun 13 09:13:47 2014 +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.23010]]></VERSION>
+<!--4B828F4D03264080AA1D2057B13F613C-->  <VERSION><![CDATA[2.1.23473]]></VERSION>
 <!--4B828F4D03264080AA1D2057B13F613C-->  <DESCRIPTION><![CDATA[Provides framework functionality for the Openbravo User Interface]]></DESCRIPTION>
 <!--4B828F4D03264080AA1D2057B13F613C-->  <HELP><![CDATA[The user interface client kernel is a generation framework for generating client (browser) components used in Openbravo. Its components are mainly used by other modules to provide customizable and extendable user interfaces.]]></HELP>
 <!--4B828F4D03264080AA1D2057B13F613C-->  <URL><![CDATA[http://forge.openbravo.com/projects/openbravoclientkernel]]></URL>
--- a/modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Jun 13 09:13:47 2014 +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.23010]]></STARTVERSION>
+<!--26B041893E844A53AFA58BC326C4F0D7-->  <STARTVERSION><![CDATA[3.0.23473]]></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.23010]]></STARTVERSION>
+<!--3AB045DA35ED4CA58EF7EB5BF04CDE3F-->  <STARTVERSION><![CDATA[1.1.23473]]></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.23010]]></STARTVERSION>
+<!--D7BA4BB0844942C58DC46B9E23CF8E67-->  <STARTVERSION><![CDATA[2.0.23473]]></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.kernel/src-db/database/sourcedata/AD_TAB.xml	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_TAB.xml	Fri Jun 13 09:13:47 2014 +0200
@@ -24,6 +24,8 @@
 <!--0424D6B4F7FF46A6A4B4960F410144B6-->  <UIPATTERN><![CDATA[STD]]></UIPATTERN>
 <!--0424D6B4F7FF46A6A4B4960F410144B6-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--0424D6B4F7FF46A6A4B4960F410144B6-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--0424D6B4F7FF46A6A4B4960F410144B6-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--0424D6B4F7FF46A6A4B4960F410144B6-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--0424D6B4F7FF46A6A4B4960F410144B6-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--0424D6B4F7FF46A6A4B4960F410144B6-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--0424D6B4F7FF46A6A4B4960F410144B6-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -51,6 +53,8 @@
 <!--33550B504F454C518E487AF4BC81376F-->  <UIPATTERN><![CDATA[STD]]></UIPATTERN>
 <!--33550B504F454C518E487AF4BC81376F-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--33550B504F454C518E487AF4BC81376F-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--33550B504F454C518E487AF4BC81376F-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--33550B504F454C518E487AF4BC81376F-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--33550B504F454C518E487AF4BC81376F-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--33550B504F454C518E487AF4BC81376F-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--33550B504F454C518E487AF4BC81376F-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -80,6 +84,8 @@
 <!--9BC8881FA26C4609BEC7571F55CA053C-->  <UIPATTERN><![CDATA[STD]]></UIPATTERN>
 <!--9BC8881FA26C4609BEC7571F55CA053C-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--9BC8881FA26C4609BEC7571F55CA053C-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--9BC8881FA26C4609BEC7571F55CA053C-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--9BC8881FA26C4609BEC7571F55CA053C-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--9BC8881FA26C4609BEC7571F55CA053C-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--9BC8881FA26C4609BEC7571F55CA053C-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--9BC8881FA26C4609BEC7571F55CA053C-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -109,6 +115,8 @@
 <!--9CEA7BCAB01844EEBA8D254796B9BCA3-->  <UIPATTERN><![CDATA[STD]]></UIPATTERN>
 <!--9CEA7BCAB01844EEBA8D254796B9BCA3-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--9CEA7BCAB01844EEBA8D254796B9BCA3-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--9CEA7BCAB01844EEBA8D254796B9BCA3-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--9CEA7BCAB01844EEBA8D254796B9BCA3-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--9CEA7BCAB01844EEBA8D254796B9BCA3-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--9CEA7BCAB01844EEBA8D254796B9BCA3-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--9CEA7BCAB01844EEBA8D254796B9BCA3-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/AbsoluteTimeUIDefinition.java	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/AbsoluteTimeUIDefinition.java	Fri Jun 13 09:13:47 2014 +0200
@@ -29,6 +29,7 @@
 import org.codehaus.jettison.json.JSONObject;
 import org.openbravo.base.exception.OBException;
 import org.openbravo.base.session.OBPropertiesProvider;
+import org.openbravo.client.kernel.KernelConstants;
 import org.openbravo.client.kernel.RequestContext;
 import org.openbravo.data.Sqlc;
 import org.openbravo.model.ad.ui.Field;
@@ -71,7 +72,14 @@
   private SimpleDateFormat getClassicFormat() {
     if (classicFormat == null) {
       String dateTimeFormat = (String) OBPropertiesProvider.getInstance().getOpenbravoProperties()
-          .get("dateTimeFormat.java");
+          .get(KernelConstants.DATETIME_FORMAT_PROPERTY);
+      if (dateTimeFormat.indexOf(" a") != -1) {
+        // The value of this reference always go to/from the client in the 24h notation, so in case
+        // the dateTimeFormat.java be defined to use the 'AM/PM' notation, it should be modified to
+        // work with this reference
+        dateTimeFormat = dateTimeFormat.replace(" a", "");
+        dateTimeFormat = dateTimeFormat.replace("hh", "HH");
+      }
       if (dateTimeFormat.contains(" ")) {
         dateTimeFormat = dateTimeFormat.substring(dateTimeFormat.indexOf(" ") + 1);
       } else {
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/DateUIDefinition.java	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/DateUIDefinition.java	Fri Jun 13 09:13:47 2014 +0200
@@ -25,7 +25,9 @@
 
 import org.codehaus.jettison.json.JSONObject;
 import org.openbravo.base.exception.OBException;
+import org.openbravo.base.session.OBPropertiesProvider;
 import org.openbravo.client.application.Parameter;
+import org.openbravo.client.kernel.KernelConstants;
 import org.openbravo.client.kernel.RequestContext;
 import org.openbravo.model.ad.ui.Field;
 
@@ -77,10 +79,17 @@
     try {
       JSONObject o = new JSONObject(
           fieldProperties != null && fieldProperties.length() > 0 ? fieldProperties : "{}");
-      o.put("width", "50%");
       if (field != null && field.getColumn() != null) {
-        final Long length = field.getColumn().getLength();
+        Long length = field.getColumn().getLength();
         if (length != null) {
+          final String dateTimeFormat = (String) OBPropertiesProvider.getInstance()
+              .getOpenbravoProperties().get(KernelConstants.DATETIME_FORMAT_PROPERTY);
+          if (length.equals(19L) && dateTimeFormat.endsWith(" a")) {
+            // If it is a DateTime (typical length of 19) and there is also the need to show the
+            // " AM" or " PM" text, three characters more need to be added, so the length should be
+            // increased by 3
+            length += 3L;
+          }
           o.put("length", length);
         }
       }
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/FKComboUIDefinition.java	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/FKComboUIDefinition.java	Fri Jun 13 09:13:47 2014 +0200
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2010-2012 Openbravo SLU 
+ * All portions are Copyright (C) 2010-2014 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -41,13 +41,12 @@
   private static final String TABLE_AD_REFERENCE_ID = "18";
 
   @Override
-  public String getParentType() {
-    // ensures that the field will have a oneOf validator
-    return "enum";
+  public String getFormEditorType() {
+    return "OBFKComboItem";
   }
 
   public String getGridEditorFieldProperties(Field field) {
-    return "displayField: null, valueField: null";
+    return "displayField: '_identifier', valueField: 'id'";
   }
 
   @Override
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/FKTreeUIDefinition.java	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/FKTreeUIDefinition.java	Fri Jun 13 09:13:47 2014 +0200
@@ -156,7 +156,7 @@
     final String tableId = field.getColumn().getTable().getId();
 
     Property property = null;
-    if (ApplicationConstants.DATASOURCEBASEDTABLE.equals(field.getColumn().getTable()
+    if (!ApplicationConstants.TABLEBASEDTABLE.equals(field.getColumn().getTable()
         .getDataOriginType())) {
       property = DalUtil.getPropertyByTableId(tableId, columnName);
     } else {
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/TimeUIDefinition.java	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/TimeUIDefinition.java	Fri Jun 13 09:13:47 2014 +0200
@@ -29,6 +29,7 @@
 import org.codehaus.jettison.json.JSONObject;
 import org.openbravo.base.exception.OBException;
 import org.openbravo.base.session.OBPropertiesProvider;
+import org.openbravo.client.kernel.KernelConstants;
 import org.openbravo.client.kernel.RequestContext;
 import org.openbravo.data.Sqlc;
 import org.openbravo.model.ad.ui.Field;
@@ -76,7 +77,14 @@
   private SimpleDateFormat getClassicFormat() {
     if (classicFormat == null) {
       String dateTimeFormat = (String) OBPropertiesProvider.getInstance().getOpenbravoProperties()
-          .get("dateTimeFormat.java");
+          .get(KernelConstants.DATETIME_FORMAT_PROPERTY);
+      if (dateTimeFormat.endsWith(" a")) {
+        // The value of this reference always go to/from the client in the 24h notation, so in case
+        // the dateTimeFormat.java be defined to use the 'AM/PM' notation, it should be modified to
+        // work with this reference
+        dateTimeFormat = dateTimeFormat.replace(" a", "");
+        dateTimeFormat = dateTimeFormat.replace("hh", "HH");
+      }
       if (dateTimeFormat.contains(" ")) {
         dateTimeFormat = dateTimeFormat.substring(dateTimeFormat.indexOf(" ") + 1);
       } else {
--- a/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/UIDefinition.java	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/UIDefinition.java	Fri Jun 13 09:13:47 2014 +0200
@@ -29,6 +29,7 @@
 import java.util.List;
 import java.util.Map;
 
+import org.apache.commons.lang.StringUtils;
 import org.apache.log4j.Logger;
 import org.codehaus.jettison.json.JSONArray;
 import org.codehaus.jettison.json.JSONException;
@@ -63,6 +64,7 @@
  */
 public abstract class UIDefinition {
   private static final String TYPE_NAME_PREFIX = "_id_";
+  private static final String LIST_REF_ID = "17";
 
   private Reference reference;
   private DomainType domainType;
@@ -509,11 +511,23 @@
   protected String getValueInComboReference(Field field, boolean getValueFromSession,
       String columnValue, boolean onlyFirstRecord) {
     try {
+      String ref = field.getColumn().getReference().getId();
+      boolean isListReference = LIST_REF_ID.equals(ref);
+      if (!isListReference && !field.getColumn().isMandatory() && StringUtils.isEmpty(columnValue)) {
+        // non mandatory without value nor default, should only return empty value, prevent
+        // everything else
+        JSONObject entry = new JSONObject();
+        entry.put(JsonConstants.ID, (String) null);
+        entry.put(JsonConstants.IDENTIFIER, (String) null);
+        return entry.toString();
+      }
+
+      FieldProvider[] fps = null;
       RequestContext rq = RequestContext.get();
       VariablesSecureApp vars = rq.getVariablesSecureApp();
       boolean comboreload = rq.getRequestParameter("donotaddcurrentelement") != null
           && rq.getRequestParameter("donotaddcurrentelement").equals("true");
-      String ref = field.getColumn().getReference().getId();
+
       String objectReference = "";
       if (field.getColumn().getReferenceSearchKey() != null) {
         objectReference = field.getColumn().getReferenceSearchKey().getId();
@@ -545,17 +559,23 @@
       Map<String, String> parameters = comboTableData.fillSQLParametersIntoMap(
           new DalConnectionProvider(false), vars, tabData, field.getTab().getWindow().getId(),
           (getValueFromSession && !comboreload) ? columnValue : "");
-      if (onlyFirstRecord) {
+      if ((onlyFirstRecord || columnValue != null) && !isListReference) {
         parameters.put("@ONLY_ONE_RECORD@", columnValue);
       }
-      FieldProvider[] fps = comboTableData.select(new DalConnectionProvider(false), parameters,
-          getValueFromSession && !comboreload);
+
+      if (!isListReference) {
+        fps = comboTableData.select(new DalConnectionProvider(false), parameters,
+            getValueFromSession && !comboreload, 0, 0);
+      } else {
+        fps = comboTableData.select(new DalConnectionProvider(false), parameters,
+            getValueFromSession && !comboreload);
+      }
       ArrayList<FieldProvider> values = new ArrayList<FieldProvider>();
       values.addAll(Arrays.asList(fps));
       ArrayList<JSONObject> comboEntries = new ArrayList<JSONObject>();
       ArrayList<String> possibleIds = new ArrayList<String>();
       // If column is mandatory we add an initial blank value
-      if (!field.getColumn().isMandatory()) {
+      if (!field.getColumn().isMandatory() && StringUtils.isEmpty(columnValue)) {
         possibleIds.add("");
         JSONObject entry = new JSONObject();
         entry.put(JsonConstants.ID, (String) null);
@@ -570,32 +590,48 @@
         comboEntries.add(entry);
       }
       JSONObject fieldProps = new JSONObject();
-      if (getValueFromSession && !comboreload) {
-        fieldProps.put("value", columnValue);
-        fieldProps.put("classicValue", columnValue);
+      if (!isListReference) {
+        if (comboEntries.size() > 0) {
+          if (comboEntries.get(0).has(JsonConstants.ID)) {
+            fieldProps.put("value", comboEntries.get(0).get(JsonConstants.ID));
+            fieldProps.put("classicValue", comboEntries.get(0).get(JsonConstants.ID));
+            fieldProps.put("identifier", comboEntries.get(0).get(JsonConstants.IDENTIFIER));
+          } else {
+            fieldProps.put("value", (String) null);
+            fieldProps.put("classicValue", (String) null);
+            fieldProps.put("identifier", (String) null);
+          }
+        } else {
+          fieldProps.put("value", "");
+          fieldProps.put("classicValue", "");
+          fieldProps.put("identifier", "");
+        }
       } else {
-        if (possibleIds.contains(columnValue)) {
+        if (getValueFromSession && !comboreload) {
           fieldProps.put("value", columnValue);
           fieldProps.put("classicValue", columnValue);
         } else {
-          // In case the default value doesn't exist in the combo values, we choose the first one
-          if (comboEntries.size() > 0) {
-            if (comboEntries.get(0).has(JsonConstants.ID)) {
-              fieldProps.put("value", comboEntries.get(0).get(JsonConstants.ID));
-              fieldProps.put("classicValue", comboEntries.get(0).get(JsonConstants.ID));
+          if (possibleIds.contains(columnValue)) {
+            fieldProps.put("value", columnValue);
+            fieldProps.put("classicValue", columnValue);
+          } else {
+            // In case the default value doesn't exist in the combo values, we choose the first one
+            if (comboEntries.size() > 0) {
+              if (comboEntries.get(0).has(JsonConstants.ID)) {
+                fieldProps.put("value", comboEntries.get(0).get(JsonConstants.ID));
+                fieldProps.put("classicValue", comboEntries.get(0).get(JsonConstants.ID));
+              } else {
+                fieldProps.put("value", (String) null);
+                fieldProps.put("classicValue", (String) null);
+              }
             } else {
-              fieldProps.put("value", (String) null);
-              fieldProps.put("classicValue", (String) null);
+              fieldProps.put("value", "");
+              fieldProps.put("classicValue", "");
             }
-          } else {
-            fieldProps.put("value", "");
-            fieldProps.put("classicValue", "");
           }
         }
+        fieldProps.put("entries", new JSONArray(comboEntries));
       }
-      fieldProps.put("entries", new JSONArray(comboEntries));
-      // comboValues.put(fieldIndex, values);
-      // columnValues.put(fieldIndex, fixComboValue(columnValues.get(fieldIndex), fps));
       return fieldProps.toString();
     } catch (Exception e) {
       throw new OBException("Error while computing combo data", e);
--- a/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE.xml	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE.xml	Fri Jun 13 09:13:47 2014 +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.23010]]></VERSION>
+<!--2758CD25B2704AF6BBAD10365FC82C06-->  <VERSION><![CDATA[2.1.23473]]></VERSION>
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <DESCRIPTION><![CDATA[Workspace & Widgets]]></DESCRIPTION>
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <HELP><![CDATA[Provides the infrastructure of workspace tab (formerly My Openbravo)]]></HELP>
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <URL><![CDATA[http://forge.openbravo.com/projects/myopenbravo]]></URL>
--- a/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Jun 13 09:13:47 2014 +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.23010]]></STARTVERSION>
+<!--15F51F03882F444CAB6593B4566DC929-->  <STARTVERSION><![CDATA[2.1.23473]]></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.23010]]></STARTVERSION>
+<!--E71B28FC949D481D9F59C17D01E46EF9-->  <STARTVERSION><![CDATA[3.0.23473]]></STARTVERSION>
 <!--E71B28FC949D481D9F59C17D01E46EF9-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--E71B28FC949D481D9F59C17D01E46EF9-->  <DEPENDANT_MODULE_NAME><![CDATA[Core]]></DEPENDANT_MODULE_NAME>
 <!--E71B28FC949D481D9F59C17D01E46EF9-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_TAB.xml	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_TAB.xml	Fri Jun 13 09:13:47 2014 +0200
@@ -22,6 +22,8 @@
 <!--2B858E00A3064E16B8CC5BE267FE55C2-->  <UIPATTERN><![CDATA[RO]]></UIPATTERN>
 <!--2B858E00A3064E16B8CC5BE267FE55C2-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--2B858E00A3064E16B8CC5BE267FE55C2-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--2B858E00A3064E16B8CC5BE267FE55C2-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--2B858E00A3064E16B8CC5BE267FE55C2-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--2B858E00A3064E16B8CC5BE267FE55C2-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--2B858E00A3064E16B8CC5BE267FE55C2-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--2B858E00A3064E16B8CC5BE267FE55C2-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -49,6 +51,8 @@
 <!--2BA5C4E002C94D54B4CB2992CC47245E-->  <UIPATTERN><![CDATA[STD]]></UIPATTERN>
 <!--2BA5C4E002C94D54B4CB2992CC47245E-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--2BA5C4E002C94D54B4CB2992CC47245E-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--2BA5C4E002C94D54B4CB2992CC47245E-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--2BA5C4E002C94D54B4CB2992CC47245E-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--2BA5C4E002C94D54B4CB2992CC47245E-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--2BA5C4E002C94D54B4CB2992CC47245E-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--2BA5C4E002C94D54B4CB2992CC47245E-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -76,6 +80,8 @@
 <!--4526BAAEC10A4B25A89B66792EF86D31-->  <UIPATTERN><![CDATA[STD]]></UIPATTERN>
 <!--4526BAAEC10A4B25A89B66792EF86D31-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--4526BAAEC10A4B25A89B66792EF86D31-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--4526BAAEC10A4B25A89B66792EF86D31-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--4526BAAEC10A4B25A89B66792EF86D31-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--4526BAAEC10A4B25A89B66792EF86D31-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--4526BAAEC10A4B25A89B66792EF86D31-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--4526BAAEC10A4B25A89B66792EF86D31-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -103,6 +109,8 @@
 <!--64DE7AC24BC745239662A56A0E8FA8A7-->  <UIPATTERN><![CDATA[STD]]></UIPATTERN>
 <!--64DE7AC24BC745239662A56A0E8FA8A7-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--64DE7AC24BC745239662A56A0E8FA8A7-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--64DE7AC24BC745239662A56A0E8FA8A7-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--64DE7AC24BC745239662A56A0E8FA8A7-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--64DE7AC24BC745239662A56A0E8FA8A7-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--64DE7AC24BC745239662A56A0E8FA8A7-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--64DE7AC24BC745239662A56A0E8FA8A7-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -131,6 +139,8 @@
 <!--70D3C99A3C1144B0A7EAAF0A42EAFE31-->  <UIPATTERN><![CDATA[STD]]></UIPATTERN>
 <!--70D3C99A3C1144B0A7EAAF0A42EAFE31-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--70D3C99A3C1144B0A7EAAF0A42EAFE31-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--70D3C99A3C1144B0A7EAAF0A42EAFE31-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--70D3C99A3C1144B0A7EAAF0A42EAFE31-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--70D3C99A3C1144B0A7EAAF0A42EAFE31-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--70D3C99A3C1144B0A7EAAF0A42EAFE31-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--70D3C99A3C1144B0A7EAAF0A42EAFE31-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -158,6 +168,8 @@
 <!--8223D8C9D8244DE1A7B49D5E0861BC6B-->  <UIPATTERN><![CDATA[STD]]></UIPATTERN>
 <!--8223D8C9D8244DE1A7B49D5E0861BC6B-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--8223D8C9D8244DE1A7B49D5E0861BC6B-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--8223D8C9D8244DE1A7B49D5E0861BC6B-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--8223D8C9D8244DE1A7B49D5E0861BC6B-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--8223D8C9D8244DE1A7B49D5E0861BC6B-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--8223D8C9D8244DE1A7B49D5E0861BC6B-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--8223D8C9D8244DE1A7B49D5E0861BC6B-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -187,6 +199,8 @@
 <!--9083A717190E48F0970115C3F739FBF7-->  <UIPATTERN><![CDATA[STD]]></UIPATTERN>
 <!--9083A717190E48F0970115C3F739FBF7-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--9083A717190E48F0970115C3F739FBF7-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--9083A717190E48F0970115C3F739FBF7-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--9083A717190E48F0970115C3F739FBF7-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--9083A717190E48F0970115C3F739FBF7-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--9083A717190E48F0970115C3F739FBF7-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--9083A717190E48F0970115C3F739FBF7-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -214,6 +228,8 @@
 <!--92F00CC55A4840B18B4D868978587B5E-->  <UIPATTERN><![CDATA[STD]]></UIPATTERN>
 <!--92F00CC55A4840B18B4D868978587B5E-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--92F00CC55A4840B18B4D868978587B5E-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--92F00CC55A4840B18B4D868978587B5E-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--92F00CC55A4840B18B4D868978587B5E-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--92F00CC55A4840B18B4D868978587B5E-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--92F00CC55A4840B18B4D868978587B5E-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--92F00CC55A4840B18B4D868978587B5E-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -241,6 +257,8 @@
 <!--B013F445508A41D5908F48575C9CE045-->  <UIPATTERN><![CDATA[RO]]></UIPATTERN>
 <!--B013F445508A41D5908F48575C9CE045-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--B013F445508A41D5908F48575C9CE045-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--B013F445508A41D5908F48575C9CE045-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--B013F445508A41D5908F48575C9CE045-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--B013F445508A41D5908F48575C9CE045-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--B013F445508A41D5908F48575C9CE045-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--B013F445508A41D5908F48575C9CE045-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -268,6 +286,8 @@
 <!--C603DA260A2F444E927B73F28C766D74-->  <UIPATTERN><![CDATA[STD]]></UIPATTERN>
 <!--C603DA260A2F444E927B73F28C766D74-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--C603DA260A2F444E927B73F28C766D74-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--C603DA260A2F444E927B73F28C766D74-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--C603DA260A2F444E927B73F28C766D74-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--C603DA260A2F444E927B73F28C766D74-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--C603DA260A2F444E927B73F28C766D74-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--C603DA260A2F444E927B73F28C766D74-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -295,6 +315,8 @@
 <!--CD7AAE5C65D043ED8A8B790811EAEFA1-->  <UIPATTERN><![CDATA[STD]]></UIPATTERN>
 <!--CD7AAE5C65D043ED8A8B790811EAEFA1-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--CD7AAE5C65D043ED8A8B790811EAEFA1-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--CD7AAE5C65D043ED8A8B790811EAEFA1-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--CD7AAE5C65D043ED8A8B790811EAEFA1-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--CD7AAE5C65D043ED8A8B790811EAEFA1-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--CD7AAE5C65D043ED8A8B790811EAEFA1-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--CD7AAE5C65D043ED8A8B790811EAEFA1-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -322,6 +344,8 @@
 <!--EA867498578C4E98A4935A53A3A5F6AE-->  <UIPATTERN><![CDATA[STD]]></UIPATTERN>
 <!--EA867498578C4E98A4935A53A3A5F6AE-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--EA867498578C4E98A4935A53A3A5F6AE-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--EA867498578C4E98A4935A53A3A5F6AE-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--EA867498578C4E98A4935A53A3A5F6AE-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--EA867498578C4E98A4935A53A3A5F6AE-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--EA867498578C4E98A4935A53A3A5F6AE-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--EA867498578C4E98A4935A53A3A5F6AE-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -350,6 +374,8 @@
 <!--FF808181314242630131426D95280008-->  <UIPATTERN><![CDATA[STD]]></UIPATTERN>
 <!--FF808181314242630131426D95280008-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--FF808181314242630131426D95280008-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--FF808181314242630131426D95280008-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--FF808181314242630131426D95280008-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--FF808181314242630131426D95280008-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--FF808181314242630131426D95280008-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--FF808181314242630131426D95280008-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
--- a/modules/org.openbravo.client.myob/web/org.openbravo.client.myob/js/ob-myopenbravo.js	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.myob/web/org.openbravo.client.myob/js/ob-myopenbravo.js	Fri Jun 13 09:13:47 2014 +0200
@@ -558,7 +558,12 @@
     if (recentList && recentList.length > 0) {
 
       handleClickFunction = function () {
-        OB.Layout.ViewManager.openView(this.recent.viewId, this.recent);
+        // Add the targetTabId as id for using it as the link for the Direct navigation
+        if (this.recent) {
+          this.recent.id = this.recent.targetTabId;
+        }
+        //Direct set to true in order to open just the record selected
+        OB.Layout.ViewManager.openView(this.recent.viewId, this.recent, null, true);
       };
 
       for (; recentIndex < recentList.length; recentIndex++) {
--- a/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE.xml	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE.xml	Fri Jun 13 09:13:47 2014 +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.23010]]></VERSION>
+<!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <VERSION><![CDATA[1.0.23473]]></VERSION>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <DESCRIPTION><![CDATA[Provides the Query/List superclass widget that allows to create widget classes that prints a grid of data based on a query.]]></DESCRIPTION>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <HELP><![CDATA[With this module you can define your own widget classes that just with simple Application Dictionary shows a grid of data based on a HQL Query.]]></HELP>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <URL><![CDATA[http://forge.openbravo.com/projects/querylistwidget]]></URL>
--- a/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Jun 13 09:13:47 2014 +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.23010]]></STARTVERSION>
+<!--26558497C31140BFAB067BA4BC47D799-->  <STARTVERSION><![CDATA[2.1.23473]]></STARTVERSION>
 <!--26558497C31140BFAB067BA4BC47D799-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--26558497C31140BFAB067BA4BC47D799-->  <DEPENDANT_MODULE_NAME><![CDATA[My Openbravo Tab]]></DEPENDANT_MODULE_NAME>
 <!--26558497C31140BFAB067BA4BC47D799-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_TAB.xml	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_TAB.xml	Fri Jun 13 09:13:47 2014 +0200
@@ -22,6 +22,8 @@
 <!--15F16613CF764D948B2B2163F7A9CFF8-->  <UIPATTERN><![CDATA[STD]]></UIPATTERN>
 <!--15F16613CF764D948B2B2163F7A9CFF8-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--15F16613CF764D948B2B2163F7A9CFF8-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--15F16613CF764D948B2B2163F7A9CFF8-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--15F16613CF764D948B2B2163F7A9CFF8-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--15F16613CF764D948B2B2163F7A9CFF8-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--15F16613CF764D948B2B2163F7A9CFF8-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--15F16613CF764D948B2B2163F7A9CFF8-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -49,6 +51,8 @@
 <!--8BA14DE095DE496A82A84FE53F0B9821-->  <UIPATTERN><![CDATA[STD]]></UIPATTERN>
 <!--8BA14DE095DE496A82A84FE53F0B9821-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--8BA14DE095DE496A82A84FE53F0B9821-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--8BA14DE095DE496A82A84FE53F0B9821-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--8BA14DE095DE496A82A84FE53F0B9821-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--8BA14DE095DE496A82A84FE53F0B9821-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--8BA14DE095DE496A82A84FE53F0B9821-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--8BA14DE095DE496A82A84FE53F0B9821-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
@@ -76,6 +80,8 @@
 <!--C6A5082CCE324AC5A48A98814B9D0A3A-->  <UIPATTERN><![CDATA[STD]]></UIPATTERN>
 <!--C6A5082CCE324AC5A48A98814B9D0A3A-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--C6A5082CCE324AC5A48A98814B9D0A3A-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
+<!--C6A5082CCE324AC5A48A98814B9D0A3A-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
+<!--C6A5082CCE324AC5A48A98814B9D0A3A-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
 <!--C6A5082CCE324AC5A48A98814B9D0A3A-->  <EM_OBUIAPP_CAN_ADD><![CDATA[N]]></EM_OBUIAPP_CAN_ADD>
 <!--C6A5082CCE324AC5A48A98814B9D0A3A-->  <EM_OBUIAPP_CAN_DELETE><![CDATA[N]]></EM_OBUIAPP_CAN_DELETE>
 <!--C6A5082CCE324AC5A48A98814B9D0A3A-->  <EM_OBUIAPP_SHOW_SELECT><![CDATA[Y]]></EM_OBUIAPP_SHOW_SELECT>
--- a/modules/org.openbravo.client.querylist/src-db/database/sourcedata/OBUIAPP_PARAMETER.xml	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.querylist/src-db/database/sourcedata/OBUIAPP_PARAMETER.xml	Fri Jun 13 09:13:47 2014 +0200
@@ -18,6 +18,8 @@
 <!--055B5973EDE34DE9B30F3F735A2C86F4-->  <ISFIXED><![CDATA[N]]></ISFIXED>
 <!--055B5973EDE34DE9B30F3F735A2C86F4-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--055B5973EDE34DE9B30F3F735A2C86F4-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--055B5973EDE34DE9B30F3F735A2C86F4-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--055B5973EDE34DE9B30F3F735A2C86F4-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--055B5973EDE34DE9B30F3F735A2C86F4-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[F8E4F382BCFB441CADBB4AC693C41C93]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--055B5973EDE34DE9B30F3F735A2C86F4--></OBUIAPP_PARAMETER>
 
@@ -39,6 +41,8 @@
 <!--13CD381B3DBA4898BC4542408BB2D414-->  <FIXEDVALUE><![CDATA[OB.getContext().getCurrentClient().id]]></FIXEDVALUE>
 <!--13CD381B3DBA4898BC4542408BB2D414-->  <EVALUATEFIXEDVALUE><![CDATA[Y]]></EVALUATEFIXEDVALUE>
 <!--13CD381B3DBA4898BC4542408BB2D414-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--13CD381B3DBA4898BC4542408BB2D414-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--13CD381B3DBA4898BC4542408BB2D414-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--13CD381B3DBA4898BC4542408BB2D414-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[F8E4F382BCFB441CADBB4AC693C41C93]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--13CD381B3DBA4898BC4542408BB2D414--></OBUIAPP_PARAMETER>
 
@@ -60,6 +64,8 @@
 <!--295CA85547D1469FB5304C71891A7EBC-->  <ISFIXED><![CDATA[N]]></ISFIXED>
 <!--295CA85547D1469FB5304C71891A7EBC-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--295CA85547D1469FB5304C71891A7EBC-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--295CA85547D1469FB5304C71891A7EBC-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--295CA85547D1469FB5304C71891A7EBC-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--295CA85547D1469FB5304C71891A7EBC-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[147D825456D54D0486C3D7072531C5C9]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--295CA85547D1469FB5304C71891A7EBC--></OBUIAPP_PARAMETER>
 
@@ -81,6 +87,8 @@
 <!--2961D075BBA04BC09FF763BA94B5D0C6-->  <ISFIXED><![CDATA[N]]></ISFIXED>
 <!--2961D075BBA04BC09FF763BA94B5D0C6-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--2961D075BBA04BC09FF763BA94B5D0C6-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--2961D075BBA04BC09FF763BA94B5D0C6-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--2961D075BBA04BC09FF763BA94B5D0C6-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--2961D075BBA04BC09FF763BA94B5D0C6-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[34F279BBB85945519DC38F21573106C0]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--2961D075BBA04BC09FF763BA94B5D0C6--></OBUIAPP_PARAMETER>
 
@@ -102,6 +110,8 @@
 <!--2AE640505C71440285DEAF8C82EC1C8F-->  <ISFIXED><![CDATA[N]]></ISFIXED>
 <!--2AE640505C71440285DEAF8C82EC1C8F-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--2AE640505C71440285DEAF8C82EC1C8F-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--2AE640505C71440285DEAF8C82EC1C8F-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--2AE640505C71440285DEAF8C82EC1C8F-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--2AE640505C71440285DEAF8C82EC1C8F-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[2A32CF26F3F64FE39C7F94E9D82497D1]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--2AE640505C71440285DEAF8C82EC1C8F--></OBUIAPP_PARAMETER>
 
@@ -122,6 +132,8 @@
 <!--3A93E12C289149CCB2CD1ECA2643469C-->  <ISFIXED><![CDATA[N]]></ISFIXED>
 <!--3A93E12C289149CCB2CD1ECA2643469C-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--3A93E12C289149CCB2CD1ECA2643469C-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--3A93E12C289149CCB2CD1ECA2643469C-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--3A93E12C289149CCB2CD1ECA2643469C-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--3A93E12C289149CCB2CD1ECA2643469C-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[2A32CF26F3F64FE39C7F94E9D82497D1]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--3A93E12C289149CCB2CD1ECA2643469C--></OBUIAPP_PARAMETER>
 
@@ -145,6 +157,8 @@
 <!--49F3E4DE139D429997B272E51459F782-->  <ISFIXED><![CDATA[N]]></ISFIXED>
 <!--49F3E4DE139D429997B272E51459F782-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--49F3E4DE139D429997B272E51459F782-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--49F3E4DE139D429997B272E51459F782-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--49F3E4DE139D429997B272E51459F782-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--49F3E4DE139D429997B272E51459F782-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[8267FB3F59D7401980DDDEFF51FE55C3]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--49F3E4DE139D429997B272E51459F782--></OBUIAPP_PARAMETER>
 
@@ -168,6 +182,8 @@
 <!--4DB58FD3F20C49B69D365EDF261A0DB4-->  <FIXEDVALUE><![CDATA[OB.getContext().getReadableOrganizations()]]></FIXEDVALUE>
 <!--4DB58FD3F20C49B69D365EDF261A0DB4-->  <EVALUATEFIXEDVALUE><![CDATA[Y]]></EVALUATEFIXEDVALUE>
 <!--4DB58FD3F20C49B69D365EDF261A0DB4-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--4DB58FD3F20C49B69D365EDF261A0DB4-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--4DB58FD3F20C49B69D365EDF261A0DB4-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--4DB58FD3F20C49B69D365EDF261A0DB4-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[F8E4F382BCFB441CADBB4AC693C41C93]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--4DB58FD3F20C49B69D365EDF261A0DB4--></OBUIAPP_PARAMETER>
 
@@ -191,6 +207,8 @@
 <!--4FD80623A37C42478E5F71570F98DD05-->  <ISFIXED><![CDATA[N]]></ISFIXED>
 <!--4FD80623A37C42478E5F71570F98DD05-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--4FD80623A37C42478E5F71570F98DD05-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--4FD80623A37C42478E5F71570F98DD05-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--4FD80623A37C42478E5F71570F98DD05-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--4FD80623A37C42478E5F71570F98DD05-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[F8E4F382BCFB441CADBB4AC693C41C93]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--4FD80623A37C42478E5F71570F98DD05--></OBUIAPP_PARAMETER>
 
@@ -212,6 +230,8 @@
 <!--5BC2F2EC1140442CA332446CFB9B84BE-->  <FIXEDVALUE><![CDATA[OB.getContext().getCurrentClient().id]]></FIXEDVALUE>
 <!--5BC2F2EC1140442CA332446CFB9B84BE-->  <EVALUATEFIXEDVALUE><![CDATA[Y]]></EVALUATEFIXEDVALUE>
 <!--5BC2F2EC1140442CA332446CFB9B84BE-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--5BC2F2EC1140442CA332446CFB9B84BE-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--5BC2F2EC1140442CA332446CFB9B84BE-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--5BC2F2EC1140442CA332446CFB9B84BE-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[2662490B7D3B4F80AF308C88F6DB68C0]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--5BC2F2EC1140442CA332446CFB9B84BE--></OBUIAPP_PARAMETER>
 
@@ -235,6 +255,8 @@
 <!--673A1531AE3742D88A02E5E860B966CE-->  <ISFIXED><![CDATA[N]]></ISFIXED>
 <!--673A1531AE3742D88A02E5E860B966CE-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--673A1531AE3742D88A02E5E860B966CE-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--673A1531AE3742D88A02E5E860B966CE-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--673A1531AE3742D88A02E5E860B966CE-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--673A1531AE3742D88A02E5E860B966CE-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[2662490B7D3B4F80AF308C88F6DB68C0]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--673A1531AE3742D88A02E5E860B966CE--></OBUIAPP_PARAMETER>
 
@@ -256,6 +278,8 @@
 <!--7DC0751F8EA64F738DCD618B244407B7-->  <ISFIXED><![CDATA[N]]></ISFIXED>
 <!--7DC0751F8EA64F738DCD618B244407B7-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--7DC0751F8EA64F738DCD618B244407B7-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--7DC0751F8EA64F738DCD618B244407B7-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--7DC0751F8EA64F738DCD618B244407B7-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--7DC0751F8EA64F738DCD618B244407B7-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[8267FB3F59D7401980DDDEFF51FE55C3]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--7DC0751F8EA64F738DCD618B244407B7--></OBUIAPP_PARAMETER>
 
@@ -279,6 +303,8 @@
 <!--7DF9ECB3B365453AB0F18978049477C1-->  <ISFIXED><![CDATA[N]]></ISFIXED>
 <!--7DF9ECB3B365453AB0F18978049477C1-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--7DF9ECB3B365453AB0F18978049477C1-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--7DF9ECB3B365453AB0F18978049477C1-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--7DF9ECB3B365453AB0F18978049477C1-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--7DF9ECB3B365453AB0F18978049477C1-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[147D825456D54D0486C3D7072531C5C9]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--7DF9ECB3B365453AB0F18978049477C1--></OBUIAPP_PARAMETER>
 
@@ -300,6 +326,8 @@
 <!--7EB5F1B2034B433592BAA571F3B45013-->  <ISFIXED><![CDATA[N]]></ISFIXED>
 <!--7EB5F1B2034B433592BAA571F3B45013-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--7EB5F1B2034B433592BAA571F3B45013-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--7EB5F1B2034B433592BAA571F3B45013-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--7EB5F1B2034B433592BAA571F3B45013-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--7EB5F1B2034B433592BAA571F3B45013-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[34F279BBB85945519DC38F21573106C0]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--7EB5F1B2034B433592BAA571F3B45013--></OBUIAPP_PARAMETER>
 
@@ -323,6 +351,8 @@
 <!--82EA1952C11049629EF3FD6BE0FB8788-->  <ISFIXED><![CDATA[N]]></ISFIXED>
 <!--82EA1952C11049629EF3FD6BE0FB8788-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--82EA1952C11049629EF3FD6BE0FB8788-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--82EA1952C11049629EF3FD6BE0FB8788-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--82EA1952C11049629EF3FD6BE0FB8788-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--82EA1952C11049629EF3FD6BE0FB8788-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[147D825456D54D0486C3D7072531C5C9]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--82EA1952C11049629EF3FD6BE0FB8788--></OBUIAPP_PARAMETER>
 
@@ -344,6 +374,8 @@
 <!--85337BACFD654FB682935663BAFE067A-->  <ISFIXED><![CDATA[N]]></ISFIXED>
 <!--85337BACFD654FB682935663BAFE067A-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--85337BACFD654FB682935663BAFE067A-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--85337BACFD654FB682935663BAFE067A-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--85337BACFD654FB682935663BAFE067A-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--85337BACFD654FB682935663BAFE067A-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[147D825456D54D0486C3D7072531C5C9]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--85337BACFD654FB682935663BAFE067A--></OBUIAPP_PARAMETER>
 
@@ -365,6 +397,8 @@
 <!--9049BDED6A664F93B2A4EA9084C96A55-->  <ISFIXED><![CDATA[N]]></ISFIXED>
 <!--9049BDED6A664F93B2A4EA9084C96A55-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--9049BDED6A664F93B2A4EA9084C96A55-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--9049BDED6A664F93B2A4EA9084C96A55-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--9049BDED6A664F93B2A4EA9084C96A55-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--9049BDED6A664F93B2A4EA9084C96A55-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[8267FB3F59D7401980DDDEFF51FE55C3]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--9049BDED6A664F93B2A4EA9084C96A55--></OBUIAPP_PARAMETER>
 
@@ -388,6 +422,8 @@
 <!--915CDEE8D7954D17A01328E33F28FE88-->  <ISFIXED><![CDATA[N]]></ISFIXED>
 <!--915CDEE8D7954D17A01328E33F28FE88-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--915CDEE8D7954D17A01328E33F28FE88-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--915CDEE8D7954D17A01328E33F28FE88-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--915CDEE8D7954D17A01328E33F28FE88-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--915CDEE8D7954D17A01328E33F28FE88-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[34F279BBB85945519DC38F21573106C0]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--915CDEE8D7954D17A01328E33F28FE88--></OBUIAPP_PARAMETER>
 
@@ -409,6 +445,8 @@
 <!--986388F09F4F4465A3CC3D6A4E381F57-->  <FIXEDVALUE><![CDATA[OB.getContext().getCurrentClient().id]]></FIXEDVALUE>
 <!--986388F09F4F4465A3CC3D6A4E381F57-->  <EVALUATEFIXEDVALUE><![CDATA[Y]]></EVALUATEFIXEDVALUE>
 <!--986388F09F4F4465A3CC3D6A4E381F57-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--986388F09F4F4465A3CC3D6A4E381F57-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--986388F09F4F4465A3CC3D6A4E381F57-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--986388F09F4F4465A3CC3D6A4E381F57-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[34F279BBB85945519DC38F21573106C0]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--986388F09F4F4465A3CC3D6A4E381F57--></OBUIAPP_PARAMETER>
 
@@ -430,6 +468,8 @@
 <!--9A19936CAFDB4198BB5D3F1EA9D9BF52-->  <FIXEDVALUE><![CDATA[OB.getContext().getCurrentClient().id]]></FIXEDVALUE>
 <!--9A19936CAFDB4198BB5D3F1EA9D9BF52-->  <EVALUATEFIXEDVALUE><![CDATA[Y]]></EVALUATEFIXEDVALUE>
 <!--9A19936CAFDB4198BB5D3F1EA9D9BF52-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--9A19936CAFDB4198BB5D3F1EA9D9BF52-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--9A19936CAFDB4198BB5D3F1EA9D9BF52-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--9A19936CAFDB4198BB5D3F1EA9D9BF52-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[8267FB3F59D7401980DDDEFF51FE55C3]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--9A19936CAFDB4198BB5D3F1EA9D9BF52--></OBUIAPP_PARAMETER>
 
@@ -453,6 +493,8 @@
 <!--9A6CC0A824134C0BA5022C74341B2F77-->  <FIXEDVALUE><![CDATA[OB.getContext().getReadableOrganizations()]]></FIXEDVALUE>
 <!--9A6CC0A824134C0BA5022C74341B2F77-->  <EVALUATEFIXEDVALUE><![CDATA[Y]]></EVALUATEFIXEDVALUE>
 <!--9A6CC0A824134C0BA5022C74341B2F77-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--9A6CC0A824134C0BA5022C74341B2F77-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--9A6CC0A824134C0BA5022C74341B2F77-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--9A6CC0A824134C0BA5022C74341B2F77-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[147D825456D54D0486C3D7072531C5C9]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--9A6CC0A824134C0BA5022C74341B2F77--></OBUIAPP_PARAMETER>
 
@@ -474,6 +516,8 @@
 <!--A0A9C9C09E3E4B3FB139B336B142318C-->  <ISFIXED><![CDATA[N]]></ISFIXED>
 <!--A0A9C9C09E3E4B3FB139B336B142318C-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--A0A9C9C09E3E4B3FB139B336B142318C-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--A0A9C9C09E3E4B3FB139B336B142318C-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--A0A9C9C09E3E4B3FB139B336B142318C-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--A0A9C9C09E3E4B3FB139B336B142318C-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[2662490B7D3B4F80AF308C88F6DB68C0]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--A0A9C9C09E3E4B3FB139B336B142318C--></OBUIAPP_PARAMETER>
 
@@ -497,6 +541,8 @@
 <!--A25B44403B41453EB74662BE7CADE8E6-->  <ISFIXED><![CDATA[N]]></ISFIXED>
 <!--A25B44403B41453EB74662BE7CADE8E6-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--A25B44403B41453EB74662BE7CADE8E6-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--A25B44403B41453EB74662BE7CADE8E6-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--A25B44403B41453EB74662BE7CADE8E6-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--A25B44403B41453EB74662BE7CADE8E6-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[8267FB3F59D7401980DDDEFF51FE55C3]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--A25B44403B41453EB74662BE7CADE8E6--></OBUIAPP_PARAMETER>
 
@@ -518,6 +564,8 @@
 <!--A7A63C2BB6114D999FE017B516FEF6BD-->  <ISFIXED><![CDATA[N]]></ISFIXED>
 <!--A7A63C2BB6114D999FE017B516FEF6BD-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--A7A63C2BB6114D999FE017B516FEF6BD-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--A7A63C2BB6114D999FE017B516FEF6BD-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--A7A63C2BB6114D999FE017B516FEF6BD-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--A7A63C2BB6114D999FE017B516FEF6BD-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[F8E4F382BCFB441CADBB4AC693C41C93]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--A7A63C2BB6114D999FE017B516FEF6BD--></OBUIAPP_PARAMETER>
 
@@ -541,6 +589,8 @@
 <!--A951D8B8F9AC48DEB9A08B79D973F37F-->  <ISFIXED><![CDATA[N]]></ISFIXED>
 <!--A951D8B8F9AC48DEB9A08B79D973F37F-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--A951D8B8F9AC48DEB9A08B79D973F37F-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--A951D8B8F9AC48DEB9A08B79D973F37F-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--A951D8B8F9AC48DEB9A08B79D973F37F-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--A951D8B8F9AC48DEB9A08B79D973F37F-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[F8E4F382BCFB441CADBB4AC693C41C93]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--A951D8B8F9AC48DEB9A08B79D973F37F--></OBUIAPP_PARAMETER>
 
@@ -562,6 +612,8 @@
 <!--B4C48DBD0EDF43E8958DBA507CA1D75D-->  <ISFIXED><![CDATA[N]]></ISFIXED>
 <!--B4C48DBD0EDF43E8958DBA507CA1D75D-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--B4C48DBD0EDF43E8958DBA507CA1D75D-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--B4C48DBD0EDF43E8958DBA507CA1D75D-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--B4C48DBD0EDF43E8958DBA507CA1D75D-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--B4C48DBD0EDF43E8958DBA507CA1D75D-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[F8E4F382BCFB441CADBB4AC693C41C93]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--B4C48DBD0EDF43E8958DBA507CA1D75D--></OBUIAPP_PARAMETER>
 
@@ -583,6 +635,8 @@
 <!--B69521B5EEF14B578FB69FF5B353530E-->  <ISFIXED><![CDATA[N]]></ISFIXED>
 <!--B69521B5EEF14B578FB69FF5B353530E-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--B69521B5EEF14B578FB69FF5B353530E-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--B69521B5EEF14B578FB69FF5B353530E-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--B69521B5EEF14B578FB69FF5B353530E-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--B69521B5EEF14B578FB69FF5B353530E-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[2662490B7D3B4F80AF308C88F6DB68C0]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--B69521B5EEF14B578FB69FF5B353530E--></OBUIAPP_PARAMETER>
 
@@ -604,6 +658,8 @@
 <!--B9096C5B26D54130B7DD5E6DC2FFCE35-->  <ISFIXED><![CDATA[N]]></ISFIXED>
 <!--B9096C5B26D54130B7DD5E6DC2FFCE35-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--B9096C5B26D54130B7DD5E6DC2FFCE35-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--B9096C5B26D54130B7DD5E6DC2FFCE35-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--B9096C5B26D54130B7DD5E6DC2FFCE35-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--B9096C5B26D54130B7DD5E6DC2FFCE35-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[8267FB3F59D7401980DDDEFF51FE55C3]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--B9096C5B26D54130B7DD5E6DC2FFCE35--></OBUIAPP_PARAMETER>
 
@@ -625,6 +681,8 @@
 <!--CE2B1B71E2C24E70825601B9D32EE75E-->  <ISFIXED><![CDATA[N]]></ISFIXED>
 <!--CE2B1B71E2C24E70825601B9D32EE75E-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--CE2B1B71E2C24E70825601B9D32EE75E-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--CE2B1B71E2C24E70825601B9D32EE75E-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--CE2B1B71E2C24E70825601B9D32EE75E-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--CE2B1B71E2C24E70825601B9D32EE75E-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[2662490B7D3B4F80AF308C88F6DB68C0]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--CE2B1B71E2C24E70825601B9D32EE75E--></OBUIAPP_PARAMETER>
 
@@ -646,6 +704,8 @@
 <!--D0335F9B1A45470A990020CE2ADA3286-->  <ISFIXED><![CDATA[N]]></ISFIXED>
 <!--D0335F9B1A45470A990020CE2ADA3286-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--D0335F9B1A45470A990020CE2ADA3286-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--D0335F9B1A45470A990020CE2ADA3286-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--D0335F9B1A45470A990020CE2ADA3286-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--D0335F9B1A45470A990020CE2ADA3286-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[8267FB3F59D7401980DDDEFF51FE55C3]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--D0335F9B1A45470A990020CE2ADA3286--></OBUIAPP_PARAMETER>
 
@@ -669,6 +729,8 @@
 <!--D06EBB6A9B8643F1839D69269915A333-->  <FIXEDVALUE><![CDATA[OB.getContext().getReadableOrganizations()]]></FIXEDVALUE>
 <!--D06EBB6A9B8643F1839D69269915A333-->  <EVALUATEFIXEDVALUE><![CDATA[Y]]></EVALUATEFIXEDVALUE>
 <!--D06EBB6A9B8643F1839D69269915A333-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--D06EBB6A9B8643F1839D69269915A333-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--D06EBB6A9B8643F1839D69269915A333-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--D06EBB6A9B8643F1839D69269915A333-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[2662490B7D3B4F80AF308C88F6DB68C0]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--D06EBB6A9B8643F1839D69269915A333--></OBUIAPP_PARAMETER>
 
@@ -690,6 +752,8 @@
 <!--D5DE165821F24FCC85707DDEA592BB27-->  <ISFIXED><![CDATA[N]]></ISFIXED>
 <!--D5DE165821F24FCC85707DDEA592BB27-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--D5DE165821F24FCC85707DDEA592BB27-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--D5DE165821F24FCC85707DDEA592BB27-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--D5DE165821F24FCC85707DDEA592BB27-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--D5DE165821F24FCC85707DDEA592BB27-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[34F279BBB85945519DC38F21573106C0]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--D5DE165821F24FCC85707DDEA592BB27--></OBUIAPP_PARAMETER>
 
@@ -711,6 +775,8 @@
 <!--D7B3F78390A4477D84811E58FA6DC7E3-->  <FIXEDVALUE><![CDATA[OB.getContext().getCurrentClient().id]]></FIXEDVALUE>
 <!--D7B3F78390A4477D84811E58FA6DC7E3-->  <EVALUATEFIXEDVALUE><![CDATA[Y]]></EVALUATEFIXEDVALUE>
 <!--D7B3F78390A4477D84811E58FA6DC7E3-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--D7B3F78390A4477D84811E58FA6DC7E3-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--D7B3F78390A4477D84811E58FA6DC7E3-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--D7B3F78390A4477D84811E58FA6DC7E3-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[147D825456D54D0486C3D7072531C5C9]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--D7B3F78390A4477D84811E58FA6DC7E3--></OBUIAPP_PARAMETER>
 
@@ -732,6 +798,8 @@
 <!--E461447FAC5741098A4824449DA12709-->  <ISFIXED><![CDATA[N]]></ISFIXED>
 <!--E461447FAC5741098A4824449DA12709-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--E461447FAC5741098A4824449DA12709-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--E461447FAC5741098A4824449DA12709-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--E461447FAC5741098A4824449DA12709-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--E461447FAC5741098A4824449DA12709-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[147D825456D54D0486C3D7072531C5C9]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--E461447FAC5741098A4824449DA12709--></OBUIAPP_PARAMETER>
 
@@ -755,6 +823,8 @@
 <!--E5824A3DCC9D475EAC49D01BAB9A94C9-->  <ISFIXED><![CDATA[N]]></ISFIXED>
 <!--E5824A3DCC9D475EAC49D01BAB9A94C9-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--E5824A3DCC9D475EAC49D01BAB9A94C9-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--E5824A3DCC9D475EAC49D01BAB9A94C9-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--E5824A3DCC9D475EAC49D01BAB9A94C9-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--E5824A3DCC9D475EAC49D01BAB9A94C9-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[34F279BBB85945519DC38F21573106C0]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--E5824A3DCC9D475EAC49D01BAB9A94C9--></OBUIAPP_PARAMETER>
 
@@ -778,6 +848,8 @@
 <!--E5EE883287774E28AC9621D70CCF50DB-->  <FIXEDVALUE><![CDATA[OB.getContext().getReadableOrganizations()]]></FIXEDVALUE>
 <!--E5EE883287774E28AC9621D70CCF50DB-->  <EVALUATEFIXEDVALUE><![CDATA[Y]]></EVALUATEFIXEDVALUE>
 <!--E5EE883287774E28AC9621D70CCF50DB-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--E5EE883287774E28AC9621D70CCF50DB-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--E5EE883287774E28AC9621D70CCF50DB-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--E5EE883287774E28AC9621D70CCF50DB-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[8267FB3F59D7401980DDDEFF51FE55C3]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--E5EE883287774E28AC9621D70CCF50DB--></OBUIAPP_PARAMETER>
 
@@ -801,6 +873,8 @@
 <!--F2D289D700814FB7B4E1F746A1C0C101-->  <FIXEDVALUE><![CDATA[OB.getContext().getReadableOrganizations()]]></FIXEDVALUE>
 <!--F2D289D700814FB7B4E1F746A1C0C101-->  <EVALUATEFIXEDVALUE><![CDATA[Y]]></EVALUATEFIXEDVALUE>
 <!--F2D289D700814FB7B4E1F746A1C0C101-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--F2D289D700814FB7B4E1F746A1C0C101-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--F2D289D700814FB7B4E1F746A1C0C101-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--F2D289D700814FB7B4E1F746A1C0C101-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[34F279BBB85945519DC38F21573106C0]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--F2D289D700814FB7B4E1F746A1C0C101--></OBUIAPP_PARAMETER>
 
@@ -824,6 +898,8 @@
 <!--F6CC88DE80C644F6901F5132CF2919E8-->  <ISFIXED><![CDATA[N]]></ISFIXED>
 <!--F6CC88DE80C644F6901F5132CF2919E8-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--F6CC88DE80C644F6901F5132CF2919E8-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--F6CC88DE80C644F6901F5132CF2919E8-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--F6CC88DE80C644F6901F5132CF2919E8-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--F6CC88DE80C644F6901F5132CF2919E8-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[2662490B7D3B4F80AF308C88F6DB68C0]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--F6CC88DE80C644F6901F5132CF2919E8--></OBUIAPP_PARAMETER>
 
--- a/modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE.xml	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE.xml	Fri Jun 13 09:13:47 2014 +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.23010]]></VERSION>
+<!--FF8080812D842086012D844F3CC0003E-->  <VERSION><![CDATA[0.0.23473]]></VERSION>
 <!--FF8080812D842086012D844F3CC0003E-->  <DESCRIPTION><![CDATA[Collection of Workspace Widgets]]></DESCRIPTION>
 <!--FF8080812D842086012D844F3CC0003E-->  <HELP><![CDATA[Collection of Workspace Widgets]]></HELP>
 <!--FF8080812D842086012D844F3CC0003E-->  <URL><![CDATA[http://forge.openbravo.com/projects/widgetscollection]]></URL>
--- a/modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Jun 13 09:13:47 2014 +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.23010]]></STARTVERSION>
+<!--FF8080812D842086012D845002070046-->  <STARTVERSION><![CDATA[2.1.23473]]></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.client.widgets/src-db/database/sourcedata/OBUIAPP_PARAMETER.xml	Thu Jun 12 18:58:57 2014 +0200
+++ b/modules/org.openbravo.client.widgets/src-db/database/sourcedata/OBUIAPP_PARAMETER.xml	Fri Jun 13 09:13:47 2014 +0200
@@ -18,6 +18,8 @@
 <!--04718E066E4E4C71BC35BBE44433BBC1-->  <FIXEDVALUE><![CDATA[<div style="width:100%" id="__ss_5987543"><iframe src="http://www.slideshare.net/slideshow/embed_code/5987543" height="100%" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" width="100%"></iframe> </div> ]]></FIXEDVALUE>
 <!--04718E066E4E4C71BC35BBE44433BBC1-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--04718E066E4E4C71BC35BBE44433BBC1-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--04718E066E4E4C71BC35BBE44433BBC1-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--04718E066E4E4C71BC35BBE44433BBC1-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--04718E066E4E4C71BC35BBE44433BBC1-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[8A6B99392E2D9088012E2DCFC39B005F]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--04718E066E4E4C71BC35BBE44433BBC1--></OBUIAPP_PARAMETER>
 
@@ -39,6 +41,8 @@
 <!--14A332D4D9534D5D84F399FF8128462E-->  <FIXEDVALUE><![CDATA[300]]></FIXEDVALUE>
 <!--14A332D4D9534D5D84F399FF8128462E-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--14A332D4D9534D5D84F399FF8128462E-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--14A332D4D9534D5D84F399FF8128462E-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--14A332D4D9534D5D84F399FF8128462E-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--14A332D4D9534D5D84F399FF8128462E-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[8A6B99392E2D9088012E2DE2AD61008C]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--14A332D4D9534D5D84F399FF8128462E--></OBUIAPP_PARAMETER>
 
@@ -61,6 +65,8 @@
 <!--1AEA9B70557645689F0BBA587EA3EAD1-->  <ISFIXED><![CDATA[N]]></ISFIXED>
 <!--1AEA9B70557645689F0BBA587EA3EAD1-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--1AEA9B70557645689F0BBA587EA3EAD1-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--1AEA9B70557645689F0BBA587EA3EAD1-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--1AEA9B70557645689F0BBA587EA3EAD1-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--1AEA9B70557645689F0BBA587EA3EAD1-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[6E3AC867DCB34C068DEED85B40611FD8]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--1AEA9B70557645689F0BBA587EA3EAD1--></OBUIAPP_PARAMETER>
 
@@ -82,6 +88,8 @@
 <!--32FD51D9E69C43339CE3AF2E5D021050-->  <FIXEDVALUE><![CDATA[300]]></FIXEDVALUE>
 <!--32FD51D9E69C43339CE3AF2E5D021050-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--32FD51D9E69C43339CE3AF2E5D021050-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--32FD51D9E69C43339CE3AF2E5D021050-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--32FD51D9E69C43339CE3AF2E5D021050-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--32FD51D9E69C43339CE3AF2E5D021050-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[8A6B99392E2D9088012E2DCFC39B005F]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--32FD51D9E69C43339CE3AF2E5D021050--></OBUIAPP_PARAMETER>
 
@@ -102,6 +110,8 @@
 <!--422FBBBF8D334318824E76F0CF4D604F-->  <ISFIXED><![CDATA[N]]></ISFIXED>
 <!--422FBBBF8D334318824E76F0CF4D604F-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--422FBBBF8D334318824E76F0CF4D604F-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--422FBBBF8D334318824E76F0CF4D604F-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--422FBBBF8D334318824E76F0CF4D604F-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--422FBBBF8D334318824E76F0CF4D604F-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[CD1B06C4ED974B5F905A5A01B097DF4E]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--422FBBBF8D334318824E76F0CF4D604F--></OBUIAPP_PARAMETER>
 
@@ -123,6 +133,8 @@
 <!--45DC3EC7E77C4A7B93F120A52DBF7814-->  <FIXEDVALUE><![CDATA[OB.getContext().getCurrentClient().id]]></FIXEDVALUE>
 <!--45DC3EC7E77C4A7B93F120A52DBF7814-->  <EVALUATEFIXEDVALUE><![CDATA[Y]]></EVALUATEFIXEDVALUE>
 <!--45DC3EC7E77C4A7B93F120A52DBF7814-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--45DC3EC7E77C4A7B93F120A52DBF7814-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--45DC3EC7E77C4A7B93F120A52DBF7814-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--45DC3EC7E77C4A7B93F120A52DBF7814-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[CD1B06C4ED974B5F905A5A01B097DF4E]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--45DC3EC7E77C4A7B93F120A52DBF7814--></OBUIAPP_PARAMETER>
 
@@ -144,6 +156,8 @@
 <!--5417C70DA8A9491BB1E3B78D956D52E0-->  <FIXEDVALUE><![CDATA[300]]></FIXEDVALUE>
 <!--5417C70DA8A9491BB1E3B78D956D52E0-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--5417C70DA8A9491BB1E3B78D956D52E0-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--5417C70DA8A9491BB1E3B78D956D52E0-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--5417C70DA8A9491BB1E3B78D956D52E0-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--5417C70DA8A9491BB1E3B78D956D52E0-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[8A6B99392E2B4192012E2B58F5790056]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--5417C70DA8A9491BB1E3B78D956D52E0--></OBUIAPP_PARAMETER>
 
@@ -165,6 +179,8 @@
 <!--5479B44FEC814ACF825FA3B66D6DF25B-->  <ISFIXED><![CDATA[N]]></ISFIXED>
 <!--5479B44FEC814ACF825FA3B66D6DF25B-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--5479B44FEC814ACF825FA3B66D6DF25B-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--5479B44FEC814ACF825FA3B66D6DF25B-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--5479B44FEC814ACF825FA3B66D6DF25B-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--5479B44FEC814ACF825FA3B66D6DF25B-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[862EEC18D6FC4FA68E7867E3CF337CC7]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--5479B44FEC814ACF825FA3B66D6DF25B--></OBUIAPP_PARAMETER>
 
@@ -185,6 +201,8 @@
 <!--5DA6BE86940349C58FF5A3CC9A3F8FFF-->  <ISFIXED><![CDATA[N]]></ISFIXED>
 <!--5DA6BE86940349C58FF5A3CC9A3F8FFF-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--5DA6BE86940349C58FF5A3CC9A3F8FFF-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--5DA6BE86940349C58FF5A3CC9A3F8FFF-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--5DA6BE86940349C58FF5A3CC9A3F8FFF-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--5DA6BE86940349C58FF5A3CC9A3F8FFF-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[5B41A19E11494C519BE33BBED6012DAE]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--5DA6BE86940349C58FF5A3CC9A3F8FFF--></OBUIAPP_PARAMETER>
 
@@ -205,6 +223,8 @@
 <!--61C0446937F449BC9FC32EC62857C504-->  <ISFIXED><![CDATA[Y]]></ISFIXED>
 <!--61C0446937F449BC9FC32EC62857C504-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--61C0446937F449BC9FC32EC62857C504-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--61C0446937F449BC9FC32EC62857C504-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--61C0446937F449BC9FC32EC62857C504-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--61C0446937F449BC9FC32EC62857C504-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[8A6B99392E2D9088012E2DCFC39B005F]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--61C0446937F449BC9FC32EC62857C504--></OBUIAPP_PARAMETER>
 
@@ -228,6 +248,8 @@
 <!--63F9DAAA7C334B968A1CFB757F87B342-->  <ISFIXED><![CDATA[N]]></ISFIXED>
 <!--63F9DAAA7C334B968A1CFB757F87B342-->  <EVALUATEFIXEDVALUE><![CDATA[N]]></EVALUATEFIXEDVALUE>
 <!--63F9DAAA7C334B968A1CFB757F87B342-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--63F9DAAA7C334B968A1CFB757F87B342-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--63F9DAAA7C334B968A1CFB757F87B342-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--63F9DAAA7C334B968A1CFB757F87B342-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[862EEC18D6FC4FA68E7867E3CF337CC7]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--63F9DAAA7C334B968A1CFB757F87B342--></OBUIAPP_PARAMETER>
 
@@ -249,6 +271,8 @@
 <!--7832D8716E2A46D28090EE0575239D3F-->  <FIXEDVALUE><![CDATA[OB.getContext().getUser().id]]></FIXEDVALUE>
 <!--7832D8716E2A46D28090EE0575239D3F-->  <EVALUATEFIXEDVALUE><![CDATA[Y]]></EVALUATEFIXEDVALUE>
 <!--7832D8716E2A46D28090EE0575239D3F-->  <STARTINNEWLINE><![CDATA[N]]></STARTINNEWLINE>
+<!--7832D8716E2A46D28090EE0575239D3F-->  <DISPLAYEDROWS><![CDATA[5]]></DISPLAYEDROWS>
+<!--7832D8716E2A46D28090EE0575239D3F-->  <DISPLAYTITLE><![CDATA[N]]></DISPLAYTITLE>
 <!--7832D8716E2A46D28090EE0575239D3F-->  <EM_OBKMO_WIDGET_CLASS_ID><![CDATA[862EEC18D6FC4FA68E7867E3CF337CC7]]></EM_OBKMO_WIDGET_CLASS_ID>
 <!--7832D8716E2A46D28090EE0575239D3F--></OBUIAPP_PARAMETER>
 
@@ -270,6 +294,8 @@
 <!--8DD513DA5