Merged with pi changeset 19191:d67e4d8ad581
authorMikel Irurita <mikel.irurita@openbravo.com>
Thu, 10 Jan 2013 13:17:14 +0100
changeset 19562 538f78321be2
parent 19561 724e0684566c (current diff)
parent 19191 d67e4d8ad581 (diff)
child 19563 cb44af1d5e4e
Merged with pi changeset 19191:d67e4d8ad581
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_COLUMN.xml
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_PROCESS.xml
modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_PROCESS_PARA.xml
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/AdvPaymentMngtDao.java
src-db/database/sourcedata/AD_AUXILIARINPUT.xml
src-db/database/sourcedata/AD_COLUMN.xml
src-db/database/sourcedata/AD_ELEMENT.xml
src-db/database/sourcedata/AD_FIELD.xml
src-db/database/sourcedata/AD_MENU.xml
src-db/database/sourcedata/AD_REFERENCE.xml
src-db/database/sourcedata/AD_REF_LIST.xml
src-db/database/sourcedata/AD_TAB.xml
src-db/database/sourcedata/AD_VAL_RULE.xml
src-db/database/sourcedata/AD_WINDOW.xml
src/org/openbravo/erpCommon/ad_forms/AcctServer.java
src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java
src/org/openbravo/erpCommon/ad_forms/DocFINReconciliation.java
--- a/.hgsigs	Fri Dec 21 16:24:55 2012 +0100
+++ b/.hgsigs	Thu Jan 10 13:17:14 2013 +0100
@@ -91,3 +91,6 @@
 dcee1af5f243600cbed68798e892b7ba73a06ffa 0 iEYEABECAAYFAlC081kACgkQCX/oGf+2qkMU0ACfVvvLz1k+IF5axkQ2PQbFbJdLAVgAoN8XtUH6J76jpKSCx3GriplFPxdl
 d9dc1dcdb1f7da6ca0e0fcff57ac4f6c2f5e938c 0 iEYEABECAAYFAlCj2v8ACgkQCX/oGf+2qkPEsgCeOLWp7v5gU6Ip90kOBdOF+mejRHsAoObtRXJVe+gNq2nUa7Xu1EbVxsag
 3ded67251154d0aa958eacb918de97fd5a77e3dc 0 iEYEABECAAYFAlC3tuIACgkQCX/oGf+2qkO0zgCdFACe5suzHq8pukNoc8ghZJlvO6UAn3wzW4/wmIEfmngxthdtqRTrSQ2X
+bf495495c05c0e9414450e54d6da22ec685bd21a 0 iEYEABECAAYFAlDT6OkACgkQCX/oGf+2qkMqegCdEjWD+dHlIP66pL/adAL3iuBYXsUAoJvOAhmZbvUSUIZhI44gkjlnCbYu
+9fd46b5349c522407c7fe4eaedeed678487e02a2 0 iEYEABECAAYFAlDK72cACgkQCX/oGf+2qkNv1gCfYsphl/F7dyNNh+u046YI9RwEdD4AoMPAoXJFhg9rV8gF6tZgeSMSAOV3
+73102dce4ea86f1b3fab97709f1832f39f89d227 0 iEYEABECAAYFAlDYYXMACgkQCX/oGf+2qkNpJQCg09+Ojgco2TaKN6BlNC4888yhLCgAoJfCfQ/93ePShFci2Fic/lzeg/wL
--- a/.hgtags	Fri Dec 21 16:24:55 2012 +0100
+++ b/.hgtags	Thu Jan 10 13:17:14 2013 +0100
@@ -102,3 +102,6 @@
 c8ad7ddf47ddda7a33b56bafceff8d1ae5dadef2 3.0MP16.3
 f731024ec763373bd02a0825d0f42e1ddb15eb32 3.0MP17
 41ad849c6978ec887187853448c1f1a79fc01c4f 3.0MP17.1
+814d8af3a240b363c9bcba7cf7ae839c8822ecce 3.0MP17.2
+43986bd34e503950718f87d719d70fccfc8607fe 3.0MP18
+26a81bd13b9118ce8591e58ed7d04533469708f0 3.0MP18.1
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_COLUMN.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_COLUMN.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -8310,7 +8310,7 @@
 <!--E206BFA90CC94498B257BC65C516B9C5-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--E206BFA90CC94498B257BC65C516B9C5-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--E206BFA90CC94498B257BC65C516B9C5-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
-<!--E206BFA90CC94498B257BC65C516B9C5-->  <POSITION><![CDATA[38]]></POSITION>
+<!--E206BFA90CC94498B257BC65C516B9C5-->  <POSITION><![CDATA[42]]></POSITION>
 <!--E206BFA90CC94498B257BC65C516B9C5-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--E206BFA90CC94498B257BC65C516B9C5-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
 <!--E206BFA90CC94498B257BC65C516B9C5-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_FIELD.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -795,7 +795,7 @@
 <!--110FB2A04E69473784A8478D0BD8B3FB-->  <AD_COLUMN_ID><![CDATA[E206BFA90CC94498B257BC65C516B9C5]]></AD_COLUMN_ID>
 <!--110FB2A04E69473784A8478D0BD8B3FB-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--110FB2A04E69473784A8478D0BD8B3FB-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
-<!--110FB2A04E69473784A8478D0BD8B3FB-->  <DISPLAYLOGIC><![CDATA[@NumberOfAcctSchemas@=1 & @FIN_Payment_ID@='' & @Processed@='Y']]></DISPLAYLOGIC>
+<!--110FB2A04E69473784A8478D0BD8B3FB-->  <DISPLAYLOGIC><![CDATA[@NumberOfAcctSchemas@=1 & @FIN_Payment_ID@='' & @Processed@='Y' & @Open_Items@='Y']]></DISPLAYLOGIC>
 <!--110FB2A04E69473784A8478D0BD8B3FB-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
 <!--110FB2A04E69473784A8478D0BD8B3FB-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--110FB2A04E69473784A8478D0BD8B3FB-->  <SEQNO><![CDATA[240]]></SEQNO>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MENU.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MENU.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -131,7 +131,7 @@
 <!--DB84EB9507F34D9B802DDA0B1041B602-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--DB84EB9507F34D9B802DDA0B1041B602-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--DB84EB9507F34D9B802DDA0B1041B602-->  <NAME><![CDATA[Payment In]]></NAME>
-<!--DB84EB9507F34D9B802DDA0B1041B602-->  <DESCRIPTION><![CDATA[Window to manage the payments done by customers ]]></DESCRIPTION>
+<!--DB84EB9507F34D9B802DDA0B1041B602-->  <DESCRIPTION><![CDATA[Customer's payments and prepayments received can be recorded and managed in the payment in window. Same way G/L item payments do not related to orders/invoices can also be managed in this window.]]></DESCRIPTION>
 <!--DB84EB9507F34D9B802DDA0B1041B602-->  <ISSUMMARY><![CDATA[N]]></ISSUMMARY>
 <!--DB84EB9507F34D9B802DDA0B1041B602-->  <ACTION><![CDATA[W]]></ACTION>
 <!--DB84EB9507F34D9B802DDA0B1041B602-->  <AD_WINDOW_ID><![CDATA[E547CE89D4C04429B6340FFA44E70716]]></AD_WINDOW_ID>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -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.19003]]></VERSION>
+<!--A918E3331C404B889D69AA9BFAFB23AC-->  <VERSION><![CDATA[3.0.19180]]></VERSION>
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <DESCRIPTION><![CDATA[Managing your finances with an ERP does not have to be difficult. Enjoy a radically improved user experience that combines the power of an enterprise grade financial application with the simplicity and ease of a web 2.0 personal accounting service.]]></DESCRIPTION>
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <HELP><![CDATA[Advanced Payables and Receivables Management simplifies and automates the business processes around the management of financial accounts, from the receipt and issue of payment, to the reconciliation of those events with bank statements.
 If you would like to help shape this module you are welcome to take part in the forum discussions or register feature requests or issues in the corresponding (Forum and Bug Tracking) sections in the Advanced Payables and Receivable project in the OB Forge.]]></HELP>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -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.19003]]></STARTVERSION>
+<!--89326AE95DAD449D85DFAB2C5B1C6683-->  <STARTVERSION><![CDATA[2.1.19180]]></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.19003]]></STARTVERSION>
+<!--B97FC854C6DD41E692161585645A900F-->  <STARTVERSION><![CDATA[3.0.19180]]></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	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_PROCESS.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -56,6 +56,7 @@
 <!--12016E2EDE0245B5A36B84CBA144DBDF-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--12016E2EDE0245B5A36B84CBA144DBDF-->  <UIPATTERN><![CDATA[M]]></UIPATTERN>
 <!--12016E2EDE0245B5A36B84CBA144DBDF-->  <ISADVANCEDFEATURE><![CDATA[N]]></ISADVANCEDFEATURE>
+<!--12016E2EDE0245B5A36B84CBA144DBDF-->  <PREVENTCONCURRENT><![CDATA[N]]></PREVENTCONCURRENT>
 <!--12016E2EDE0245B5A36B84CBA144DBDF--></AD_PROCESS>
 
 <!--15C8708DFC464C2D91286E59624FDD18--><AD_PROCESS>
@@ -77,6 +78,7 @@
 <!--15C8708DFC464C2D91286E59624FDD18-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--15C8708DFC464C2D91286E59624FDD18-->  <UIPATTERN><![CDATA[S]]></UIPATTERN>
 <!--15C8708DFC464C2D91286E59624FDD18-->  <ISADVANCEDFEATURE><![CDATA[N]]></ISADVANCEDFEATURE>
+<!--15C8708DFC464C2D91286E59624FDD18-->  <PREVENTCONCURRENT><![CDATA[N]]></PREVENTCONCURRENT>
 <!--15C8708DFC464C2D91286E59624FDD18--></AD_PROCESS>
 
 <!--29D17F515727436DBCE32BC6CA28382B--><AD_PROCESS>
@@ -96,6 +98,7 @@
 <!--29D17F515727436DBCE32BC6CA28382B-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--29D17F515727436DBCE32BC6CA28382B-->  <UIPATTERN><![CDATA[S]]></UIPATTERN>
 <!--29D17F515727436DBCE32BC6CA28382B-->  <ISADVANCEDFEATURE><![CDATA[N]]></ISADVANCEDFEATURE>
+<!--29D17F515727436DBCE32BC6CA28382B-->  <PREVENTCONCURRENT><![CDATA[N]]></PREVENTCONCURRENT>
 <!--29D17F515727436DBCE32BC6CA28382B--></AD_PROCESS>
 
 <!--2EED9BC16DB34D2B80BA40A21564BECF--><AD_PROCESS>
@@ -117,6 +120,7 @@
 <!--2EED9BC16DB34D2B80BA40A21564BECF-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--2EED9BC16DB34D2B80BA40A21564BECF-->  <UIPATTERN><![CDATA[M]]></UIPATTERN>
 <!--2EED9BC16DB34D2B80BA40A21564BECF-->  <ISADVANCEDFEATURE><![CDATA[N]]></ISADVANCEDFEATURE>
+<!--2EED9BC16DB34D2B80BA40A21564BECF-->  <PREVENTCONCURRENT><![CDATA[N]]></PREVENTCONCURRENT>
 <!--2EED9BC16DB34D2B80BA40A21564BECF--></AD_PROCESS>
 
 <!--3C4A5FB206B74C3CA9FE20116FCA0464--><AD_PROCESS>
@@ -136,6 +140,7 @@
 <!--3C4A5FB206B74C3CA9FE20116FCA0464-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--3C4A5FB206B74C3CA9FE20116FCA0464-->  <UIPATTERN><![CDATA[M]]></UIPATTERN>
 <!--3C4A5FB206B74C3CA9FE20116FCA0464-->  <ISADVANCEDFEATURE><![CDATA[N]]></ISADVANCEDFEATURE>
+<!--3C4A5FB206B74C3CA9FE20116FCA0464-->  <PREVENTCONCURRENT><![CDATA[N]]></PREVENTCONCURRENT>
 <!--3C4A5FB206B74C3CA9FE20116FCA0464--></AD_PROCESS>
 
 <!--4A059E4F79294640AD37B1B718C56E5D--><AD_PROCESS>
@@ -157,6 +162,7 @@
 <!--4A059E4F79294640AD37B1B718C56E5D-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--4A059E4F79294640AD37B1B718C56E5D-->  <UIPATTERN><![CDATA[M]]></UIPATTERN>
 <!--4A059E4F79294640AD37B1B718C56E5D-->  <ISADVANCEDFEATURE><![CDATA[N]]></ISADVANCEDFEATURE>
+<!--4A059E4F79294640AD37B1B718C56E5D-->  <PREVENTCONCURRENT><![CDATA[N]]></PREVENTCONCURRENT>
 <!--4A059E4F79294640AD37B1B718C56E5D--></AD_PROCESS>
 
 <!--58A9261BACEF45DDA526F29D8557272D--><AD_PROCESS>
@@ -176,6 +182,7 @@
 <!--58A9261BACEF45DDA526F29D8557272D-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--58A9261BACEF45DDA526F29D8557272D-->  <UIPATTERN><![CDATA[S]]></UIPATTERN>
 <!--58A9261BACEF45DDA526F29D8557272D-->  <ISADVANCEDFEATURE><![CDATA[N]]></ISADVANCEDFEATURE>
+<!--58A9261BACEF45DDA526F29D8557272D-->  <PREVENTCONCURRENT><![CDATA[N]]></PREVENTCONCURRENT>
 <!--58A9261BACEF45DDA526F29D8557272D--></AD_PROCESS>
 
 <!--5BE14AA10165490A9ADEFB7532F7FA94--><AD_PROCESS>
@@ -195,6 +202,7 @@
 <!--5BE14AA10165490A9ADEFB7532F7FA94-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--5BE14AA10165490A9ADEFB7532F7FA94-->  <UIPATTERN><![CDATA[S]]></UIPATTERN>
 <!--5BE14AA10165490A9ADEFB7532F7FA94-->  <ISADVANCEDFEATURE><![CDATA[N]]></ISADVANCEDFEATURE>
+<!--5BE14AA10165490A9ADEFB7532F7FA94-->  <PREVENTCONCURRENT><![CDATA[N]]></PREVENTCONCURRENT>
 <!--5BE14AA10165490A9ADEFB7532F7FA94--></AD_PROCESS>
 
 <!--6255BE488882480599C81284B70CD9B3--><AD_PROCESS>
@@ -214,6 +222,7 @@
 <!--6255BE488882480599C81284B70CD9B3-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--6255BE488882480599C81284B70CD9B3-->  <UIPATTERN><![CDATA[S]]></UIPATTERN>
 <!--6255BE488882480599C81284B70CD9B3-->  <ISADVANCEDFEATURE><![CDATA[N]]></ISADVANCEDFEATURE>
+<!--6255BE488882480599C81284B70CD9B3-->  <PREVENTCONCURRENT><![CDATA[N]]></PREVENTCONCURRENT>
 <!--6255BE488882480599C81284B70CD9B3--></AD_PROCESS>
 
 <!--62E6270312534380B9A8BDF603CA8FBB--><AD_PROCESS>
@@ -234,6 +243,7 @@
 <!--62E6270312534380B9A8BDF603CA8FBB-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--62E6270312534380B9A8BDF603CA8FBB-->  <UIPATTERN><![CDATA[M]]></UIPATTERN>
 <!--62E6270312534380B9A8BDF603CA8FBB-->  <ISADVANCEDFEATURE><![CDATA[N]]></ISADVANCEDFEATURE>
+<!--62E6270312534380B9A8BDF603CA8FBB-->  <PREVENTCONCURRENT><![CDATA[N]]></PREVENTCONCURRENT>
 <!--62E6270312534380B9A8BDF603CA8FBB--></AD_PROCESS>
 
 <!--7AC7BE9024E448A0BB863C159DA762F9--><AD_PROCESS>
@@ -254,6 +264,7 @@
 <!--7AC7BE9024E448A0BB863C159DA762F9-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--7AC7BE9024E448A0BB863C159DA762F9-->  <UIPATTERN><![CDATA[M]]></UIPATTERN>
 <!--7AC7BE9024E448A0BB863C159DA762F9-->  <ISADVANCEDFEATURE><![CDATA[N]]></ISADVANCEDFEATURE>
+<!--7AC7BE9024E448A0BB863C159DA762F9-->  <PREVENTCONCURRENT><![CDATA[N]]></PREVENTCONCURRENT>
 <!--7AC7BE9024E448A0BB863C159DA762F9--></AD_PROCESS>
 
 <!--B54318B49E984B9CB855AEFB1F474CD6--><AD_PROCESS>
@@ -274,6 +285,7 @@
 <!--B54318B49E984B9CB855AEFB1F474CD6-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--B54318B49E984B9CB855AEFB1F474CD6-->  <UIPATTERN><![CDATA[M]]></UIPATTERN>
 <!--B54318B49E984B9CB855AEFB1F474CD6-->  <ISADVANCEDFEATURE><![CDATA[N]]></ISADVANCEDFEATURE>
+<!--B54318B49E984B9CB855AEFB1F474CD6-->  <PREVENTCONCURRENT><![CDATA[N]]></PREVENTCONCURRENT>
 <!--B54318B49E984B9CB855AEFB1F474CD6--></AD_PROCESS>
 
 <!--BBA11D1A061346459AF6148920FE6629--><AD_PROCESS>
@@ -293,6 +305,7 @@
 <!--BBA11D1A061346459AF6148920FE6629-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--BBA11D1A061346459AF6148920FE6629-->  <UIPATTERN><![CDATA[M]]></UIPATTERN>
 <!--BBA11D1A061346459AF6148920FE6629-->  <ISADVANCEDFEATURE><![CDATA[N]]></ISADVANCEDFEATURE>
+<!--BBA11D1A061346459AF6148920FE6629-->  <PREVENTCONCURRENT><![CDATA[N]]></PREVENTCONCURRENT>
 <!--BBA11D1A061346459AF6148920FE6629--></AD_PROCESS>
 
 <!--C125EA7C85234D8B89FEA511FCCD2E9E--><AD_PROCESS>
@@ -312,6 +325,7 @@
 <!--C125EA7C85234D8B89FEA511FCCD2E9E-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--C125EA7C85234D8B89FEA511FCCD2E9E-->  <UIPATTERN><![CDATA[M]]></UIPATTERN>
 <!--C125EA7C85234D8B89FEA511FCCD2E9E-->  <ISADVANCEDFEATURE><![CDATA[N]]></ISADVANCEDFEATURE>
+<!--C125EA7C85234D8B89FEA511FCCD2E9E-->  <PREVENTCONCURRENT><![CDATA[N]]></PREVENTCONCURRENT>
 <!--C125EA7C85234D8B89FEA511FCCD2E9E--></AD_PROCESS>
 
 <!--D16966FBF9604A3D91A50DC83C6EA8E3--><AD_PROCESS>
@@ -332,6 +346,7 @@
 <!--D16966FBF9604A3D91A50DC83C6EA8E3-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--D16966FBF9604A3D91A50DC83C6EA8E3-->  <UIPATTERN><![CDATA[S]]></UIPATTERN>
 <!--D16966FBF9604A3D91A50DC83C6EA8E3-->  <ISADVANCEDFEATURE><![CDATA[N]]></ISADVANCEDFEATURE>
+<!--D16966FBF9604A3D91A50DC83C6EA8E3-->  <PREVENTCONCURRENT><![CDATA[N]]></PREVENTCONCURRENT>
 <!--D16966FBF9604A3D91A50DC83C6EA8E3--></AD_PROCESS>
 
 <!--D5B90B539C254B959045EDCA1DC99BDF--><AD_PROCESS>
@@ -353,6 +368,7 @@
 <!--D5B90B539C254B959045EDCA1DC99BDF-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--D5B90B539C254B959045EDCA1DC99BDF-->  <UIPATTERN><![CDATA[M]]></UIPATTERN>
 <!--D5B90B539C254B959045EDCA1DC99BDF-->  <ISADVANCEDFEATURE><![CDATA[N]]></ISADVANCEDFEATURE>
+<!--D5B90B539C254B959045EDCA1DC99BDF-->  <PREVENTCONCURRENT><![CDATA[N]]></PREVENTCONCURRENT>
 <!--D5B90B539C254B959045EDCA1DC99BDF--></AD_PROCESS>
 
 <!--DC23BB9234174E52879E4B21C8CD1F4B--><AD_PROCESS>
@@ -373,6 +389,7 @@
 <!--DC23BB9234174E52879E4B21C8CD1F4B-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--DC23BB9234174E52879E4B21C8CD1F4B-->  <UIPATTERN><![CDATA[M]]></UIPATTERN>
 <!--DC23BB9234174E52879E4B21C8CD1F4B-->  <ISADVANCEDFEATURE><![CDATA[N]]></ISADVANCEDFEATURE>
+<!--DC23BB9234174E52879E4B21C8CD1F4B-->  <PREVENTCONCURRENT><![CDATA[N]]></PREVENTCONCURRENT>
 <!--DC23BB9234174E52879E4B21C8CD1F4B--></AD_PROCESS>
 
 <!--DE1B382FDD2540199D223586F6E216D0--><AD_PROCESS>
@@ -394,6 +411,7 @@
 <!--DE1B382FDD2540199D223586F6E216D0-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--DE1B382FDD2540199D223586F6E216D0-->  <UIPATTERN><![CDATA[S]]></UIPATTERN>
 <!--DE1B382FDD2540199D223586F6E216D0-->  <ISADVANCEDFEATURE><![CDATA[N]]></ISADVANCEDFEATURE>
+<!--DE1B382FDD2540199D223586F6E216D0-->  <PREVENTCONCURRENT><![CDATA[N]]></PREVENTCONCURRENT>
 <!--DE1B382FDD2540199D223586F6E216D0--></AD_PROCESS>
 
 <!--E011F492B0814A74B63CD1F3B9FF0526--><AD_PROCESS>
@@ -413,6 +431,7 @@
 <!--E011F492B0814A74B63CD1F3B9FF0526-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--E011F492B0814A74B63CD1F3B9FF0526-->  <UIPATTERN><![CDATA[M]]></UIPATTERN>
 <!--E011F492B0814A74B63CD1F3B9FF0526-->  <ISADVANCEDFEATURE><![CDATA[N]]></ISADVANCEDFEATURE>
+<!--E011F492B0814A74B63CD1F3B9FF0526-->  <PREVENTCONCURRENT><![CDATA[N]]></PREVENTCONCURRENT>
 <!--E011F492B0814A74B63CD1F3B9FF0526--></AD_PROCESS>
 
 <!--E3E92E9F08214507958E6875E66F2F99--><AD_PROCESS>
@@ -433,6 +452,7 @@
 <!--E3E92E9F08214507958E6875E66F2F99-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--E3E92E9F08214507958E6875E66F2F99-->  <UIPATTERN><![CDATA[M]]></UIPATTERN>
 <!--E3E92E9F08214507958E6875E66F2F99-->  <ISADVANCEDFEATURE><![CDATA[N]]></ISADVANCEDFEATURE>
+<!--E3E92E9F08214507958E6875E66F2F99-->  <PREVENTCONCURRENT><![CDATA[N]]></PREVENTCONCURRENT>
 <!--E3E92E9F08214507958E6875E66F2F99--></AD_PROCESS>
 
 <!--E54287EE357C493EB127DC3BA1758751--><AD_PROCESS>
@@ -453,6 +473,7 @@
 <!--E54287EE357C493EB127DC3BA1758751-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--E54287EE357C493EB127DC3BA1758751-->  <UIPATTERN><![CDATA[M]]></UIPATTERN>
 <!--E54287EE357C493EB127DC3BA1758751-->  <ISADVANCEDFEATURE><![CDATA[N]]></ISADVANCEDFEATURE>
+<!--E54287EE357C493EB127DC3BA1758751-->  <PREVENTCONCURRENT><![CDATA[N]]></PREVENTCONCURRENT>
 <!--E54287EE357C493EB127DC3BA1758751--></AD_PROCESS>
 
 <!--EB3D56BDD37E4229B67DBAB9F9A9B167--><AD_PROCESS>
@@ -473,6 +494,7 @@
 <!--EB3D56BDD37E4229B67DBAB9F9A9B167-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--EB3D56BDD37E4229B67DBAB9F9A9B167-->  <UIPATTERN><![CDATA[M]]></UIPATTERN>
 <!--EB3D56BDD37E4229B67DBAB9F9A9B167-->  <ISADVANCEDFEATURE><![CDATA[N]]></ISADVANCEDFEATURE>
+<!--EB3D56BDD37E4229B67DBAB9F9A9B167-->  <PREVENTCONCURRENT><![CDATA[N]]></PREVENTCONCURRENT>
 <!--EB3D56BDD37E4229B67DBAB9F9A9B167--></AD_PROCESS>
 
 <!--F68F2890E96D4D85A1DEF0274D105BCE--><AD_PROCESS>
@@ -492,6 +514,7 @@
 <!--F68F2890E96D4D85A1DEF0274D105BCE-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--F68F2890E96D4D85A1DEF0274D105BCE-->  <UIPATTERN><![CDATA[S]]></UIPATTERN>
 <!--F68F2890E96D4D85A1DEF0274D105BCE-->  <ISADVANCEDFEATURE><![CDATA[N]]></ISADVANCEDFEATURE>
+<!--F68F2890E96D4D85A1DEF0274D105BCE-->  <PREVENTCONCURRENT><![CDATA[N]]></PREVENTCONCURRENT>
 <!--F68F2890E96D4D85A1DEF0274D105BCE--></AD_PROCESS>
 
 <!--FF8080812E2F8EAE012E2F94CF470014--><AD_PROCESS>
@@ -512,6 +535,7 @@
 <!--FF8080812E2F8EAE012E2F94CF470014-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--FF8080812E2F8EAE012E2F94CF470014-->  <UIPATTERN><![CDATA[S]]></UIPATTERN>
 <!--FF8080812E2F8EAE012E2F94CF470014-->  <ISADVANCEDFEATURE><![CDATA[N]]></ISADVANCEDFEATURE>
+<!--FF8080812E2F8EAE012E2F94CF470014-->  <PREVENTCONCURRENT><![CDATA[N]]></PREVENTCONCURRENT>
 <!--FF8080812E2F8EAE012E2F94CF470014--></AD_PROCESS>
 
 <!--FF8080812F348A97012F349DC24F0007--><AD_PROCESS>
@@ -531,6 +555,7 @@
 <!--FF8080812F348A97012F349DC24F0007-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--FF8080812F348A97012F349DC24F0007-->  <UIPATTERN><![CDATA[S]]></UIPATTERN>
 <!--FF8080812F348A97012F349DC24F0007-->  <ISADVANCEDFEATURE><![CDATA[N]]></ISADVANCEDFEATURE>
+<!--FF8080812F348A97012F349DC24F0007-->  <PREVENTCONCURRENT><![CDATA[N]]></PREVENTCONCURRENT>
 <!--FF8080812F348A97012F349DC24F0007--></AD_PROCESS>
 
 </data>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_PROCESS_PARA.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_PROCESS_PARA.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -1,47 +1,5 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <data>
-<!--0EA168C17AAC47DA970558D19F69FDDA--><AD_PROCESS_PARA>
-<!--0EA168C17AAC47DA970558D19F69FDDA-->  <AD_PROCESS_PARA_ID><![CDATA[0EA168C17AAC47DA970558D19F69FDDA]]></AD_PROCESS_PARA_ID>
-<!--0EA168C17AAC47DA970558D19F69FDDA-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--0EA168C17AAC47DA970558D19F69FDDA-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--0EA168C17AAC47DA970558D19F69FDDA-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--0EA168C17AAC47DA970558D19F69FDDA-->  <NAME><![CDATA[Action]]></NAME>
-<!--0EA168C17AAC47DA970558D19F69FDDA-->  <DESCRIPTION><![CDATA[A drop down list box indicating the next step to take.]]></DESCRIPTION>
-<!--0EA168C17AAC47DA970558D19F69FDDA-->  <HELP><![CDATA[The Action field indicates the Action to be performed for this element.]]></HELP>
-<!--0EA168C17AAC47DA970558D19F69FDDA-->  <AD_PROCESS_ID><![CDATA[017312F51139438A9665775E3B5392A1]]></AD_PROCESS_ID>
-<!--0EA168C17AAC47DA970558D19F69FDDA-->  <SEQNO><![CDATA[10]]></SEQNO>
-<!--0EA168C17AAC47DA970558D19F69FDDA-->  <AD_REFERENCE_ID><![CDATA[17]]></AD_REFERENCE_ID>
-<!--0EA168C17AAC47DA970558D19F69FDDA-->  <AD_REFERENCE_VALUE_ID><![CDATA[798239EB069F41A9BA8EE040C63DDBBC]]></AD_REFERENCE_VALUE_ID>
-<!--0EA168C17AAC47DA970558D19F69FDDA-->  <AD_VAL_RULE_ID><![CDATA[3842B167CA6F44239C3357A721E3BA6A]]></AD_VAL_RULE_ID>
-<!--0EA168C17AAC47DA970558D19F69FDDA-->  <COLUMNNAME><![CDATA[action]]></COLUMNNAME>
-<!--0EA168C17AAC47DA970558D19F69FDDA-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
-<!--0EA168C17AAC47DA970558D19F69FDDA-->  <FIELDLENGTH><![CDATA[0]]></FIELDLENGTH>
-<!--0EA168C17AAC47DA970558D19F69FDDA-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
-<!--0EA168C17AAC47DA970558D19F69FDDA-->  <ISRANGE><![CDATA[N]]></ISRANGE>
-<!--0EA168C17AAC47DA970558D19F69FDDA-->  <AD_ELEMENT_ID><![CDATA[152]]></AD_ELEMENT_ID>
-<!--0EA168C17AAC47DA970558D19F69FDDA--></AD_PROCESS_PARA>
-
-<!--173E22F30A234210BE895DBB291AE971--><AD_PROCESS_PARA>
-<!--173E22F30A234210BE895DBB291AE971-->  <AD_PROCESS_PARA_ID><![CDATA[173E22F30A234210BE895DBB291AE971]]></AD_PROCESS_PARA_ID>
-<!--173E22F30A234210BE895DBB291AE971-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--173E22F30A234210BE895DBB291AE971-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--173E22F30A234210BE895DBB291AE971-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--173E22F30A234210BE895DBB291AE971-->  <NAME><![CDATA[Payment Method]]></NAME>
-<!--173E22F30A234210BE895DBB291AE971-->  <DESCRIPTION><![CDATA[It is the method by which payment is expected to be made or received.]]></DESCRIPTION>
-<!--173E22F30A234210BE895DBB291AE971-->  <AD_PROCESS_ID><![CDATA[DE1B382FDD2540199D223586F6E216D0]]></AD_PROCESS_ID>
-<!--173E22F30A234210BE895DBB291AE971-->  <SEQNO><![CDATA[40]]></SEQNO>
-<!--173E22F30A234210BE895DBB291AE971-->  <AD_REFERENCE_ID><![CDATA[18]]></AD_REFERENCE_ID>
-<!--173E22F30A234210BE895DBB291AE971-->  <AD_REFERENCE_VALUE_ID><![CDATA[EED0EF97D4A7421687F3B365D009E7A6]]></AD_REFERENCE_VALUE_ID>
-<!--173E22F30A234210BE895DBB291AE971-->  <AD_VAL_RULE_ID><![CDATA[959ADF046AFE4F509ABC6E2F41F9DB04]]></AD_VAL_RULE_ID>
-<!--173E22F30A234210BE895DBB291AE971-->  <COLUMNNAME><![CDATA[fin_paymentmethod_id]]></COLUMNNAME>
-<!--173E22F30A234210BE895DBB291AE971-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
-<!--173E22F30A234210BE895DBB291AE971-->  <FIELDLENGTH><![CDATA[100]]></FIELDLENGTH>
-<!--173E22F30A234210BE895DBB291AE971-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
-<!--173E22F30A234210BE895DBB291AE971-->  <ISRANGE><![CDATA[N]]></ISRANGE>
-<!--173E22F30A234210BE895DBB291AE971-->  <DEFAULTVALUE><![CDATA[@SQL=SELECT CASE WHEN (@FIN_PAYMENTMETHOD_ID@ IS NOT NULL AND @FIN_PAYMENTMETHOD_ID@ <> COALESCE('','-1')) THEN @FIN_PAYMENTMETHOD_ID@ ELSE (CASE WHEN (TO_NUMBER(@AmtAcctDr@) - TO_NUMBER(@AmtAcctCr@) > 0) THEN fin_paymentmethod_id ELSE po_paymentmethod_id END) END FROM C_BPARTNER WHERE C_BPARTNER_ID = @C_BPARTNER_ID@]]></DEFAULTVALUE>
-<!--173E22F30A234210BE895DBB291AE971-->  <AD_ELEMENT_ID><![CDATA[7DC34559B411B45BE040007F0100784A]]></AD_ELEMENT_ID>
-<!--173E22F30A234210BE895DBB291AE971--></AD_PROCESS_PARA>
-
 <!--1913962D2952412B84B8CDD3BC17026F--><AD_PROCESS_PARA>
 <!--1913962D2952412B84B8CDD3BC17026F-->  <AD_PROCESS_PARA_ID><![CDATA[1913962D2952412B84B8CDD3BC17026F]]></AD_PROCESS_PARA_ID>
 <!--1913962D2952412B84B8CDD3BC17026F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -63,24 +21,6 @@
 <!--1913962D2952412B84B8CDD3BC17026F-->  <AD_ELEMENT_ID><![CDATA[454]]></AD_ELEMENT_ID>
 <!--1913962D2952412B84B8CDD3BC17026F--></AD_PROCESS_PARA>
 
-<!--28734F2240554E628433520DBFA0A75A--><AD_PROCESS_PARA>
-<!--28734F2240554E628433520DBFA0A75A-->  <AD_PROCESS_PARA_ID><![CDATA[28734F2240554E628433520DBFA0A75A]]></AD_PROCESS_PARA_ID>
-<!--28734F2240554E628433520DBFA0A75A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--28734F2240554E628433520DBFA0A75A-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--28734F2240554E628433520DBFA0A75A-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--28734F2240554E628433520DBFA0A75A-->  <NAME><![CDATA[Date]]></NAME>
-<!--28734F2240554E628433520DBFA0A75A-->  <AD_PROCESS_ID><![CDATA[DE1B382FDD2540199D223586F6E216D0]]></AD_PROCESS_ID>
-<!--28734F2240554E628433520DBFA0A75A-->  <SEQNO><![CDATA[50]]></SEQNO>
-<!--28734F2240554E628433520DBFA0A75A-->  <AD_REFERENCE_ID><![CDATA[15]]></AD_REFERENCE_ID>
-<!--28734F2240554E628433520DBFA0A75A-->  <COLUMNNAME><![CDATA[Date]]></COLUMNNAME>
-<!--28734F2240554E628433520DBFA0A75A-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
-<!--28734F2240554E628433520DBFA0A75A-->  <FIELDLENGTH><![CDATA[100]]></FIELDLENGTH>
-<!--28734F2240554E628433520DBFA0A75A-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
-<!--28734F2240554E628433520DBFA0A75A-->  <ISRANGE><![CDATA[N]]></ISRANGE>
-<!--28734F2240554E628433520DBFA0A75A-->  <DEFAULTVALUE><![CDATA[@#Date@]]></DEFAULTVALUE>
-<!--28734F2240554E628433520DBFA0A75A-->  <AD_ELEMENT_ID><![CDATA[17ADA898A5534B858EC8BD7651492088]]></AD_ELEMENT_ID>
-<!--28734F2240554E628433520DBFA0A75A--></AD_PROCESS_PARA>
-
 <!--4F5EE1017087464EAD95F3CCA4C5AFA5--><AD_PROCESS_PARA>
 <!--4F5EE1017087464EAD95F3CCA4C5AFA5-->  <AD_PROCESS_PARA_ID><![CDATA[4F5EE1017087464EAD95F3CCA4C5AFA5]]></AD_PROCESS_PARA_ID>
 <!--4F5EE1017087464EAD95F3CCA4C5AFA5-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -102,49 +42,6 @@
 <!--4F5EE1017087464EAD95F3CCA4C5AFA5-->  <AD_ELEMENT_ID><![CDATA[208]]></AD_ELEMENT_ID>
 <!--4F5EE1017087464EAD95F3CCA4C5AFA5--></AD_PROCESS_PARA>
 
-<!--64ACDCA34C244598890F737AD48DCEA3--><AD_PROCESS_PARA>
-<!--64ACDCA34C244598890F737AD48DCEA3-->  <AD_PROCESS_PARA_ID><![CDATA[64ACDCA34C244598890F737AD48DCEA3]]></AD_PROCESS_PARA_ID>
-<!--64ACDCA34C244598890F737AD48DCEA3-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--64ACDCA34C244598890F737AD48DCEA3-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--64ACDCA34C244598890F737AD48DCEA3-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--64ACDCA34C244598890F737AD48DCEA3-->  <NAME><![CDATA[Action]]></NAME>
-<!--64ACDCA34C244598890F737AD48DCEA3-->  <DESCRIPTION><![CDATA[A drop down list box indicating the next step to take.]]></DESCRIPTION>
-<!--64ACDCA34C244598890F737AD48DCEA3-->  <HELP><![CDATA[The Action field indicates the Action to be performed for this element.]]></HELP>
-<!--64ACDCA34C244598890F737AD48DCEA3-->  <AD_PROCESS_ID><![CDATA[0BDC2164ED3E48539FCEF4D306F29EFD]]></AD_PROCESS_ID>
-<!--64ACDCA34C244598890F737AD48DCEA3-->  <SEQNO><![CDATA[10]]></SEQNO>
-<!--64ACDCA34C244598890F737AD48DCEA3-->  <AD_REFERENCE_ID><![CDATA[17]]></AD_REFERENCE_ID>
-<!--64ACDCA34C244598890F737AD48DCEA3-->  <AD_REFERENCE_VALUE_ID><![CDATA[798239EB069F41A9BA8EE040C63DDBBC]]></AD_REFERENCE_VALUE_ID>
-<!--64ACDCA34C244598890F737AD48DCEA3-->  <AD_VAL_RULE_ID><![CDATA[3842B167CA6F44239C3357A721E3BA6A]]></AD_VAL_RULE_ID>
-<!--64ACDCA34C244598890F737AD48DCEA3-->  <COLUMNNAME><![CDATA[action]]></COLUMNNAME>
-<!--64ACDCA34C244598890F737AD48DCEA3-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
-<!--64ACDCA34C244598890F737AD48DCEA3-->  <FIELDLENGTH><![CDATA[0]]></FIELDLENGTH>
-<!--64ACDCA34C244598890F737AD48DCEA3-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
-<!--64ACDCA34C244598890F737AD48DCEA3-->  <ISRANGE><![CDATA[N]]></ISRANGE>
-<!--64ACDCA34C244598890F737AD48DCEA3-->  <AD_ELEMENT_ID><![CDATA[152]]></AD_ELEMENT_ID>
-<!--64ACDCA34C244598890F737AD48DCEA3--></AD_PROCESS_PARA>
-
-<!--65B5C8CA308F46988BDE3E31BC1D78C8--><AD_PROCESS_PARA>
-<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <AD_PROCESS_PARA_ID><![CDATA[65B5C8CA308F46988BDE3E31BC1D78C8]]></AD_PROCESS_PARA_ID>
-<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <NAME><![CDATA[Business Partner]]></NAME>
-<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <DESCRIPTION><![CDATA[Anyone who takes part in daily business operations by acting as a customer, employee, etc.]]></DESCRIPTION>
-<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <HELP><![CDATA[A Business Partner is anyone with whom you transact.  This can include a customer, vendor, employee or any combination of these.]]></HELP>
-<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <AD_PROCESS_ID><![CDATA[DE1B382FDD2540199D223586F6E216D0]]></AD_PROCESS_ID>
-<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <SEQNO><![CDATA[10]]></SEQNO>
-<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <AD_REFERENCE_ID><![CDATA[18]]></AD_REFERENCE_ID>
-<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <AD_REFERENCE_VALUE_ID><![CDATA[138]]></AD_REFERENCE_VALUE_ID>
-<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <AD_VAL_RULE_ID><![CDATA[E491153CCBEE49A1842A7CC8544929DD]]></AD_VAL_RULE_ID>
-<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <COLUMNNAME><![CDATA[c_bpartner_para_id]]></COLUMNNAME>
-<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
-<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <FIELDLENGTH><![CDATA[100]]></FIELDLENGTH>
-<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
-<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <ISRANGE><![CDATA[N]]></ISRANGE>
-<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <DEFAULTVALUE><![CDATA[@C_BPARTNER_ID@]]></DEFAULTVALUE>
-<!--65B5C8CA308F46988BDE3E31BC1D78C8-->  <AD_ELEMENT_ID><![CDATA[187]]></AD_ELEMENT_ID>
-<!--65B5C8CA308F46988BDE3E31BC1D78C8--></AD_PROCESS_PARA>
-
 <!--6EEE4A4DB1BA476BA7929EC7FCF285F8--><AD_PROCESS_PARA>
 <!--6EEE4A4DB1BA476BA7929EC7FCF285F8-->  <AD_PROCESS_PARA_ID><![CDATA[6EEE4A4DB1BA476BA7929EC7FCF285F8]]></AD_PROCESS_PARA_ID>
 <!--6EEE4A4DB1BA476BA7929EC7FCF285F8-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -310,50 +207,6 @@
 <!--D04309BB0DA14B5789FB76C141ED464C-->  <AD_ELEMENT_ID><![CDATA[152]]></AD_ELEMENT_ID>
 <!--D04309BB0DA14B5789FB76C141ED464C--></AD_PROCESS_PARA>
 
-<!--D2D748A3C65F4976B4461635A04EFA5F--><AD_PROCESS_PARA>
-<!--D2D748A3C65F4976B4461635A04EFA5F-->  <AD_PROCESS_PARA_ID><![CDATA[D2D748A3C65F4976B4461635A04EFA5F]]></AD_PROCESS_PARA_ID>
-<!--D2D748A3C65F4976B4461635A04EFA5F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--D2D748A3C65F4976B4461635A04EFA5F-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--D2D748A3C65F4976B4461635A04EFA5F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--D2D748A3C65F4976B4461635A04EFA5F-->  <NAME><![CDATA[Financial Account]]></NAME>
-<!--D2D748A3C65F4976B4461635A04EFA5F-->  <DESCRIPTION><![CDATA[Financial account used to deposit / withdrawal money such as bank accounts or petty cash]]></DESCRIPTION>
-<!--D2D748A3C65F4976B4461635A04EFA5F-->  <HELP><![CDATA[Financial account used to deposit / withdrawal money such as bank accounts or petty cash]]></HELP>
-<!--D2D748A3C65F4976B4461635A04EFA5F-->  <AD_PROCESS_ID><![CDATA[DE1B382FDD2540199D223586F6E216D0]]></AD_PROCESS_ID>
-<!--D2D748A3C65F4976B4461635A04EFA5F-->  <SEQNO><![CDATA[30]]></SEQNO>
-<!--D2D748A3C65F4976B4461635A04EFA5F-->  <AD_REFERENCE_ID><![CDATA[18]]></AD_REFERENCE_ID>
-<!--D2D748A3C65F4976B4461635A04EFA5F-->  <AD_REFERENCE_VALUE_ID><![CDATA[DF1CEA94B3564A33AFDB37C07E1CE353]]></AD_REFERENCE_VALUE_ID>
-<!--D2D748A3C65F4976B4461635A04EFA5F-->  <AD_VAL_RULE_ID><![CDATA[4DB5167147F24078A1FD39DC7564B48D]]></AD_VAL_RULE_ID>
-<!--D2D748A3C65F4976B4461635A04EFA5F-->  <COLUMNNAME><![CDATA[fin_financial_account_id]]></COLUMNNAME>
-<!--D2D748A3C65F4976B4461635A04EFA5F-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
-<!--D2D748A3C65F4976B4461635A04EFA5F-->  <FIELDLENGTH><![CDATA[100]]></FIELDLENGTH>
-<!--D2D748A3C65F4976B4461635A04EFA5F-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
-<!--D2D748A3C65F4976B4461635A04EFA5F-->  <ISRANGE><![CDATA[N]]></ISRANGE>
-<!--D2D748A3C65F4976B4461635A04EFA5F-->  <DEFAULTVALUE><![CDATA[@SQL=SELECT CASE WHEN (@FIN_FINANCIAL_ACCOUNT_ID@ IS NOT NULL AND @FIN_FINANCIAL_ACCOUNT_ID@ <> COALESCE('','-1')) THEN @FIN_FINANCIAL_ACCOUNT_ID@ ELSE (CASE WHEN ((TO_NUMBER(@AmtAcctDr@) - TO_NUMBER(@AmtAcctCr@)) > 0) THEN fin_financial_account_id ELSE po_financial_account_id END) END FROM C_BPARTNER WHERE C_BPARTNER_ID = @C_BPARTNER_ID@]]></DEFAULTVALUE>
-<!--D2D748A3C65F4976B4461635A04EFA5F-->  <AD_ELEMENT_ID><![CDATA[7891269C840C655DE040007F010155CE]]></AD_ELEMENT_ID>
-<!--D2D748A3C65F4976B4461635A04EFA5F--></AD_PROCESS_PARA>
-
-<!--DC3ADA42B2C443B79ACD6215AD5D9C31--><AD_PROCESS_PARA>
-<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <AD_PROCESS_PARA_ID><![CDATA[DC3ADA42B2C443B79ACD6215AD5D9C31]]></AD_PROCESS_PARA_ID>
-<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <NAME><![CDATA[G/L Item]]></NAME>
-<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <DESCRIPTION><![CDATA[An alias for the Account Combination which can be commonly used in daily operations.]]></DESCRIPTION>
-<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <HELP><![CDATA[General ledger item.]]></HELP>
-<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <AD_PROCESS_ID><![CDATA[DE1B382FDD2540199D223586F6E216D0]]></AD_PROCESS_ID>
-<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <SEQNO><![CDATA[20]]></SEQNO>
-<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <AD_REFERENCE_ID><![CDATA[18]]></AD_REFERENCE_ID>
-<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <AD_REFERENCE_VALUE_ID><![CDATA[66E310A87A844A51B8BAD2884E996CD6]]></AD_REFERENCE_VALUE_ID>
-<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <AD_VAL_RULE_ID><![CDATA[D035365830AF466BA81F2AB8ECC6FAE0]]></AD_VAL_RULE_ID>
-<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <COLUMNNAME><![CDATA[c_glitem_id]]></COLUMNNAME>
-<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
-<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <FIELDLENGTH><![CDATA[100]]></FIELDLENGTH>
-<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
-<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <ISRANGE><![CDATA[N]]></ISRANGE>
-<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <DEFAULTVALUE><![CDATA[@C_GLItem_ID@]]></DEFAULTVALUE>
-<!--DC3ADA42B2C443B79ACD6215AD5D9C31-->  <AD_ELEMENT_ID><![CDATA[800080]]></AD_ELEMENT_ID>
-<!--DC3ADA42B2C443B79ACD6215AD5D9C31--></AD_PROCESS_PARA>
-
 <!--E2EB0EFA3CE741C1848590D270CEBE2B--><AD_PROCESS_PARA>
 <!--E2EB0EFA3CE741C1848590D270CEBE2B-->  <AD_PROCESS_PARA_ID><![CDATA[E2EB0EFA3CE741C1848590D270CEBE2B]]></AD_PROCESS_PARA_ID>
 <!--E2EB0EFA3CE741C1848590D270CEBE2B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_TEXTINTERFACES.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_TEXTINTERFACES.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -319,6 +319,17 @@
 <!--354E5EF7FCD142078572A472031A4F8D-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--354E5EF7FCD142078572A472031A4F8D--></AD_TEXTINTERFACES>
 
+<!--35E14F2E362847059E2D433F33E930FF--><AD_TEXTINTERFACES>
+<!--35E14F2E362847059E2D433F33E930FF-->  <AD_TEXTINTERFACES_ID><![CDATA[35E14F2E362847059E2D433F33E930FF]]></AD_TEXTINTERFACES_ID>
+<!--35E14F2E362847059E2D433F33E930FF-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--35E14F2E362847059E2D433F33E930FF-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--35E14F2E362847059E2D433F33E930FF-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--35E14F2E362847059E2D433F33E930FF-->  <TEXT><![CDATA[Show transactions for alternative financial account]]></TEXT>
+<!--35E14F2E362847059E2D433F33E930FF-->  <FILENAME><![CDATA[/org/openbravo/advpaymentmngt/ad_actionbutton/AddTransaction.html]]></FILENAME>
+<!--35E14F2E362847059E2D433F33E930FF-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--35E14F2E362847059E2D433F33E930FF-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--35E14F2E362847059E2D433F33E930FF--></AD_TEXTINTERFACES>
+
 <!--361C7BAF7DFE4D90B8A2B671B4548B34--><AD_TEXTINTERFACES>
 <!--361C7BAF7DFE4D90B8A2B671B4548B34-->  <AD_TEXTINTERFACES_ID><![CDATA[361C7BAF7DFE4D90B8A2B671B4548B34]]></AD_TEXTINTERFACES_ID>
 <!--361C7BAF7DFE4D90B8A2B671B4548B34-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -605,6 +616,17 @@
 <!--55C25FEEFC8E443F908854E36E9F74DB-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
 <!--55C25FEEFC8E443F908854E36E9F74DB--></AD_TEXTINTERFACES>
 
+<!--56AAE175522A4972923EFA921DA73BFA--><AD_TEXTINTERFACES>
+<!--56AAE175522A4972923EFA921DA73BFA-->  <AD_TEXTINTERFACES_ID><![CDATA[56AAE175522A4972923EFA921DA73BFA]]></AD_TEXTINTERFACES_ID>
+<!--56AAE175522A4972923EFA921DA73BFA-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--56AAE175522A4972923EFA921DA73BFA-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--56AAE175522A4972923EFA921DA73BFA-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--56AAE175522A4972923EFA921DA73BFA-->  <TEXT><![CDATA[Financial Account]]></TEXT>
+<!--56AAE175522A4972923EFA921DA73BFA-->  <FILENAME><![CDATA[/org/openbravo/advpaymentmngt/ad_actionbutton/AddTransaction.html]]></FILENAME>
+<!--56AAE175522A4972923EFA921DA73BFA-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--56AAE175522A4972923EFA921DA73BFA-->  <AD_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_MODULE_ID>
+<!--56AAE175522A4972923EFA921DA73BFA--></AD_TEXTINTERFACES>
+
 <!--57288859DEFC454F9F499AF45F42B7AB--><AD_TEXTINTERFACES>
 <!--57288859DEFC454F9F499AF45F42B7AB-->  <AD_TEXTINTERFACES_ID><![CDATA[57288859DEFC454F9F499AF45F42B7AB]]></AD_TEXTINTERFACES_ID>
 <!--57288859DEFC454F9F499AF45F42B7AB-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/OBCQL_WIDGET_QUERY.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/OBCQL_WIDGET_QUERY.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -9,6 +9,7 @@
 <!--FF80808133186ADD01331B3B733B0011-->  <HQL><![CDATA[select ad_message_get2(m.searchKey, :language) as regType, a.reconciledItems as itemNo, a.reconciledItemsAmount as itemAmt
 from APRM_Rec_Detail_v as a, ADMessage as m
 where a.type = m.searchKey and a.reconciliation.id = :reconciliationId]]></HQL>
+<!--FF80808133186ADD01331B3B733B0011-->  <TYPE><![CDATA[HQL]]></TYPE>
 <!--FF80808133186ADD01331B3B733B0011--></OBCQL_WIDGET_QUERY>
 
 </data>
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddTransaction.html	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddTransaction.html	Thu Jan 10 13:17:14 2013 +0100
@@ -131,6 +131,16 @@
     document.getElementById('buttonProcess').disabled='disabled';
 }
 
+function showPaymentSection2(){
+  var doc = document.frmMain.inpDocumentType.value;
+  if (doc == 'RCIN'){
+    displayLogicElement('PaymentSection2', true);
+  } else{
+      displayLogicElement('PaymentSection2', false);  
+  }
+  return loadGrid();
+}
+
 function showHideLayers() {
   var opt = document.frmMain.inpTransactionType.value;
   if (opt == 'P') {
@@ -140,6 +150,7 @@
     displayLogicElement('GLItemSection2', false);
     displayLogicElement('GLItemSection3', false);
     displayLogicElement('PaymentSection', true);
+    displayLogicElement('PaymentSection2', true);
     displayLogicElement('client_middle', true);
     autoDisplayLogicDimensions(false);
     loadGrid();
@@ -151,6 +162,7 @@
     displayLogicElement('GLItemSection2', true);
     displayLogicElement('GLItemSection3', true);
     displayLogicElement('PaymentSection', false);
+    displayLogicElement('PaymentSection2', false);
     displayLogicElement('client_middle', false);
     autoDisplayLogicDimensions(true);
   } else if (opt == 'F') {
@@ -160,6 +172,7 @@
     displayLogicElement('GLItemSection2', false);
     displayLogicElement('GLItemSection3', false);
     displayLogicElement('PaymentSection', false);
+    displayLogicElement('PaymentSection2', false);
     displayLogicElement('client_middle', false);
     autoDisplayLogicDimensions(false);
   }
@@ -219,7 +232,6 @@
     } else {
       displayLogicDimension('user2_ID', false);
     }
-  //costcenter  is not ready
   if (document.frmMain.strElement_CC.value === 'Y' && isDisplayed) {
       displayLogicDimension('c_costcenter_id', true);
       displayTitle = true;
@@ -255,14 +267,33 @@
 }
 
 function submitThisPage(strCommand) {
-  if (validate()) {
-    setProcessingMode('popup', true);
-    submitCommandForm(strCommand, false, null, '../org.openbravo.advpaymentmngt.ad_actionbutton/AddTransaction.html');
-    disableButtonProcess();
-    return true;
+  var callback=function(paramXMLParticular, XMLHttpRequestObj) {
+      var strText = "";
+      if (getReadyStateHandler(XMLHttpRequestObj)) {
+        try {
+          if (XMLHttpRequestObj.responseText) {
+            strText = XMLHttpRequestObj.responseText;
+            var objson = eval(strText);
+            showJSMessage(objson.text);
+            return false;
+          }else{
+            if (validate() ) {
+              setProcessingMode('popup', true);
+              submitCommandForm(strCommand, false, null, '../org.openbravo.advpaymentmngt.ad_actionbutton/AddTransaction.html');
+              disableButtonProcess();
+              return true;
+            } else {
+              return true;
+            }
+          }
+        } catch (e) {
+      }
+    }
   }
-  return true;
+  var paramXMLReq = null;
+  return submitXmlHttpRequest(callback, document.frmMain, 'PERIOD', '../org.openbravo.advpaymentmngt.ad_actionbutton/AddTransaction.html', false, null, paramXMLReq);
 }
+
 </script>
 <script language="JavaScript" type="text/javascript">
 function loadGrid() {
@@ -1028,12 +1059,12 @@
             <tr id="PaymentSection">
               <td class="TitleCell"><span class="LabelText">Document</span></td>
               <td class="Combo_ContentCell">
-                <select  name="inpDocumentType" id="paramDocumentType" class="Combo Combo_OneCell_width" onchange="loadGrid();return true;">
+                <select  name="inpDocumentType" id="paramDocumentType" class="Combo Combo_OneCell_width" onchange="showPaymentSection2();return true;">
                   <!-- <option value=""><div id="reportDocument"></div></option> -->
                   <option value="RCIN" selected="selected">Received In</option>
                   <option value="PDOUT">Paid Out</option>
                 </select>
-              </td>
+              </td> 
               <td class="TitleCell"><span class="LabelText">From Date</span></td>
               <td class="TextBox_btn_ContentCell">
                 <table border="0" cellspacing="0" cellpadding="0" summary=""  style="padding-top: 0px;">
@@ -1097,6 +1128,12 @@
                 </table>
               </td>
             </tr>
+            <tr id="PaymentSection2">
+            <td id="inpAlternativeLabel" colspan="2"><span class="LabelText"><label name="lblP" id="lblPShowPaym" for="paramAlternativeFA">Show transactions for alternative financial account</label></span>
+             <span class="Radio_Check_ContentCell" id="inpAlternativeChkBox">
+              <span class="Radio_Check_ContentCell Checkbox_container_NOT_Focused"><input type="checkbox" name="inpAlternativeFA" value="Y" id="paramAlternativeFA" onclick="loadGrid()"></input></span></span></td>
+             <td colspan="4"></td> 
+            </tr>
             <!-- Payment Section END-->
             
             <tr class="FieldGroup_BottomMargin"></tr>
@@ -1124,6 +1161,7 @@
                         <th class="DataGrid_Header_LineNoCell DataGrid_Body_Cell_CheckBox" width="25"> 
                           <input type="checkbox" name="inpAllLines" onclick="markAll(document.frmMain.inpPaymentId, this.checked); return true;"/>
                         </th>
+                        <th class="DataGrid_Header_Cell" width="250">Financial Account</th>
                         <th class="DataGrid_Header_Cell" width="250">Payment In/Out</th>
                         <th class="DataGrid_Header_Cell" width="300">Description</th>
                         <th class="DataGrid_Header_Cell" width="70">Date</th>
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddTransaction.java	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddTransaction.java	Thu Jan 10 13:17:14 2013 +0100
@@ -56,6 +56,7 @@
 import org.openbravo.erpCommon.utility.OBError;
 import org.openbravo.erpCommon.utility.Utility;
 import org.openbravo.model.common.businesspartner.BusinessPartner;
+import org.openbravo.model.common.enterprise.Organization;
 import org.openbravo.model.common.plm.Product;
 import org.openbravo.model.financialmgmt.accounting.Costcenter;
 import org.openbravo.model.financialmgmt.accounting.UserDimension1;
@@ -104,9 +105,10 @@
       vars.removeSessionValue("AddPaymentFromTransaction|PaymentId");
       String strFinBankStatementLineId = vars.getStringParameter("inpFinBankStatementLineId", "",
           IsIDFilter.instance);
+      Boolean showAlternativeFA = "Y".equals(vars.getStringParameter("inpAlternativeFA", "N"));
 
       printGrid(response, vars, strFinancialAccountId, strFromDate, strToDate, strIsReceipt,
-          strFinBankStatementLineId, closeAutomatically, paymentWithTransaction);
+          strFinBankStatementLineId, closeAutomatically, paymentWithTransaction, showAlternativeFA);
 
     } else if (vars.commandIn("SAVE")) {
       String strTabId = vars.getGlobalVariable("inpTabId", "AddTransaction|tabId");
@@ -131,6 +133,34 @@
           strTransactionType, strGLItemId, strGLItemDepositAmount, strGLItemPaymentAmount,
           strFeeDepositAmount, strFeePaymentAmount, strTransactionDate, strFinBankStatementLineId,
           strGLItemDescription, strFeeDescription);
+    } else if (vars.commandIn("PERIOD")) {
+
+      String strTransactionDate = vars.getStringParameter("inpMainDate", "");
+      String strOrgId = vars.getRequestGlobalVariable("inpadOrgId", "AddTransaction|Org");
+      final Organization org = OBDal.getInstance().get(Organization.class, strOrgId);
+      String strclient = org.getClient().getId();
+      boolean orgLegalWithAccounting = false;
+      if ((org.getOrganizationType().isLegalEntity())
+          || (org.getOrganizationType().isBusinessUnit())) {
+        orgLegalWithAccounting = true;
+      }
+      if ((!FIN_Utility.isPeriodOpen(strclient, AcctServer.DOCTYPE_FinAccTransaction, strOrgId,
+          strTransactionDate)) && orgLegalWithAccounting) {
+        try {
+          JSONObject json = new JSONObject();
+          json.put("text", "PeriodNotAvailable");
+
+          response.setContentType("text/html; charset=UTF-8");
+          PrintWriter out = response.getWriter();
+          out.println("objson = " + json);
+          out.close();
+
+        } catch (JSONException e) {
+
+          e.printStackTrace();
+        }
+
+      }
     }
 
   }
@@ -165,12 +195,15 @@
             description = p.getDescription().replace("\n", ". ");
           }
 
-          FIN_FinaccTransaction finTrans = dao.getNewFinancialTransaction(p.getOrganization(), p
-              .getAccount(), TransactionsDao.getTransactionMaxLineNo(p.getAccount()) + 10, p,
-              description, FIN_Utility.getDate(strTransactionDate), null, p.isReceipt() ? "RDNC"
-                  : "PWNC", depositAmt, paymentAmt, null, null, null,
-              p.isReceipt() ? "BPD" : "BPW", FIN_Utility.getDate(strTransactionDate), p
-                  .getCurrency(), p.getFinancialTransactionConvertRate(), p.getAmount());
+          FIN_FinaccTransaction finTrans = dao.getNewFinancialTransaction(
+              p.getOrganization(),
+              OBDal.getInstance().get(FIN_FinancialAccount.class, strFinancialAccountId),
+              TransactionsDao.getTransactionMaxLineNo(OBDal.getInstance().get(
+                  FIN_FinancialAccount.class, strFinancialAccountId)) + 10, p, description,
+              FIN_Utility.getDate(strTransactionDate), null, p.isReceipt() ? "RDNC" : "PWNC",
+              depositAmt, paymentAmt, null, null, null, p.isReceipt() ? "BPD" : "BPW",
+              FIN_Utility.getDate(strTransactionDate), p.getCurrency(),
+              p.getFinancialTransactionConvertRate(), p.getAmount());
           OBError processTransactionError = processTransaction(vars, this, "P", finTrans);
           if (processTransactionError != null && "Error".equals(processTransactionError.getType())) {
             throw new OBException(processTransactionError.getMessage());
@@ -410,8 +443,8 @@
 
   private void printGrid(HttpServletResponse response, VariablesSecureApp vars,
       String strFinancialAccountId, String strFromDate, String strToDate, boolean isReceipt,
-      String strFinBankStatementLineId, String closeAutomatically, String paymentWithTransaction)
-      throws IOException, ServletException {
+      String strFinBankStatementLineId, String closeAutomatically, String paymentWithTransaction,
+      Boolean showAlternativeFA) throws IOException, ServletException {
     dao = new AdvPaymentMngtDao();
 
     log4j.debug("Output: Grid with transactions not reconciled");
@@ -442,10 +475,14 @@
 
     // Payments not deposited/withdrawal
     // Not stored in Fin_Finacc_Transaction table
-    final FieldProvider[] data = dao.getPaymentsNotDeposited(account,
-        FIN_Utility.getDate(strFromDate),
-        FIN_Utility.getDate(DateTimeData.nDaysAfter(this, strToDate, "1")), isReceipt);
-
+    final FieldProvider[] data;
+    if (showAlternativeFA & isReceipt) {
+      data = dao.getAlternativePaymentsNotDeposited(account, FIN_Utility.getDate(strFromDate),
+          FIN_Utility.getDate(DateTimeData.nDaysAfter(this, strToDate, "1")), isReceipt);
+    } else {
+      data = dao.getPaymentsNotDeposited(account, FIN_Utility.getDate(strFromDate),
+          FIN_Utility.getDate(DateTimeData.nDaysAfter(this, strToDate, "1")), isReceipt);
+    }
     xmlDocument.setData("structure", (data == null) ? set() : data);
     JSONObject table = new JSONObject();
     try {
@@ -462,6 +499,7 @@
 
   private FieldProvider[] set() throws ServletException {
     HashMap<String, String> empty = new HashMap<String, String>();
+    empty.put("finAcc", "");
     empty.put("paymentId", "");
     empty.put("paymentInfo", "");
     empty.put("paymentDescription", "");
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddTransactionGrid.srpt	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddTransactionGrid.srpt	Thu Jan 10 13:17:14 2013 +0100
@@ -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-2011 Openbravo SLU
+ * All portions are Copyright (C) 2010-2012 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  *************************************************************************
@@ -20,6 +20,7 @@
 <div id="sectionLinesDetail">
   <tr id="funcEvenOddRow" class="DataGrid_Body_Row DataGrid_Body_Row_yy">
     <td class="DataGrid_Body_LineNoCell"><input type="checkbox" name="inpPaymentId" value="" id="fieldPaymentId" onclick="updateSelectAll(this.checked);return true;"/></td>
+    <td class="DataGrid_Body_Cell" id="fieldFinAcc">xxCuenta</td>
     <td class="DataGrid_Body_Cell" id="fieldPayment">xx</td>
     <td class="DataGrid_Body_Cell" title="zz" id="fieldDescription">xxDescription</td>
     <td class="DataGrid_Body_Cell" id="fieldDate">xx12/12/2009</td>
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddTransactionGrid.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddTransactionGrid.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -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-2011 Openbravo SLU
+ * All portions are Copyright (C) 2010-2012 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  *************************************************************************
@@ -25,6 +25,7 @@
   <structure name="structure">
     <FIELD id="fieldRownum1">rownum</FIELD>
     <FUNCTION id="funcEvenOddRow" name="MODULE" arg1="fieldRownum1" arg2="param2" format="integerEdition" attribute="class" replace="yy"/>
+    <FIELD id="fieldFinAcc">finAcc</FIELD>
     <FIELD id="fieldPaymentId" attribute="value">paymentId</FIELD>
     <FIELD id="fieldPayment">paymentInfo</FIELD>
     <FIELD id="fieldDescription">paymentDescriptionTrunc</FIELD>
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/ProcessInvoice.java	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/ProcessInvoice.java	Thu Jan 10 13:17:14 2013 +0100
@@ -21,11 +21,13 @@
 import java.io.IOException;
 import java.io.PrintWriter;
 import java.math.BigDecimal;
+import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
@@ -47,7 +49,9 @@
 import org.openbravo.erpCommon.ad_actionButton.ActionButtonUtility;
 import org.openbravo.erpCommon.ad_forms.AcctServer;
 import org.openbravo.erpCommon.reference.PInstanceProcessData;
+import org.openbravo.erpCommon.utility.DateTimeData;
 import org.openbravo.erpCommon.utility.FieldProviderFactory;
+import org.openbravo.erpCommon.utility.OBDateUtils;
 import org.openbravo.erpCommon.utility.OBError;
 import org.openbravo.erpCommon.utility.OBMessageUtils;
 import org.openbravo.erpCommon.utility.Utility;
@@ -69,6 +73,7 @@
 
   private List<FIN_Payment> creditPayments = new ArrayList<FIN_Payment>();
   private final AdvPaymentMngtDao dao = new AdvPaymentMngtDao();
+  private static final String Purchase_Invoice_Window = "183";
 
   public void doPost(HttpServletRequest request, HttpServletResponse response)
       throws ServletException, IOException {
@@ -115,6 +120,8 @@
       final String strC_Invoice_ID = vars.getGlobalVariable("inpKey",
           strWindowId + "|C_Invoice_ID", "");
       final String strdocaction = vars.getStringParameter("inpdocaction");
+      final String strVoidInvoiceDate = vars.getStringParameter("inpVoidedDocumentDate");
+      final String strVoidInvoiceAcctDate = vars.getStringParameter("inpVoidedDocumentAcctDate");
       final String strOrg = vars.getGlobalVariable("inpadOrgId", "ProcessInvoice|Org_ID",
           IsIDFilter.instance);
 
@@ -134,8 +141,27 @@
           OBContext.restorePreviousMode();
         }
 
+        Map<String, String> parameters = null;
+        if (!strVoidInvoiceDate.isEmpty() && !strVoidInvoiceAcctDate.isEmpty()) {
+          Date voidDate = null;
+          Date voidAcctDate = null;
+          try {
+            voidDate = OBDateUtils.getDate(strVoidInvoiceDate);
+            voidAcctDate = OBDateUtils.getDate(strVoidInvoiceAcctDate);
+          } catch (ParseException pe) {
+            voidDate = new Date();
+            voidAcctDate = new Date();
+            log4j.error("Not possible to parse the following date: " + strVoidInvoiceDate, pe);
+            log4j.error("Not possible to parse the following date: " + strVoidInvoiceAcctDate, pe);
+          }
+          parameters = new HashMap<String, String>();
+          parameters.put("voidedDocumentDate", OBDateUtils.formatDate(voidDate, "yyyy-MM-dd"));
+          parameters.put("voidedDocumentAcctDate",
+              OBDateUtils.formatDate(voidAcctDate, "yyyy-MM-dd"));
+        }
+
         final ProcessInstance pinstance = CallProcess.getInstance().call(process, strC_Invoice_ID,
-            null);
+            parameters);
 
         OBDal.getInstance().getSession().refresh(invoice);
         invoice.setAPRMProcessinvoice(invoice.getDocumentAction());
@@ -406,6 +432,7 @@
     xmlDocument.setParameter("window", strWindowId);
     xmlDocument.setParameter("css", vars.getTheme());
     xmlDocument.setParameter("language", "defaultLang=\"" + vars.getLanguage() + "\";");
+    xmlDocument.setParameter("dateDisplayFormat", vars.getSessionValue("#AD_SqlDateFormat"));
     xmlDocument.setParameter("directory", "var baseDirectory = \"" + strReplaceWith + "/\";\n");
     xmlDocument.setParameter("processId", "111");
     xmlDocument.setParameter("cancel", Utility.messageBD(this, "Cancel", vars.getLanguage()));
@@ -420,6 +447,17 @@
     }
 
     xmlDocument.setParameter("docstatus", strdocstatus);
+    if (strWindowId.equals(Purchase_Invoice_Window)) {
+      // VOID action: Reverse sales/purchase invoice by default takes today as document date and
+      // accounting date.
+      xmlDocument.setParameter("voidedDocumentDate", DateTimeData.today(this));
+      xmlDocument.setParameter("voidedDocumentAcctDate", DateTimeData.today(this));
+      Invoice invoice = (Invoice) OBDal.getInstance()
+          .getProxy(Invoice.ENTITY_NAME, strC_Invoice_ID);
+      xmlDocument.setParameter("documentDate", OBDateUtils.formatDate(invoice.getInvoiceDate()));
+      xmlDocument.setParameter("documentAcctDate",
+          OBDateUtils.formatDate(invoice.getAccountingDate()));
+    }
     xmlDocument.setParameter("adTableId", stradTableId);
     xmlDocument.setParameter("processId", "111");
     xmlDocument.setParameter("processDescription", "Process Invoice");
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_forms/BatchPaymentExecution.java	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_forms/BatchPaymentExecution.java	Thu Jan 10 13:17:14 2013 +0100
@@ -20,6 +20,7 @@
 
 import java.io.IOException;
 import java.io.PrintWriter;
+import java.text.DecimalFormat;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Vector;
@@ -382,6 +383,7 @@
     strRowsData.append("  <rows numRows=\"").append(strNumRows)
         .append("\" backendPage=\"" + page + "\">\n");
     if (gridPayments != null && gridPayments.size() > 0) {
+      DecimalFormat df = Utility.getFormat(vars, "euroRelation");
       for (FIN_Payment pay : gridPayments) {
         strRowsData.append("    <tr>\n");
         for (int k = 0; k < headers.length; k++) {
@@ -406,7 +408,7 @@
             columnData = Utility.formatDate(pay.getPaymentDate(), vars.getJavaDateFormat());
             break;
           case 4: // amount
-            columnData = pay.getAmount().toString();
+            columnData = df.format(pay.getAmount());
             break;
           case 5: // rowkey
             columnData = pay.getId().toString();
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/AdvPaymentMngtDao.java	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/AdvPaymentMngtDao.java	Thu Jan 10 13:17:14 2013 +0100
@@ -1243,7 +1243,7 @@
             FIN_Payments[i].getAmount());
 
         final Currency foreignCurrency = FIN_Payments[i].getCurrency();
-
+        FieldProviderFactory.setField(data[i], "finAcc", FIN_Payments[i].getAccount().getName());
         FieldProviderFactory.setField(data[i], "paymentId", FIN_Payments[i].getId());
         FieldProviderFactory.setField(data[i], "paymentInfo", FIN_Payments[i].getDocumentNo()
             + " - "
@@ -1283,6 +1283,141 @@
     }
   }
 
+  public FieldProvider[] getAlternativePaymentsNotDeposited(FIN_FinancialAccount account,
+      Date fromDate, Date toDate, boolean isReceipt) {
+
+    String dateFormat = OBPropertiesProvider.getInstance().getOpenbravoProperties()
+        .getProperty("dateFormat.java");
+    SimpleDateFormat dateFormater = new SimpleDateFormat(dateFormat);
+    OBContext.setAdminMode();
+    try {
+      final StringBuilder whereClause = new StringBuilder();
+      final List<Object> parameters = new ArrayList<Object>();
+
+      whereClause.append(" as p ");
+      whereClause.append(" where p.");
+      whereClause.append(FIN_Payment.PROPERTY_PAYMENTMETHOD);
+      whereClause.append(".id");
+      whereClause.append(" in ");
+      whereClause.append(" ( select ft.");
+      whereClause.append(FinAccPaymentMethod.PROPERTY_PAYMENTMETHOD);
+      whereClause.append(".id");
+      whereClause.append(" from ");
+      whereClause.append("FinancialMgmtFinAccPaymentMethod ");
+      whereClause.append(" as ft");
+      whereClause.append(" where ft.");
+      whereClause.append(FinAccPaymentMethod.PROPERTY_ACCOUNT);
+      whereClause.append(".id = ?) ");
+      whereClause.append(" and p.");
+      whereClause.append(FIN_Payment.PROPERTY_STATUS);
+      whereClause.append(" IN ('RPR', 'PPM')");
+      whereClause.append(" and p.");
+      whereClause.append(FIN_Payment.PROPERTY_CURRENCY);
+      whereClause.append(".id");
+      whereClause.append(" in ");
+      whereClause.append(" ( select fa.");
+      whereClause.append(FIN_FinancialAccount.PROPERTY_CURRENCY);
+      whereClause.append(".id");
+      whereClause.append(" from ");
+      whereClause.append(" FIN_Financial_Account as fa");
+      whereClause.append(" where fa.id = ? )");
+      parameters.add(account.getId());
+      parameters.add(account.getId());
+      // IsReceipt
+      whereClause.append(" and p.");
+      whereClause.append(FIN_Payment.PROPERTY_RECEIPT);
+      whereClause.append(" = ");
+      whereClause.append(isReceipt);
+
+      whereClause.append(" and p.");
+      whereClause.append(FIN_Payment.PROPERTY_AMOUNT);
+      whereClause.append(" != ");
+      whereClause.append(BigDecimal.ZERO);
+
+      // From Date
+      if (fromDate != null) {
+        whereClause.append(" and p.");
+        whereClause.append(FIN_Payment.PROPERTY_PAYMENTDATE);
+        whereClause.append(" >= ? ");
+        parameters.add(fromDate);
+      }
+      // To Date
+      if (toDate != null) {
+        whereClause.append(" AND p.");
+        whereClause.append(FIN_Payment.PROPERTY_PAYMENTDATE);
+        whereClause.append(" < ?");
+        parameters.add(toDate);
+      }
+      // Order by date and payment no
+      whereClause.append(" ORDER BY p.");
+      whereClause.append(FIN_Payment.PROPERTY_PAYMENTDATE);
+      whereClause.append(", p.");
+      whereClause.append(FIN_Payment.PROPERTY_DOCUMENTNO);
+
+      final OBQuery<FIN_Payment> obqP = OBDal.getInstance().createQuery(FIN_Payment.class,
+          whereClause.toString(), parameters);
+
+      List<FIN_Payment> paymentOBList = obqP.list();
+
+      FIN_Payment[] FIN_Payments = new FIN_Payment[0];
+      FIN_Payments = paymentOBList.toArray(FIN_Payments);
+      FieldProvider[] data = FieldProviderFactory.getFieldProviderArray(paymentOBList);
+
+      for (int i = 0; i < data.length; i++) {
+        Boolean paymentIsReceipt = FIN_Payments[i].isReceipt();
+
+        BigDecimal depositAmt = FIN_Utility.getDepositAmount(paymentIsReceipt,
+            FIN_Payments[i].getFinancialTransactionAmount());
+        BigDecimal paymentAmt = FIN_Utility.getPaymentAmount(paymentIsReceipt,
+            FIN_Payments[i].getFinancialTransactionAmount());
+        BigDecimal foreignDepositAmt = FIN_Utility.getDepositAmount(paymentIsReceipt,
+            FIN_Payments[i].getAmount());
+        BigDecimal foreignPaymentAmt = FIN_Utility.getPaymentAmount(paymentIsReceipt,
+            FIN_Payments[i].getAmount());
+
+        final Currency foreignCurrency = FIN_Payments[i].getCurrency();
+
+        FieldProviderFactory.setField(data[i], "finAcc", FIN_Payments[i].getAccount().getName());
+        FieldProviderFactory.setField(data[i], "paymentId", FIN_Payments[i].getId());
+        FieldProviderFactory.setField(data[i], "paymentInfo", FIN_Payments[i].getDocumentNo()
+            + " - "
+            + ((FIN_Payments[i].getBusinessPartner() != null) ? FIN_Payments[i]
+                .getBusinessPartner().getName() : "") + " - "
+            + FIN_Payments[i].getCurrency().getISOCode());
+
+        // Truncate description
+        String description = FIN_Payments[i].getDescription();
+        String truncateDescription = "";
+        if (description != null) {
+          truncateDescription = (description.length() > 57) ? description.substring(0, 54)
+              .concat("...").toString() : description;
+        }
+        FieldProviderFactory.setField(data[i], "paymentDescription",
+            (description != null && description.length() > 57) ? description : "");
+        FieldProviderFactory.setField(data[i], "paymentDescriptionTrunc", truncateDescription);
+
+        FieldProviderFactory.setField(data[i], "paymentDate",
+            dateFormater.format(FIN_Payments[i].getPaymentDate()).toString());
+
+        FieldProviderFactory.setField(data[i], "depositAmount", FIN_Utility
+            .multiCurrencyAmountToDisplay(depositAmt, FIN_Payments[i].getAccount().getCurrency(),
+                foreignDepositAmt, foreignCurrency));
+        FieldProviderFactory.setField(data[i], "paymentAmount", FIN_Utility
+            .multiCurrencyAmountToDisplay(paymentAmt, FIN_Payments[i].getAccount().getCurrency(),
+                foreignPaymentAmt, foreignCurrency));
+
+        FieldProviderFactory.setField(data[i], "rownum", "" + i);
+      }
+
+      return data;
+
+    } catch (Exception e) {
+      throw new OBException(e);
+    } finally {
+      OBContext.restorePreviousMode();
+    }
+  }
+
   public String getPaymentProposalDetailAmount(FIN_PaymentScheduleDetail finPaymentScheduleDetail,
       FIN_PaymentProposal paymentProposal) {
     String amount = "";
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_AddPaymentFromJournal.java	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_AddPaymentFromJournal.java	Thu Jan 10 13:17:14 2013 +0100
@@ -117,11 +117,6 @@
                 .init(conn);
             HashMap<String, Object> parameters = new HashMap<String, Object>();
             parameters.put("GL_JournalLine_ID", journalLine.getId());
-            parameters.put("cBpartnerParaId", journalLine.getBusinessPartner().getId());
-            parameters.put("cGlitemId", journalLine.getGLItem().getId());
-            parameters.put("finFinancialAccountId", journalLine.getFinancialAccount().getId());
-            parameters.put("finPaymentmethodId", journalLine.getPaymentMethod().getId());
-            parameters.put("date", dateFormat.format(date));
             pb.setParams(parameters);
             OBError myMessage = null;
             // Create a Payment for the Journal line
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_AddPaymentFromJournalLine.java	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_AddPaymentFromJournalLine.java	Thu Jan 10 13:17:14 2013 +0100
@@ -20,15 +20,16 @@
 package org.openbravo.advpaymentmngt.process;
 
 import java.math.BigDecimal;
-import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 
+import org.hibernate.Query;
+import org.hibernate.Session;
 import org.openbravo.advpaymentmngt.dao.AdvPaymentMngtDao;
 import org.openbravo.advpaymentmngt.utility.FIN_Utility;
 import org.openbravo.base.exception.OBException;
-import org.openbravo.base.session.OBPropertiesProvider;
+import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.erpCommon.utility.OBError;
 import org.openbravo.model.common.businesspartner.BusinessPartner;
@@ -49,9 +50,6 @@
   protected void doExecute(ProcessBundle bundle) throws Exception {
     dao = new AdvPaymentMngtDao();
     OBError message = null;
-    String dateFormatString = OBPropertiesProvider.getInstance().getOpenbravoProperties()
-        .getProperty("dateFormat.java");
-    SimpleDateFormat dateFormat = new SimpleDateFormat(dateFormatString);
 
     String strMessageType = "";
     StringBuilder strMessageResult = new StringBuilder();
@@ -61,25 +59,35 @@
 
       // retrieve the parameters from the bundle
       final String journalLineId = (String) bundle.getParams().get("GL_JournalLine_ID");
-      final String bPartnerId = (String) bundle.getParams().get("cBpartnerParaId");
-      final String glItemId = (String) bundle.getParams().get("cGlitemId");
-      final String financialAccountId = (String) bundle.getParams().get("finFinancialAccountId");
-      final String paymentMethodId = (String) bundle.getParams().get("finPaymentmethodId");
-      final String strDate = (String) bundle.getParams().get("date");
 
       // Initialize objects
       GLJournalLine journalLine = OBDal.getInstance().get(GLJournalLine.class, journalLineId);
-      FIN_FinancialAccount financialAccount = OBDal.getInstance().get(FIN_FinancialAccount.class,
-          financialAccountId);
-      FIN_PaymentMethod paymentMethod = OBDal.getInstance().get(FIN_PaymentMethod.class,
-          paymentMethodId);
-      BusinessPartner bPartner = OBDal.getInstance().get(BusinessPartner.class, bPartnerId);
-      GLItem glItem = OBDal.getInstance().get(GLItem.class, glItemId);
-      Date date = dateFormat.parse(strDate);
+      FIN_FinancialAccount financialAccount = journalLine.getFinancialAccount();
+      FIN_PaymentMethod paymentMethod = journalLine.getPaymentMethod();
+      BusinessPartner bPartner = journalLine.getBusinessPartner();
+      GLItem glItem = journalLine.getGLItem();
+      Date date = journalLine.getPaymentDate();
       boolean isReceipt = journalLine.getDebit().subtract(journalLine.getCredit())
           .compareTo(BigDecimal.ZERO) > 0;
 
       // Check restrictions
+      OBContext.setAdminMode(false);
+      try {
+        final StringBuilder hsqlScript = new StringBuilder();
+        hsqlScript.append("select distinct(o.generalLedger) ");
+        hsqlScript.append("from Organization o ");
+        hsqlScript.append("where ad_isorgincluded('" + journalLine.getOrganization().getId()
+            + "', o.id, o.client) <> -1 ");
+        hsqlScript.append("and o.generalLedger is not null ");
+        final Session session = OBDal.getInstance().getSession();
+        final Query query = session.createQuery(hsqlScript.toString());
+        if (query.list().size() != 1) {
+          throw new OBException("@FIN_NoMultiAccountingAllowed@");
+        }
+      } finally {
+        OBContext.restorePreviousMode();
+      }
+
       if (!journalLine.getCurrency().equals(financialAccount.getCurrency())) {
         throw new OBException("@FIN_NoMultiCurrencyAllowed@");
       }
--- a/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -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.19003]]></VERSION>
+<!--C70732EA90A14EC0916078B85CC33D2D-->  <VERSION><![CDATA[1.1.19180]]></VERSION>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <DESCRIPTION><![CDATA[JBoss Weld]]></DESCRIPTION>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <HELP><![CDATA[Provides the JBoss Weld framework: Java Contexts and Dependency Injection for the Java EE platform (CDI). For more information see http://seamframework.org/Weld]]></HELP>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <URL><![CDATA[http://forge.openbravo.com/projects/weld]]></URL>
--- a/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -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.19003]]></STARTVERSION>
+<!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <STARTVERSION><![CDATA[3.0.19180]]></STARTVERSION>
 <!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <DEPENDANT_MODULE_NAME><![CDATA[Core]]></DEPENDANT_MODULE_NAME>
 <!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -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.19003]]></VERSION>
+<!--9BA0836A3CD74EE4AB48753A47211BCC-->  <VERSION><![CDATA[2.1.19180]]></VERSION>
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <DESCRIPTION><![CDATA[Provides the main application components for the openbravo user interface]]></DESCRIPTION>
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <HELP><![CDATA[Provides the main application components for the openbravo user interface. The main layout incorporates a navigation bar and a main view area.]]></HELP>
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <URL><![CDATA[http://forge.openbravo.com/projects/clientapplication]]></URL>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -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.19003]]></STARTVERSION>
+<!--15D7CE8D95D043189162DBABA54A1F61-->  <STARTVERSION><![CDATA[2.1.19180]]></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.19003]]></STARTVERSION>
+<!--60A170212F36499D83B8AD38D01F46B3-->  <STARTVERSION><![CDATA[2.1.19180]]></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.19003]]></STARTVERSION>
+<!--824D60CB352E4099B1D8C903CA139DAE-->  <STARTVERSION><![CDATA[3.0.19180]]></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.19003]]></STARTVERSION>
+<!--E8FD820AFE3D4FE08C02FC47769026AD-->  <STARTVERSION><![CDATA[8.1.19180]]></STARTVERSION>
 <!--E8FD820AFE3D4FE08C02FC47769026AD-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--E8FD820AFE3D4FE08C02FC47769026AD-->  <DEPENDANT_MODULE_NAME><![CDATA[Smartclient]]></DEPENDANT_MODULE_NAME>
 <!--E8FD820AFE3D4FE08C02FC47769026AD-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/ApplicationComponentProvider.java	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/ApplicationComponentProvider.java	Thu Jan 10 13:17:14 2013 +0100
@@ -87,6 +87,8 @@
         "web/org.openbravo.client.application/js/utilities/ob-utilities-date.js", true));
     globalResources.add(createStaticResource(
         "web/org.openbravo.client.application/js/utilities/ob-utilities-number.js", true));
+    globalResources.add(createStaticResource(
+        "web/org.openbravo.client.application/js/utilities/ob-utilities-style.js", true));
 
     globalResources.add(createStaticResource(
         "web/org.openbravo.client.application/js/utilities/ob-popup.js", false));
@@ -155,6 +157,8 @@
     globalResources.add(createStaticResource(
         "web/org.openbravo.client.application/js/main/ob-tab.js", false));
     globalResources.add(createStaticResource(
+        "web/org.openbravo.client.application/js/form/formitem/ob-formitem-calendar.js", true));
+    globalResources.add(createStaticResource(
         "web/org.openbravo.client.application/js/grid/ob-grid.js", false));
 
     globalResources.add(createStaticResource(
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/DynamicExpressionParser.java	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/DynamicExpressionParser.java	Thu Jan 10 13:17:14 2013 +0100
@@ -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 Openbravo SLU
+ * All portions are Copyright (C) 2011-2013 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -32,6 +32,7 @@
 import org.openbravo.client.kernel.reference.UIDefinition;
 import org.openbravo.client.kernel.reference.UIDefinitionController;
 import org.openbravo.client.kernel.reference.YesNoUIDefinition;
+import org.openbravo.data.Sqlc;
 import org.openbravo.erpCommon.utility.DimensionDisplayUtility;
 import org.openbravo.model.ad.ui.AuxiliaryInput;
 import org.openbravo.model.ad.ui.Field;
@@ -71,8 +72,16 @@
   private Tab tab;
   private Field field;
   private StringBuffer jsCode;
+  private boolean tabLevelDisplayLogic = false;
   private ApplicationDictionaryCachedStructures cachedStructures;
 
+  public DynamicExpressionParser(String code, Tab tab, boolean tabLevelDisplayLogic) {
+    this.code = code;
+    this.tab = tab;
+    this.tabLevelDisplayLogic = tabLevelDisplayLogic;
+    parse();
+  }
+
   public DynamicExpressionParser(String code, Tab tab) {
     this.code = code;
     this.tab = tab;
@@ -137,8 +146,10 @@
         jsCode.append(COMPARATIONS[pos[1]][1]);
       }
 
+      // The value might be transformed if the leftPart contains the string 'currentValues'
+      // or if a tab level display logic is being parsed
       DisplayLogicElement rightPart = getDisplayLogicText(token2,
-          leftPart.text.contains("currentValues"), leftPart.isBoolean);
+          leftPart.text.contains("currentValues") || tabLevelDisplayLogic, leftPart.isBoolean);
       jsCode.append(rightPart.text);
     }
     // Handle accounting dimensions special display logic
@@ -298,9 +309,51 @@
         return new DisplayLogicElement(TOKEN_PREFIX + auxIn.getName(), false);
       }
     }
-    sessionAttributesInExpression.add(token);
+
+    String convertedToken = token;
+    boolean isBoolean = false;
+
+    // Session attributes (#sessionAttributeName) must not be converted to the inp format, and they
+    // do not need to be treated as a boolean
+    if (tabLevelDisplayLogic && !convertedToken.startsWith("#")) {
+      Field ancestorField = lookForFieldInAncestorTabs(token);
+      if (ancestorField != null) {
+        // If the token is the name of an ancestor tab field, it must to converted to its inp format
+        convertedToken = "inp" + Sqlc.TransformaNombreColumna(token);
+        UIDefinition uiDef = UIDefinitionController.getInstance().getUIDefinition(
+            ancestorField.getColumn().getId());
+        // ... in that case, the left part is a boolean if that field is a YesNoUIDefinition
+        isBoolean = (uiDef instanceof YesNoUIDefinition);
+      }
+
+    }
+    sessionAttributesInExpression.add(convertedToken);
     return new DisplayLogicElement(TOKEN_PREFIX
-        + (token.startsWith("#") ? token.replace("#", "_") : token), false);
+        + (convertedToken.startsWith("#") ? convertedToken.replace("#", "_") : convertedToken),
+        isBoolean);
+  }
+
+  private Field lookForFieldInAncestorTabs(String fieldName) {
+    Field aField = null;
+    Tab parentTab = KernelUtils.getInstance().getParentTab(tab);
+    while (parentTab != null && aField == null) {
+      aField = searchForFieldInTab(parentTab, fieldName);
+      parentTab = KernelUtils.getInstance().getParentTab(parentTab);
+    }
+    return aField;
+  }
+
+  private Field searchForFieldInTab(Tab tab, String fieldName) {
+    List<Field> fields = tab.getADFieldList();
+    for (Field aField : fields) {
+      if (aField.getColumn() == null) {
+        continue;
+      }
+      if (fieldName.equalsIgnoreCase(aField.getColumn().getDBColumnName())) {
+        return aField;
+      }
+    }
+    return null;
   }
 
   /*
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/OBBindings.java	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/OBBindings.java	Thu Jan 10 13:17:14 2013 +0100
@@ -19,6 +19,7 @@
 package org.openbravo.client.application;
 
 import java.text.SimpleDateFormat;
+import java.util.Calendar;
 import java.util.Date;
 import java.util.Map;
 
@@ -28,6 +29,7 @@
 import org.openbravo.base.util.Check;
 import org.openbravo.base.util.OBClassLoader;
 import org.openbravo.dal.core.OBContext;
+import org.openbravo.service.json.JsonUtils;
 
 /**
  * JS - Java binding to use in JavaScript expressions.
@@ -43,6 +45,7 @@
   private HttpSession httpSession;
   private SimpleDateFormat dateFormat = null;
   private SimpleDateFormat dateTimeFormat = null;
+  private SimpleDateFormat jsDateTimeFormat = null;
 
   public OBBindings(OBContext obContext) {
     Check.isNotNull(obContext, "The OBContext parameter cannot be null");
@@ -68,6 +71,8 @@
 
     dateTimeFormat = new SimpleDateFormat(
         (String) httpSession.getAttribute("#AD_JAVADATETIMEFORMAT"));
+
+    jsDateTimeFormat = JsonUtils.createJSTimeFormat();
   }
 
   public OBContext getContext() {
@@ -178,14 +183,30 @@
 
   public Date parseDateTime(String dateTime) {
     try {
-      Date result = dateTimeFormat.parse(dateTime);
+      Date result = convertToLocalTime(jsDateTimeFormat.parse(dateTime));
       return result;
     } catch (Exception e) {
-      log.error("Error parsing string date " + dateTime + " with format: " + dateTimeFormat, e);
+      try {
+        Date result = convertToLocalTime(dateTimeFormat.parse(dateTime));
+        return result;
+      } catch (Exception ex) {
+        log.error("Error parsing string date " + dateTime + " with format: " + dateTimeFormat, e);
+      }
     }
     return null;
   }
 
+  private static Date convertToLocalTime(Date UTCTime) {
+    Calendar localTime = Calendar.getInstance();
+    localTime.setTime(UTCTime);
+
+    int gmtMillisecondOffset = (localTime.get(Calendar.ZONE_OFFSET) + localTime
+        .get(Calendar.DST_OFFSET));
+    localTime.add(Calendar.MILLISECOND, gmtMillisecondOffset);
+
+    return localTime.getTime();
+  }
+
   public String formatDate(Date d, String format) {
     Check.isNotNull(format, "Format is a required parameter");
     SimpleDateFormat df = new SimpleDateFormat(format);
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/PropertiesComponent.java	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/PropertiesComponent.java	Thu Jan 10 13:17:14 2013 +0100
@@ -22,8 +22,8 @@
 import java.util.Collection;
 import java.util.List;
 
+import org.apache.log4j.Logger;
 import org.codehaus.jettison.json.JSONArray;
-import org.codehaus.jettison.json.JSONException;
 import org.codehaus.jettison.json.JSONObject;
 import org.openbravo.client.kernel.BaseTemplateComponent;
 import org.openbravo.client.kernel.Template;
@@ -39,6 +39,7 @@
  * @author mtaal
  */
 public class PropertiesComponent extends BaseTemplateComponent {
+  private static final Logger log = Logger.getLogger(PropertiesComponent.class);
 
   /*
    * (non-Javadoc)
@@ -110,8 +111,9 @@
             localProperty.setValue(value);
             isValid = true;
           }
-        } catch (JSONException e) {
+        } catch (Throwable t) {
           // not a valid JSONObject
+          log.error(t.getMessage() + " id: " + localProperty.getId() + " value: " + value, t);
         }
         if (isValid) {
           localProperty.setValue(value);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/LocationSettingsHandler.java	Thu Jan 10 13:17:14 2013 +0100
@@ -0,0 +1,115 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2012 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+package org.openbravo.client.application.event;
+
+import java.text.DecimalFormat;
+import java.text.SimpleDateFormat;
+
+import javax.enterprise.event.Observes;
+
+import org.apache.log4j.Logger;
+import org.openbravo.base.exception.OBException;
+import org.openbravo.base.model.Entity;
+import org.openbravo.base.model.ModelProvider;
+import org.openbravo.client.kernel.event.EntityDeleteEvent;
+import org.openbravo.client.kernel.event.EntityNewEvent;
+import org.openbravo.client.kernel.event.EntityPersistenceEventObserver;
+import org.openbravo.client.kernel.event.EntityUpdateEvent;
+import org.openbravo.erpCommon.utility.OBMessageUtils;
+import org.openbravo.model.common.geography.Country;
+
+/**
+ * Action handler that checks if the location settings defined by the user contains legal values
+ * 
+ * 
+ * @author openbravo
+ */
+public class LocationSettingsHandler extends EntityPersistenceEventObserver {
+  private static Entity[] entities = { ModelProvider.getInstance().getEntity(Country.ENTITY_NAME) };
+  protected Logger logger = Logger.getLogger(this.getClass());
+
+  @Override
+  protected Entity[] getObservedEntities() {
+    return entities;
+  }
+
+  public void onUpdate(@Observes
+  EntityUpdateEvent event) {
+    if (!isValidEvent(event)) {
+      return;
+    }
+    Country instanceCountry = (Country) event.getTargetInstance();
+    checkCorrectValues(instanceCountry.getNumericmask(), instanceCountry.getDatetimeformat(),
+        instanceCountry.getDateformat());
+  }
+
+  public void onSave(@Observes
+  EntityNewEvent event) {
+    if (!isValidEvent(event)) {
+      return;
+    }
+    Country instanceCountry = (Country) event.getTargetInstance();
+    checkCorrectValues(instanceCountry.getNumericmask(), instanceCountry.getDatetimeformat(),
+        instanceCountry.getDateformat());
+  }
+
+  public void onDelete(@Observes
+  EntityDeleteEvent event) {
+    if (!isValidEvent(event)) {
+      return;
+    }
+  }
+
+  private void checkCorrectValues(String numericmask, String datetimeformat, String dateformat) {
+    if (numericmask != null) {
+      if (checkNumericMask(numericmask)) {
+        try {
+          new DecimalFormat(numericmask);
+        } catch (IllegalArgumentException iaex) {
+          throw new OBException(OBMessageUtils.messageBD("InvalidNumericMask"));
+        }
+      } else {
+        throw new OBException(OBMessageUtils.messageBD("InvalidNumericMask"));
+      }
+    }
+    try {
+      if (datetimeformat != null)
+        new SimpleDateFormat(datetimeformat);
+    } catch (IllegalArgumentException iaex) {
+      throw new OBException(OBMessageUtils.messageBD("InvalidDateTimeFormat"));
+    }
+    try {
+      if (dateformat != null)
+        if (checkDateFormat(dateformat))
+          new SimpleDateFormat(dateformat);
+        else
+          throw new OBException(OBMessageUtils.messageBD("InvalidDateFormat"));
+    } catch (IllegalArgumentException iaex) {
+      throw new OBException(OBMessageUtils.messageBD("InvalidDateFormat"));
+    }
+  }
+
+  private boolean checkNumericMask(String numericmask) {
+    return numericmask.matches("[#0\\.,]+");
+  }
+
+  private boolean checkDateFormat(String date) {
+    return date.matches("[^aHkKhmsSzZ]+");
+  }
+}
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-view-field.js.ftl	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-view-field.js.ftl	Thu Jan 10 13:17:14 2013 +0100
@@ -89,7 +89,7 @@
         <#if field.redrawOnChange && field.displayed>
             redrawOnChange: true,
         </#if>
-        <#if field.showIf != "" && field.displayed>
+        <#if field.showIf != "" && (field.displayed || field.statusBarField)>
             showIf: function(item, value, form, currentValues, context) {
                 return (${field.showIf});          
             },          
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-view-tab.js.ftl	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-view-tab.js.ftl	Thu Jan 10 13:17:14 2013 +0100
@@ -34,6 +34,16 @@
         moduleId: '${tabComponent.moduleId}',
     </#if>
     
+    <#if tabComponent.showIf != "" >
+        showTabIf: function(context) {
+                    return (${tabComponent.showIf});
+                },
+    </#if>
+
+     <#if tabComponent.preferenceAttributes != "" >
+        sessionAttributes: ${tabComponent.preferenceAttributes},
+    </#if>
+
     <#if tabComponent.defaultEditMode>
     defaultEditMode: ${tabComponent.defaultEditMode?string},
     </#if> 
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java	Thu Jan 10 13:17:14 2013 +0100
@@ -406,6 +406,19 @@
         // and we add the columns which have a callout
 
         final Map<String, String> sessionAttributesMap = new HashMap<String, String>();
+
+        // Adds to the session attributes the attributes used in
+        // the display logic of the tabs
+        Window w = tab.getWindow();
+        for (Tab aTab : w.getADTabList()) {
+          if (aTab.getDisplayLogic() != null && aTab.isActive()) {
+            final DynamicExpressionParser parser = new DynamicExpressionParser(
+                aTab.getDisplayLogic(), aTab);
+            setSessionAttributesFromParserResult(parser, sessionAttributesMap, tab.getWindow()
+                .getId());
+          }
+        }
+
         for (Field field : getADFieldList(tab.getId())) {
           if (field.getColumn() == null) {
             continue;
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewFieldHandler.java	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewFieldHandler.java	Thu Jan 10 13:17:14 2013 +0100
@@ -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-2013 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -405,7 +405,14 @@
       viewField.setField(field);
       viewField.setProperty(property);
       viewField.setRedrawOnChange(false);
-      viewField.setShowIf("");
+
+      String jsExpression = null;
+      if (field.getDisplayLogic() != null && !field.getDisplayLogic().isEmpty()) {
+        final DynamicExpressionParser parser = new DynamicExpressionParser(field.getDisplayLogic(),
+            tab, field);
+        jsExpression = parser.getJSExpression();
+      }
+      viewField.setShowIf(jsExpression != null ? jsExpression : "");
       viewField.setReadOnlyIf("");
 
       viewFields.add(viewField);
@@ -529,9 +536,11 @@
     }
 
     public OBViewFieldAudit(String type, Element element) {
+      // force reload of element as if it was previously loaded but its children were not touched,
+      // lazy initialization fails
+      this.element = OBDal.getInstance().get(Element.class, element.getId());
+
       name = type;
-      this.element = element;
-
       if (type.endsWith("By")) {
         // User search
         refType = "30";
@@ -1321,6 +1330,10 @@
       }
     }
 
+    public boolean isStatusBarField() {
+      return field.isShownInStatusBar();
+    }
+
     public boolean isShowInitiallyInGrid() {
       return field.isShowInGridView();
     }
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewTab.java	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewTab.java	Thu Jan 10 13:17:14 2013 +0100
@@ -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-2013 Openbravo SLU 
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -29,6 +29,8 @@
 import javax.inject.Inject;
 
 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;
@@ -39,6 +41,7 @@
 import org.openbravo.client.kernel.Component;
 import org.openbravo.client.kernel.ComponentProvider;
 import org.openbravo.client.kernel.KernelUtils;
+import org.openbravo.client.kernel.RequestContext;
 import org.openbravo.client.kernel.Template;
 import org.openbravo.client.kernel.reference.UIDefinitionController;
 import org.openbravo.dal.core.DalUtil;
@@ -88,6 +91,8 @@
   private boolean isRootTab;
   private String uniqueString = "" + System.currentTimeMillis();
 
+  private Map<String, String> preferenceAttributesMap = new HashMap<String, String>();
+
   @Inject
   private OBViewFieldHandler fieldHandler;
 
@@ -514,6 +519,55 @@
     return "";
   }
 
+  public String getShowIf() {
+
+    String jsExpression = null;
+    if (tab.getDisplayLogic() != null && !tab.getDisplayLogic().isEmpty()) {
+      boolean inpColumnNames = true;
+      final DynamicExpressionParser parser = new DynamicExpressionParser(tab.getDisplayLogic(),
+          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()) {
+      // The value of the Session properties (#sessionPropertyName) and Preferences (name does not
+      // start with inp) can be evaluated before the tab is loaded
+      if (!preferenceAttributesMap.containsKey(attrName)
+          && (attrName.startsWith("#") || !attrName.startsWith("inp"))) {
+        final String attrValue = Utility.getContext(new DalConnectionProvider(false),
+            RequestContext.get().getVariablesSecureApp(), attrName, windowId);
+        preferenceAttributesMap.put(attrName.replace("#", "_"), attrValue);
+      }
+    }
+  }
+
+  // Returns the preference attributes map in JSON format
+  public String getPreferenceAttributes() {
+    String preferenceAttributes = "";
+    if (!preferenceAttributesMap.isEmpty()) {
+      try {
+        JSONObject preferenceAttributesJSON = new JSONObject();
+        for (String attr : preferenceAttributesMap.keySet()) {
+          preferenceAttributesJSON.put(attr, preferenceAttributesMap.get(attr));
+        }
+        preferenceAttributes = preferenceAttributesJSON.toString();
+      } catch (JSONException e) {
+      }
+    }
+    return preferenceAttributes;
+  }
+
   public class ButtonField {
     private static final String AD_DEF_ERROR = "AD definition error: process parameter (%s) is using %s reference without %s";
     private String id;
@@ -894,5 +948,6 @@
     public boolean getSession() {
       return session;
     }
+
   }
 }
--- /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-calendar.js	Thu Jan 10 13:17:14 2013 +0100
@@ -0,0 +1,57 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use. this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2012 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+
+// == OBClientClassCanvasItem ==
+// Extends Calendar, with some customizations (most of them styling related)
+isc.ClassFactory.defineClass('OBCalendar', isc.Calendar);
+
+isc.ClassFactory.defineClass('OBCalendarTabSet', isc.TabSet);
+
+
+isc.OBCalendar.addProperties({
+  initWidget: function () {
+    this.firstDayOfWeek = 1;
+    this.eventWindowStyle = OB.Styles.OBCalendar.eventWindowStyle;
+    this.datePickerButtonDefaults.src = OB.Styles.OBCalendar.datePickerButton.src;
+    this.datePickerButtonDefaults.width = OB.Styles.OBCalendar.datePickerButton.width;
+    this.datePickerButtonDefaults.height = OB.Styles.OBCalendar.datePickerButton.height;
+    this.previousButtonDefaults.src = OB.Styles.OBCalendar.previousButton.src;
+    this.previousButtonDefaults.width = OB.Styles.OBCalendar.previousButton.width;
+    this.previousButtonDefaults.height = OB.Styles.OBCalendar.previousButton.height;
+    this.nextButtonDefaults.src = OB.Styles.OBCalendar.nextButton.src;
+    this.nextButtonDefaults.width = OB.Styles.OBCalendar.nextButton.width;
+    this.nextButtonDefaults.height = OB.Styles.OBCalendar.nextButton.height;
+    this.controlsBarDefaults.layoutTopMargin = OB.Styles.OBCalendar.controlsTopMarging;
+    this.mainViewDefaults._constructor = isc.OBCalendarTabSet;
+    this.Super('initWidget', arguments);
+    this.controlsBar.reorderMember(4, 1); // Moves the 'next' button to the second position
+    this.controlsBar.reorderMember(2, 4); // Moves the 'displayed date' to last position
+    if (this.showDayView !== false) {
+      this.dayView.baseStyle = OB.Styles.OBCalendar.dayView_baseStyle;
+    }
+    if (this.showWeekView !== false) {
+      this.weekView.baseStyle = OB.Styles.OBCalendar.weekView_baseStyle;
+      this.weekView.headerBaseStyle = OB.Styles.OBCalendar.weekView_headerBaseStyle;
+    }
+    if (this.showMonthView !== false) {
+      this.monthView.baseStyle = OB.Styles.OBCalendar.monthView_baseStyle;
+      this.monthView.headerBaseStyle = OB.Styles.OBCalendar.monthView_headerBaseStyle;
+    }
+  }
+});
\ No newline at end of file
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-canvas.js	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-canvas.js	Thu Jan 10 13:17:14 2013 +0100
@@ -80,7 +80,11 @@
   }
 });
 
-isc.defineClass('OBTruncAddMinusDisplay', isc.Label);
+// == OBGridFormLabel ==
+// Base component to add label fields in the grid. For styling purposes.
+isc.defineClass('OBGridFormLabel', isc.Label);
+
+isc.defineClass('OBTruncAddMinusDisplay', isc.OBGridFormLabel);
 
 isc.OBTruncAddMinusDisplay.addProperties({
   wrap: false,
@@ -111,7 +115,7 @@
   }
 });
 
-isc.defineClass('OBAddPercentageSign', isc.Label);
+isc.defineClass('OBAddPercentageSign', isc.OBGridFormLabel);
 
 isc.OBAddPercentageSign.addProperties({
   wrap: false,
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-date.js	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-date.js	Thu Jan 10 13:17:14 2013 +0100
@@ -264,7 +264,7 @@
       //  the grid does not save the value before making the FIC call, so the value has to 
       //  be saved explicitly
       //  See issue 19694 (https://issues.openbravo.com/view.php?id=19694)
-      if (this.grid && this.grid.isEditing()) {
+      if (this.grid && this.grid.isEditing && this.grid.isEditing()) {
         this.grid.setEditValue(this.grid.getEditRow(), this.name, this.getValue(), true, true);
       }
       this.textField._textChanged = false;
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-number.js	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-number.js	Thu Jan 10 13:17:14 2013 +0100
@@ -512,7 +512,7 @@
   keyPressFilterNumeric: null,
   doBlurLogic: false,
   operator: 'equals',
-  validOperators: ['equals', 'lessThan', 'greaterThan', 'notEqual', 'lessThan', 'lessThanOrEqual', 'greaterThanOrEqual', 'between', 'betweenInclusive', 'isNull', 'isNotNull', 'equalsField', 'notEqualField', 'greaterThanField', 'lessThanField', 'greaterOrEqualField', 'lessOrEqualField'],
+  validOperators: ['equals', 'lessThan', 'greaterThan', 'notEqual', 'lessThan', 'lessOrEqual', 'greaterOrEqual', 'between', 'betweenInclusive', 'isNull', 'isNotNull', 'equalsField', 'notEqualField', 'greaterThanField', 'lessThanField', 'greaterOrEqualField', 'lessOrEqualField'],
 
   // prevent handling of equal symbol in filteritem
   keyDownAction: function (item, form, keyName) {
@@ -585,6 +585,9 @@
 
   convertToStringValue: function (value) {
     var type = this.typeInstance;
+    if (isc.isA.String(value) && !isNaN(value)) {
+      value = parseFloat(value);
+    }
     if (!isc.isA.String(value)) {
       // on purpose no grouping symbol
       return OB.Utilities.Number.JSToOBMasked(value, type.maskNumeric, type.decSeparator, null, type.groupInterval);
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js	Thu Jan 10 13:17:14 2013 +0100
@@ -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-2013 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -112,6 +112,9 @@
 
     for (i = 0; i < length; i++) {
       item = this.getItem(this.statusBarFields[i]);
+      if (item.statusBarShowIf && item.statusBarShowIf(item, item.getValue(), this, this.getValues()) === false) {
+        continue;
+      }
       title = item.getTitle();
       sourceWindowId = this.view.standardWindow.windowId;
       refColumnName = item.refColumnName;
@@ -814,6 +817,9 @@
 
     length = this.getFields().length;
 
+    //Updates the visibility of the tabs before they are shown to the client
+    this.view.updateSubtabVisibility();
+
     if (this.validateAfterFicReturn) {
       delete this.validateAfterFicReturn;
       // only validate the fields which have errors or which have changed
@@ -1189,6 +1195,13 @@
     if (item._hasChanged) {
       this.itemChangeActions(item);
 
+      this.view.updateSubtabVisibility();
+
+      if (!this.isNew) {
+        this.view.statusBar.mode = "EDIT";
+        this.view.statusBar.setContentLabel(this.view.statusBar.editIcon, 'OBUIAPP_Editing', this.getStatusBarFields());
+      }
+
       this.onFieldChanged(item.form, item, item.getValue());
 
       if (this.view) {
@@ -1915,7 +1928,7 @@
       value = item.getValue();
       // Do no check ids, even though they are mandatory they are automatically set DAL before
       // storing the record in the database. See issue https://issues.openbravo.com/view.php?id=21657
-      if (this.isRequired(item) && !this.isID(item) && value !== false && value !== 0 && !value) {
+      if (this.isRequired(item) && (item.displayed !== false) && !this.isID(item) && value !== false && value !== 0 && !value) {
         return false;
       }
     }
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-grid.js	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-grid.js	Thu Jan 10 13:17:14 2013 +0100
@@ -136,7 +136,9 @@
 
     response = OB.KeyboardManager.Shortcuts.monitor('OBGrid.filter', this.grid.fieldSourceGrid);
     if (response !== false) {
-      response = this.Super('filterFieldsKeyDown', arguments);
+      if (item.keyDownAction) {
+        return item.keyDownAction(item, form, keyName);
+      }
     }
     return response;
   },
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js	Thu Jan 10 13:17:14 2013 +0100
@@ -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-2013 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -211,6 +211,31 @@
     OB.TestRegistry.register('org.openbravo.client.application.ViewGrid_' + this.tabId, this.viewGrid);
     OB.TestRegistry.register('org.openbravo.client.application.ViewForm_' + this.tabId, this.viewForm);
 
+    if (this.showTabIf && !this.originalShowTabIf) {
+      this.originalShowTabIf = this.showTabIf;
+      this.showTabIf = function (context) {
+        var originalShowTabIfValue = false;
+
+        try {
+          if (isc.isA.Function(this.originalShowTabIf)) {
+            originalShowTabIfValue = this.originalShowTabIf(context);
+          } else {
+            originalShowTabIfValue = isc.JSON.decode(this.originalShowTabIf);
+          }
+        } catch (_exception) {
+          isc.warn(_exception + ' ' + _exception.message + ' ' + _exception.stack);
+        }
+        return originalShowTabIfValue;
+      };
+    }
+
+    // If the tab comes with session attributes (preference attributes used in the display
+    // logic of the tab, see issue https://issues.openbravo.com/view.php?id=5202), assign them
+    // to the form, so they will be retrieved when getContextInfo() is called for the form
+    if (this.sessionAttributes) {
+      this.viewForm.sessionAttributes = this.sessionAttributes;
+    }
+
     if (this.actionToolbarButtons) {
       length = this.actionToolbarButtons.length;
       for (i = 0; i < length; i++) {
@@ -239,6 +264,9 @@
     this.Super('initWidget', arguments);
 
     this.toolBar.updateButtonState(true, false, true);
+
+    // Update the subtab visibility before the tabs are shown to the client
+    this.updateSubtabVisibility();
   },
 
   show: function () {
@@ -1235,6 +1263,10 @@
       return;
     }
 
+    // Update the tab visibility after a record has been selected and its session
+    // attributes have been updated
+    this.updateSubtabVisibility();
+
     // If the record has been automatically selected because was the only record in the header tab,
     // only select the record if the window has not been opened by clicking on the recent views icon to
     // create a new record
@@ -1287,6 +1319,51 @@
     delete this.isOpenDirectModeParent;
   },
 
+  updateSubtabVisibility: function () {
+    var i, length, tabViewPane, activeTab, activeTabNum, activeTabPane, indexFirstNotHiddenTab;
+    if (this.childTabSet) {
+      length = this.childTabSet.tabs.length;
+      for (i = 0; i < length; i++) {
+        tabViewPane = this.childTabSet.tabs[i].pane;
+        // Calling getContextInfo with (false, true, true) in order to obtain also the value of the
+        // session attributes of the form
+        if (tabViewPane.showTabIf && !(tabViewPane.showTabIf(tabViewPane.getContextInfo(false, true, true)))) {
+          this.childTabSet.tabBar.members[i].hide();
+          tabViewPane.hidden = true;
+        } else {
+          if (this.childTabSet.visibility === 'hidden') {
+            this.childTabSet.show();
+          }
+          this.childTabSet.tabBar.members[i].show();
+          tabViewPane.hidden = false;
+          tabViewPane.updateSubtabVisibility();
+        }
+      }
+
+      // If the active tab of the tabset is now hidden, another tab has to to be selected
+      // If there are no visible tabs left, maximize the current view
+      activeTab = this.childTabSet.getSelectedTab();
+      activeTabNum = this.childTabSet.getTabNumber(activeTab);
+      activeTabPane = this.childTabSet.getTabPane(activeTab);
+      if (activeTabPane.hidden) {
+        //Look for the first not-hidden tab
+        indexFirstNotHiddenTab = -1;
+        for (i = 0; i < length; i++) {
+          tabViewPane = this.childTabSet.tabs[i].pane;
+          if (!tabViewPane.hidden) {
+            indexFirstNotHiddenTab = i;
+            break;
+          }
+        }
+        if (indexFirstNotHiddenTab !== -1) {
+          this.childTabSet.selectTab(indexFirstNotHiddenTab);
+        } else {
+          this.childTabSet.hide();
+        }
+      }
+    }
+  },
+
   // set childs to refresh when they are made visible
   setChildsToRefresh: function () {
     var length, i;
@@ -2119,7 +2196,7 @@
   },
 
   setFieldFormProperties: function (fld, isGridField) {
-    var onChangeFunction;
+    var onChangeFunction, newShowIf;
 
     if (fld.displayed === false && !isGridField) {
       fld.hiddenInForm = true;
@@ -2127,12 +2204,17 @@
       fld.alwaysTakeSpace = false;
     }
 
+
+    if (this.statusBarFields.contains(fld.name)) {
+      fld.statusBarField = true;
+    }
+
     if (!fld.width) {
       fld.width = '*';
     }
     if (fld.showIf && !fld.originalShowIf) {
       fld.originalShowIf = fld.showIf;
-      fld.showIf = function (item, value, form, values) {
+      newShowIf = function (item, value, form, values) {
         var currentValues = values || form.view.getCurrentValues(),
             context = form.getCachedContextInfo(),
             originalShowIfValue = false;
@@ -2148,9 +2230,14 @@
         } catch (_exception) {
           isc.warn(_exception + ' ' + _exception.message + ' ' + _exception.stack);
         }
-
-        return !this.hiddenInForm && context && originalShowIfValue;
+        return !(this.hiddenInForm && !this.statusBarField) && context && originalShowIfValue;
       };
+      if (fld.statusBarField) {
+        fld.showIf = '';
+        fld.statusBarShowIf = newShowIf;
+      } else {
+        fld.showIf = newShowIf;
+      }
     }
     if (fld.type === 'OBAuditSectionItem') {
       var expandAudit = OB.PropertyStore.get('ShowAuditDefault', this.standardProperties.inpwindowId);
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js	Thu Jan 10 13:17:14 2013 +0100
@@ -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-2013 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -865,7 +865,8 @@
   selectChildTab: function (mainTabSet) {
     var childTabSet = this.activeView.childTabSet;
 
-    if (!childTabSet) {
+    // If all the subtabs are hidden due to its display logic, the child tabset will be hidden
+    if (!childTabSet || childTabSet.visibility === 'hidden') {
       return false;
     }
 
@@ -887,7 +888,8 @@
   // Called from the main app tabset
   // Selects the previous tab of the current selected and active tab (independently of its level)
   selectPreviousTab: function (mainTabSet) {
-    var activeTabSet = this.activeView.parentTabSet;
+    var activeTabSet = this.activeView.parentTabSet,
+        previousTabVisible, previousTabIndex;
     if (!activeTabSet) { // If activeTabSet is null means that we are in the top level
       activeTabSet = mainTabSet;
     }
@@ -895,11 +897,22 @@
         activeTabNum = activeTabSet.getTabNumber(activeTab),
         activeTabPane = activeTabSet.getTabPane(activeTab);
 
-    if ((activeTabNum - 1) < 0) {
+    // Look for the next visible tab
+    previousTabVisible = false;
+    previousTabIndex = activeTabNum - 1;
+    while (previousTabVisible === false && previousTabIndex >= 0) {
+      if (!activeTabSet.tabs[previousTabIndex].pane.hidden) {
+        previousTabVisible = true;
+      } else {
+        previousTabIndex--;
+      }
+    }
+
+    if (!previousTabVisible) {
       return false;
     }
 
-    activeTabSet.selectTab(activeTabNum - 1);
+    activeTabSet.selectTab(previousTabIndex);
 
     // after select the new tab, activeTab related variables are updated
     activeTab = activeTabSet.getSelectedTab();
@@ -917,7 +930,8 @@
   // Called from the main app tabset
   // Selects the next tab of the current selected and active tab (independently of its level)
   selectNextTab: function (mainTabSet) {
-    var activeTabSet = this.activeView.parentTabSet;
+    var activeTabSet = this.activeView.parentTabSet,
+        nextTabVisible, nextTabIndex;
     if (!activeTabSet) { // If activeTabSet is null means that we are in the top level
       activeTabSet = mainTabSet;
     }
@@ -925,11 +939,22 @@
         activeTabNum = activeTabSet.getTabNumber(activeTab),
         activeTabPane = activeTabSet.getTabPane(activeTab);
 
-    if ((activeTabNum + 1) >= activeTabSet.tabs.getLength()) {
+    // Look for the next visible tab
+    nextTabVisible = false;
+    nextTabIndex = activeTabNum + 1;
+    while (nextTabVisible === false && nextTabIndex < activeTabSet.tabs.getLength()) {
+      if (!activeTabSet.tabs[nextTabIndex].pane.hidden) {
+        nextTabVisible = true;
+      } else {
+        nextTabIndex++;
+      }
+    }
+
+    if (!nextTabVisible) {
       return false;
     }
 
-    activeTabSet.selectTab(activeTabNum + 1);
+    activeTabSet.selectTab(nextTabIndex);
 
     // after select the new tab, activeTab related variables are updated
     activeTab = activeTabSet.getSelectedTab();
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-grid.js	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-grid.js	Thu Jan 10 13:17:14 2013 +0100
@@ -119,7 +119,7 @@
     OB.TestRegistry.register('org.openbravo.client.application.process.pickandexecute.Grid', this);
 
     this.editFormProperties = {
-      view: this.view.parentWindow.activeView
+      view: this.view.buttonOwnerView
     };
 
     this.Super('initWidget', arguments);
@@ -290,7 +290,7 @@
   },
 
   getOrgParameter: function () {
-    var view = this.view.parentWindow.activeView,
+    var view = this.view.buttonOwnerView,
         context, i;
 
     context = view.getContextInfo(true, false);
@@ -316,7 +316,7 @@
 
   getFetchRequestParams: function (params) {
     var props = this.gridProperties || {},
-        view = this.view.parentWindow.activeView;
+        view = this.view.buttonOwnerView;
 
     params = params || {};
 
@@ -410,7 +410,7 @@
   },
 
   getContextInfo: function (rowNum) {
-    var contextInfo = isc.addProperties({}, this.view.parentWindow.activeView.getContextInfo(false, true, false, true)),
+    var contextInfo = isc.addProperties({}, this.view.buttonOwnerView.getContextInfo(false, true, false, true)),
         record = isc.addProperties({}, this.getRecord(rowNum), this.getEditValues(rowNum)),
         fields = this.view.viewProperties.fields,
         len = fields.length,
@@ -425,10 +425,10 @@
           if (type.createClassicString) {
             contextInfo[fld.inpColumnName] = type.createClassicString(value);
           } else {
-            contextInfo[fld.inpColumnName] = this.view.parentWindow.activeView.convertContextValue(value, fld.type);
+            contextInfo[fld.inpColumnName] = this.view.buttonOwnerView.convertContextValue(value, fld.type);
           }
         } else {
-          contextInfo[fld.inpColumnName] = this.view.parentWindow.activeView.convertContextValue(value, fld.type);
+          contextInfo[fld.inpColumnName] = this.view.buttonOwnerView.convertContextValue(value, fld.type);
         }
       }
     }
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-action-button.js	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-action-button.js	Thu Jan 10 13:17:14 2013 +0100
@@ -61,8 +61,8 @@
         standardWindow = this.view.standardWindow,
         autosaveButton = this.autosave,
         param, allProperties, sessionProperties, callbackFunction, popupParams;
-
-    if (rowNum && !theView.viewGrid.getSelectedRecord()) {
+    //Modified check from 'rowNum to 'rowNum ! = null' to handle case where rowNum is 0.
+    if (rowNum !== null && !theView.viewGrid.getSelectedRecord()) {
       // Current selection was lost, restore it
       theView.viewGrid.selectRecord(rowNum);
     }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities-style.js	Thu Jan 10 13:17:14 2013 +0100
@@ -0,0 +1,122 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2012 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+
+OB = window.OB || {};
+OB.Utilities = window.OB.Utilities || {};
+
+// = Openbravo Style Utilities =
+// Defines utility methods related to Styles.
+OB.Utilities.Style = {};
+
+
+// ** {{{ OB.Utilities.Style.getSheet }}} **
+//
+// Gets a CSS spreadsheet
+//
+// Parameters:
+// * {{{position}}}: {Integer} position
+// Return:
+// * The CSS spreadsheet
+OB.Utilities.Style.getSheet = function (position, type) {
+  var stylesheet, i;
+  if (position) {
+    stylesheet = document.styleSheets[position];
+  } else {
+    if (!type) {
+      for (i = 0; i < document.styleSheets.length; i++) {
+        if (document.styleSheets[i].href) {
+          stylesheet = document.styleSheets[i];
+        }
+      }
+    } else if (type) {
+      for (i = 0; i < document.styleSheets.length; i++) {
+        if (document.styleSheets[i].href && document.styleSheets[i].href.indexOf(type) === -1) {
+          stylesheet = document.styleSheets[i];
+        }
+      }
+    }
+  }
+  return stylesheet;
+};
+// ** {{{ OB.Utilities.Style.addRule }}} **
+//
+// Adds a style definition to the CSS in last position
+//
+// Parameters:
+// * {{{selector}}}: {String} the selector name to be added
+// * {{{declaration}}}: {String} the properties of this selector
+OB.Utilities.Style.addRule = function (selector, declaration) {
+  var stylesheet = OB.Utilities.Style.getSheet();
+  if (typeof stylesheet === 'object') {
+    if (navigator.userAgent.toUpperCase().indexOf('MSIE') !== -1) {
+      stylesheet.addRule(selector, declaration);
+    } else {
+      stylesheet.insertRule(selector + ' { ' + declaration + ' }', stylesheet.cssRules.length);
+    }
+  }
+};
+
+// ** {{{ OB.Utilities.Style.removeRule }}} **
+//
+// Removes a style definition at given position
+//
+// Parameters:
+// * {{{selectorIndex}}}: {Integer} the position of the selector to remove
+OB.Utilities.Style.removeRule = function (selectorIndex) {
+  var stylesheet = OB.Utilities.Style.getSheet();
+
+  if (typeof stylesheet === 'object') {
+    if (navigator.userAgent.toUpperCase().indexOf('MSIE') !== -1) {
+      stylesheet.removeRule(selectorIndex);
+    } else {
+      stylesheet.deleteRule(selectorIndex);
+    }
+  }
+};
+
+// ** {{{ OB.Utilities.Style.getRulePosition }}} **
+//
+// Removes a style definition at given position
+//
+// Parameters:
+// * {{{selector}}}: {String} the name of the selector to obtain position
+// Return:
+// * The selector position
+OB.Utilities.Style.getRulePosition = function (selector) {
+  var stylesheet = OB.Utilities.Style.getSheet(),
+      position = [],
+      i;
+
+  if (typeof stylesheet === 'object') {
+    if (navigator.userAgent.toUpperCase().indexOf('MSIE') !== -1) {
+      for (i = 0; i < stylesheet.rules.length; i++) {
+        if (stylesheet.rules[i].selectorText.toLowerCase() === selector.toLowerCase()) {
+          position.push(i);
+        }
+      }
+    } else {
+      for (i = 0; i < stylesheet.cssRules.length; i++) {
+        if (typeof stylesheet.cssRules[i].selectorText !== 'undefined' && stylesheet.cssRules[i].selectorText.toLowerCase() === selector.toLowerCase()) {
+          position.push(i);
+        }
+      }
+    }
+  }
+  return position;
+};
\ No newline at end of file
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities.js	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities.js	Thu Jan 10 13:17:14 2013 +0100
@@ -996,4 +996,121 @@
     return false;
   }
   return (/[A-Fa-f0-9]{32,32}/).test(object);
+};
+
+
+//** {{{ OB.Utilities.getRGBAStringFromOBColor }}} **
+//
+// Returns a string like "rgba(*RedValue*, *GreenValue*, *BlueValue*, *OpacityValue*)" from an OBColor value
+// Parameters:
+//  * {{{color}}} OBColor value
+OB.Utilities.getRGBAStringFromOBColor = function (color) {
+  var rgbaColor = 'rgba(',
+      colorArray, i;
+  if (!color) {
+    return;
+  }
+  colorArray = color.split('-');
+  for (i = 0; i < colorArray.length; i++) {
+    if (i < 3) {
+      rgbaColor += parseInt(colorArray[i], 10);
+      rgbaColor += ',';
+    } else {
+      rgbaColor += parseInt(colorArray[i], 10) / 100;
+    }
+  }
+  rgbaColor += ')';
+  return rgbaColor;
+};
+
+//** {{{ OB.Utilities.getBrightFromOBColor }}} **
+//
+// Returns the bright value (from 0 to 255) from an OBColor value
+// Parameters:
+//  * {{{color}}} OBColor value
+OB.Utilities.getBrightFromOBColor = function (color) {
+  var bright = 0,
+      colorArray;
+  if (!color) {
+    return;
+  }
+  colorArray = color.split('-');
+  bright = bright + parseInt(colorArray[0], 10) * 299;
+  bright = bright + parseInt(colorArray[1], 10) * 587;
+  bright = bright + parseInt(colorArray[2], 10) * 114;
+  bright = bright / 1000;
+  bright = parseInt(bright, 10);
+  return bright;
+};
+
+//** {{{ OB.Utilities.generateOBColor }}} **
+//
+// Returns a string with an OBColor
+// Parameters:
+//  * {{{r}}} Red component. From 0 to 255. If not set, a random one will be generated
+//  * {{{g}}} Green component. From 0 to 255. If not set, a random one will be generated
+//  * {{{b}}} Blue component. From 0 to 255. If not set, a random one will be generated
+//  * {{{a}}} Alpha channel (opacity) component. From 0 to 100. If not set, a random one will be generated
+//  * {{{seed}}} Optional seed for the random color generation
+OB.Utilities.generateOBColor = function (r, g, b, a, seed) {
+  var getRandomInt, randomInt, getChannel, obcolor = '';
+  getRandomInt = function (seed) {
+    if (seed === null || typeof seed === 'undefined') {
+      seed = (new Date()).getTime();
+    }
+    seed = seed.toString();
+    seed = seed.replace(/[&\/\\#,+()$~%.'":*?<>{}]/g, '0');
+    seed = seed.replace(/[a-j]/g, '1').replace(/[j-t]/g, '2').replace(/[u-z]/g, '3');
+    seed = seed.replace(/[A-J]/g, '4').replace(/[J-T]/g, '4').replace(/[U-Z]/g, '6');
+    seed = seed + seed.length.toString();
+    seed = parseInt(seed, 10);
+
+    return {
+      next: function (min, max) {
+        var randomNum;
+        seed *= 1234;
+        seed += 56;
+        seed *= 7890;
+        randomNum = seed % 10000000000000 / 100000;
+        randomNum = randomNum - Math.floor(randomNum);
+        randomNum = Math.floor(randomNum * (max - min + 1)) + min;
+        return randomNum;
+      }
+    };
+  };
+  randomInt = getRandomInt(seed);
+  getChannel = function (channel, min, max) {
+    var randomValueInt = randomInt.next(min, max);
+    if (channel) {
+      channel = parseInt(channel.toString(), 10);
+    } else {
+      channel = randomValueInt;
+    }
+    if (channel < min) {
+      channel = min;
+    }
+    if (channel > max) {
+      channel = max;
+    }
+    channel = channel.toString();
+    if (channel.length === 2) {
+      channel = '0' + channel;
+    } else if (channel.length === 1) {
+      channel = '00' + channel;
+    }
+    return channel;
+  };
+  r = getChannel(r, 0, 255);
+  obcolor += r;
+  obcolor += '-';
+  g = getChannel(g, 0, 255);
+  obcolor += g;
+  obcolor += '-';
+  b = getChannel(b, 0, 255);
+  obcolor += b;
+  obcolor += '-';
+  a = getChannel(a, 0, 100);
+  obcolor += a;
+
+  return obcolor;
 };
\ No newline at end of file
--- a/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/Default/org.openbravo.client.application/ob-form-styles.css	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/Default/org.openbravo.client.application/ob-form-styles.css	Thu Jan 10 13:17:14 2013 +0100
@@ -28,6 +28,7 @@
  * SectionItem Button
  * Dialog
  * Note section
+ * Calendar Item
 =======================================================================*/
 
 /*=======================================================================
@@ -48,14 +49,6 @@
  * Form Field Styles 
 =======================================================================*/
 
-.OBLabelCanvasItem,
-.OBLabelCanvasItemDisabled,
-.OBLabelCanvasItemFocused,
-.OBLabelCanvasItemError {
-  font-family: 'lucida sans', sans-serif;
-  padding: 0px 4px 0px 4px;
-}
-
 .OBFormField,
 .OBFormFieldDisabled,
 .OBFormFieldFocused,
@@ -887,4 +880,75 @@
 
 a.OBNoteListGridDelete:hover {
   text-decoration: underline;
-}
\ No newline at end of file
+}
+
+/*=======================================================================
+ * Calendar Item
+=======================================================================*/
+
+.OBEventWindowHeader {
+  font-family: Verdana,Bitstream Vera Sans,sans-serif;
+  font-weight: bold;
+  font-size: 9px;
+  background-color: #FFE1C0;
+}
+
+.OBEventWindowBody {
+  font-family: Verdana,Bitstream Vera Sans,sans-serif;
+  font-size: 9px;
+  background-color: #FFE1C0;
+}
+
+.OBCalendarLegendElementColor {
+  margin: 3px 0px 0px 0px;
+}
+.OBCalendarLegendElementTitle {
+  padding: 4px 0px 0px 5px;
+}
+
+.OBCalendarGridCell {
+  border: 1px solid #cdd7bb;
+  border-width: 0px 1px 1px 0px;
+  font-family: arial, sans-serif;
+  font-size: 11px;
+}
+
+.OBCalendarGridCellWorkday {
+  border: 1px solid #cdd7bb;
+  border-width: 0px 1px 1px 0px;
+  font-family: arial, sans-serif;
+  font-size: 11px;
+}
+.OBCalendarGridCellDark {
+  border: 1px solid #cdd7bb;
+  border-width: 0px 1px 1px 0px;
+  font-family: arial, sans-serif;
+  font-size: 11px;
+}
+.OBCalendarGridCellDisabled {
+  border: 1px solid #cdd7bb;
+  border-width: 0px 1px 1px 0px;
+  font-family: arial, sans-serif;
+  font-size: 11px;
+  background-color: #F5F5F5;
+}
+
+.OBCalendarGridHeaderCell {
+  font-size: 11px;
+  font-family: 'lucida sans', sans-serif;
+  font-weight: bold;
+  border: 1px solid #BBBFB6;
+  border-width: 0px 1px 0px 0px;
+  text-align: center;
+  background-image: url(./images/grid/gridHeader_bg.png);
+}
+
+.OBCalendarGridHeaderCellOver {
+  font-size: 11px;
+  font-family: 'lucida sans', sans-serif;
+  font-weight: bold;
+  border: 1px solid #BBBFB6;
+  border-width: 0px 1px 0px 0px;
+  text-align: center;
+  background-image: url(./images/grid/gridHeader_bg_Over.png);
+}
--- a/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/Default/org.openbravo.client.application/ob-form-styles.js	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/Default/org.openbravo.client.application/ob-form-styles.js	Thu Jan 10 13:17:14 2013 +0100
@@ -24,6 +24,7 @@
  * 3) SectionItem Button Styles
  * 3) Attachments Styles
  * 4) Image Popup Styles
+ * 5) Calendar Styles
  =======================================================================*/
 
 /* =====================================================================
@@ -284,10 +285,6 @@
 
 isc.OBDateTimeItem.addProperties(isc.addProperties({}, OB.Styles.OBFormField.DefaultDateInput));
 
-isc.OBTruncAddMinusDisplay.addProperties({
-  baseStyle: 'OBLabelCanvasItem'
-});
-
 isc.OBNumberItem.addProperties({
   cellStyle: 'OBFormField',
   titleStyle: 'OBFormFieldLabel',
@@ -421,7 +418,8 @@
   cellStyle: 'OBFormField',
   titleStyle: 'OBFormFieldLabel',
   textBoxStyle: 'OBFormFieldSelectInput',
-  controlStyle: 'OBFormFieldSelectControl'
+  controlStyle: 'OBFormFieldSelectControl',
+  width: 65
 });
 
 isc.RelativeDateItem.changeDefaults('valueFieldDefaults', {
@@ -443,7 +441,8 @@
 isc.RelativeDateItem.changeDefaults('calculatedDateFieldDefaults', {
   canFocus: false,
   disabled: true,
-  showDisabled: false
+  showDisabled: false,
+  width: 85
 });
 
 /* =====================================================================
@@ -562,4 +561,78 @@
   height: 50,
   width: 450,
   align: 'center'
-});
\ No newline at end of file
+});
+
+/* =====================================================================
+  * Calendar Styles
+  =======================================================================*/
+
+isc.OBCalendarTabSet.addProperties({
+  tabBarProperties: {
+    simpleTabBaseStyle: 'OBTabBarButtonMain',
+    paneContainerClassName: 'OBTabSetMainContainer',
+    buttonConstructor: isc.OBTabBarButton,
+
+    buttonProperties: {
+      // prevent the orange hats
+      customState: 'Inactive',
+
+      src: '',
+      capSize: 14,
+      titleStyle: 'OBTabBarButtonMainTitle'
+    }
+  },
+  tabBarPosition: 'top',
+  tabBarAlign: 'left',
+  width: '100%',
+  height: '100%',
+  overflow: 'hidden',
+
+  showTabPicker: false,
+
+  // get rid of the margin around the content of a pane
+  paneMargin: 0,
+  paneContainerMargin: 0,
+  paneContainerPadding: 0,
+  showPaneContainerEdges: false,
+
+  useSimpleTabs: true,
+  tabBarThickness: 30,
+  styleName: 'OBTabSetMain',
+  simpleTabBaseStyle: 'OBTabBarButtonMain',
+  paneContainerClassName: 'OBTabSetMainContainer',
+
+  scrollerSrc: OB.Styles.skinsPath + 'Default/org.openbravo.client.application/images/tab/tabBarButtonMain_OverflowIcon.png',
+  pickerButtonSrc: OB.Styles.skinsPath + 'Default/org.openbravo.client.application/images/tab/tabBarButtonMain_OverflowIconPicker.png'
+});
+
+OB.Styles.OBCalendar = {
+  controlsTopMarging: 6,
+  eventWindowStyle: 'OBEventWindow',
+  datePickerButton: {
+    src: OB.Styles.skinsPath + 'Default/org.openbravo.client.application/images/form/date_control.png',
+    width: 21,
+    height: 21
+  },
+  addEventButton: {
+    src: OB.Styles.skinsPath + 'Default/org.openbravo.client.application/images/form/add_icon.png',
+    // It doesn't exist yet
+    width: 21,
+    height: 21
+  },
+  previousButton: {
+    src: OB.Styles.skinsPath + 'Default/org.openbravo.client.application/images/statusbar/iconButton-previous.png',
+    width: 20,
+    height: 20
+  },
+  nextButton: {
+    src: OB.Styles.skinsPath + 'Default/org.openbravo.client.application/images/statusbar/iconButton-next.png',
+    width: 20,
+    height: 20
+  },
+  dayView_baseStyle: 'OBCalendarGridCell',
+  weekView_baseStyle: 'OBCalendarGridCell',
+  weekView_headerBaseStyle: 'OBCalendarGridHeaderCell',
+  monthView_baseStyle: 'OBCalendarGridCell',
+  monthView_headerBaseStyle: 'OBCalendarGridHeaderCell'
+};
\ No newline at end of file
--- a/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/Default/org.openbravo.client.application/ob-grid-styles.css	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/Default/org.openbravo.client.application/ob-grid-styles.css	Thu Jan 10 13:17:14 2013 +0100
@@ -437,10 +437,13 @@
 
 /******************************/
 
-.OBGridFormLabel {
-  padding: 0px 4px 0px 4px;
+.OBGridFormLabel,
+.OBGridFormLabelDisabled,
+.OBGridFormLabelFocused,
+.OBGridFormLabelError {
   font-family: arial, sans-serif;
   font-size: 12px;
+  padding: 0px 4px 0px 4px;
 }
 
 .OBGridFormButton,
--- a/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/Default/org.openbravo.client.application/ob-grid-styles.js	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.userinterface.smartclient/openbravo/skins/Default/org.openbravo.client.application/ob-grid-styles.js	Thu Jan 10 13:17:14 2013 +0100
@@ -235,4 +235,8 @@
   width: 1,
   height: 21,
   overflow: 'visible'
+});
+
+isc.OBGridFormLabel.addProperties({
+  baseStyle: 'OBGridFormLabel'
 });
\ No newline at end of file
--- a/modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -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.19003]]></VERSION>
+<!--D393BE6F22BB44B7B728259B34FC795A-->  <VERSION><![CDATA[1.0.19180]]></VERSION>
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <DESCRIPTION><![CDATA[Provides the HTML Widget superclass that allows to create widget classes that embed the html code.]]></DESCRIPTION>
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <HELP><![CDATA[With this module you can define your own widget classes just setting up your own html code or the html code provided by third parties.]]></HELP>
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <URL><![CDATA[http://forge.openbravo.com/projects/htmlwidget]]></URL>
--- a/modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -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.19003]]></STARTVERSION>
+<!--DCE798FBC5B648F7A3C81A6941720A57-->  <STARTVERSION><![CDATA[2.1.19180]]></STARTVERSION>
 <!--DCE798FBC5B648F7A3C81A6941720A57-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--DCE798FBC5B648F7A3C81A6941720A57-->  <DEPENDANT_MODULE_NAME><![CDATA[My Openbravo Tab]]></DEPENDANT_MODULE_NAME>
 <!--DCE798FBC5B648F7A3C81A6941720A57-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -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.19003]]></VERSION>
+<!--4B828F4D03264080AA1D2057B13F613C-->  <VERSION><![CDATA[2.1.19180]]></VERSION>
 <!--4B828F4D03264080AA1D2057B13F613C-->  <DESCRIPTION><![CDATA[Provides framework functionality for the Openbravo User Interface]]></DESCRIPTION>
 <!--4B828F4D03264080AA1D2057B13F613C-->  <HELP><![CDATA[The user interface client kernel is a generation framework for generating client (browser) components used in Openbravo. Its components are mainly used by other modules to provide customizable and extendable user interfaces.]]></HELP>
 <!--4B828F4D03264080AA1D2057B13F613C-->  <URL><![CDATA[http://forge.openbravo.com/projects/openbravoclientkernel]]></URL>
--- a/modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -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.19003]]></STARTVERSION>
+<!--26B041893E844A53AFA58BC326C4F0D7-->  <STARTVERSION><![CDATA[3.0.19180]]></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.19003]]></STARTVERSION>
+<!--3AB045DA35ED4CA58EF7EB5BF04CDE3F-->  <STARTVERSION><![CDATA[1.1.19180]]></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.19003]]></STARTVERSION>
+<!--D7BA4BB0844942C58DC46B9E23CF8E67-->  <STARTVERSION><![CDATA[2.0.19180]]></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/org/openbravo/client/kernel/RequestContext.java	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/RequestContext.java	Thu Jan 10 13:17:14 2013 +0100
@@ -91,6 +91,7 @@
     instance.remove();
   }
 
+  private VariablesSecureApp variablesSecureApp;
   private HttpServletRequest request;
   private String requestContent = null;
   private HttpServletResponse response;
@@ -166,10 +167,22 @@
   }
 
   public VariablesSecureApp getVariablesSecureApp() {
-    return new VariablesSecureApp(getRequest());
+    if (variablesSecureApp != null) {
+      return variablesSecureApp;
+    }
+    if (request == null) {
+      throw new OBException("No request object set");
+    }
+    variablesSecureApp = new VariablesSecureApp(getRequest());
+    return variablesSecureApp;
+  }
+
+  public void setVariableSecureApp(VariablesSecureApp variablesSecureApp) {
+    this.variablesSecureApp = variablesSecureApp;
   }
 
   public void setRequest(HttpServletRequest request) {
+    variablesSecureApp = null;
     this.request = request;
   }
 
--- a/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_COLUMN.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_COLUMN.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -2880,7 +2880,7 @@
 <!--927DA01A83573AFAE040A8C0CF072B85-->  <FIELDLENGTH><![CDATA[4000]]></FIELDLENGTH>
 <!--927DA01A83573AFAE040A8C0CF072B85-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--927DA01A83573AFAE040A8C0CF072B85-->  <ISPARENT><![CDATA[N]]></ISPARENT>
-<!--927DA01A83573AFAE040A8C0CF072B85-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--927DA01A83573AFAE040A8C0CF072B85-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
 <!--927DA01A83573AFAE040A8C0CF072B85-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
 <!--927DA01A83573AFAE040A8C0CF072B85-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
 <!--927DA01A83573AFAE040A8C0CF072B85-->  <SEQNO><![CDATA[100]]></SEQNO>
--- a/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -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.19003]]></VERSION>
+<!--2758CD25B2704AF6BBAD10365FC82C06-->  <VERSION><![CDATA[2.1.19180]]></VERSION>
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <DESCRIPTION><![CDATA[Workspace & Widgets]]></DESCRIPTION>
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <HELP><![CDATA[Provides the infrastructure of workspace tab (formerly My Openbravo)]]></HELP>
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <URL><![CDATA[http://forge.openbravo.com/projects/myopenbravo]]></URL>
--- a/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -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.19003]]></STARTVERSION>
+<!--15F51F03882F444CAB6593B4566DC929-->  <STARTVERSION><![CDATA[2.1.19180]]></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.19003]]></STARTVERSION>
+<!--E71B28FC949D481D9F59C17D01E46EF9-->  <STARTVERSION><![CDATA[3.0.19180]]></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_REFERENCE.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_REFERENCE.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -49,6 +49,18 @@
 <!--B0BA46A241B543CF80B4046F080FA9DE-->  <ISVALUEDISPLAYED><![CDATA[N]]></ISVALUEDISPLAYED>
 <!--B0BA46A241B543CF80B4046F080FA9DE--></AD_REFERENCE>
 
+<!--CB6C648A6CAB4F749CB25EB1EBC4BAB5--><AD_REFERENCE>
+<!--CB6C648A6CAB4F749CB25EB1EBC4BAB5-->  <AD_REFERENCE_ID><![CDATA[CB6C648A6CAB4F749CB25EB1EBC4BAB5]]></AD_REFERENCE_ID>
+<!--CB6C648A6CAB4F749CB25EB1EBC4BAB5-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--CB6C648A6CAB4F749CB25EB1EBC4BAB5-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--CB6C648A6CAB4F749CB25EB1EBC4BAB5-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--CB6C648A6CAB4F749CB25EB1EBC4BAB5-->  <NAME><![CDATA[List Widget Type]]></NAME>
+<!--CB6C648A6CAB4F749CB25EB1EBC4BAB5-->  <AD_MODULE_ID><![CDATA[2758CD25B2704AF6BBAD10365FC82C06]]></AD_MODULE_ID>
+<!--CB6C648A6CAB4F749CB25EB1EBC4BAB5-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--CB6C648A6CAB4F749CB25EB1EBC4BAB5-->  <PARENTREFERENCE_ID><![CDATA[17]]></PARENTREFERENCE_ID>
+<!--CB6C648A6CAB4F749CB25EB1EBC4BAB5-->  <ISVALUEDISPLAYED><![CDATA[N]]></ISVALUEDISPLAYED>
+<!--CB6C648A6CAB4F749CB25EB1EBC4BAB5--></AD_REFERENCE>
+
 <!--FF8080813123BF670131241C2BB30012--><AD_REFERENCE>
 <!--FF8080813123BF670131241C2BB30012-->  <AD_REFERENCE_ID><![CDATA[FF8080813123BF670131241C2BB30012]]></AD_REFERENCE_ID>
 <!--FF8080813123BF670131241C2BB30012-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_REF_LIST.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -0,0 +1,25 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<data>
+<!--8D27EB2B300D4E8987190E1ECCF84742--><AD_REF_LIST>
+<!--8D27EB2B300D4E8987190E1ECCF84742-->  <AD_REF_LIST_ID><![CDATA[8D27EB2B300D4E8987190E1ECCF84742]]></AD_REF_LIST_ID>
+<!--8D27EB2B300D4E8987190E1ECCF84742-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--8D27EB2B300D4E8987190E1ECCF84742-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--8D27EB2B300D4E8987190E1ECCF84742-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--8D27EB2B300D4E8987190E1ECCF84742-->  <VALUE><![CDATA[DS]]></VALUE>
+<!--8D27EB2B300D4E8987190E1ECCF84742-->  <NAME><![CDATA[Datasource]]></NAME>
+<!--8D27EB2B300D4E8987190E1ECCF84742-->  <AD_REFERENCE_ID><![CDATA[CB6C648A6CAB4F749CB25EB1EBC4BAB5]]></AD_REFERENCE_ID>
+<!--8D27EB2B300D4E8987190E1ECCF84742-->  <AD_MODULE_ID><![CDATA[2758CD25B2704AF6BBAD10365FC82C06]]></AD_MODULE_ID>
+<!--8D27EB2B300D4E8987190E1ECCF84742--></AD_REF_LIST>
+
+<!--AFC52045618140D49359B58E638F3552--><AD_REF_LIST>
+<!--AFC52045618140D49359B58E638F3552-->  <AD_REF_LIST_ID><![CDATA[AFC52045618140D49359B58E638F3552]]></AD_REF_LIST_ID>
+<!--AFC52045618140D49359B58E638F3552-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--AFC52045618140D49359B58E638F3552-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--AFC52045618140D49359B58E638F3552-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--AFC52045618140D49359B58E638F3552-->  <VALUE><![CDATA[HQL]]></VALUE>
+<!--AFC52045618140D49359B58E638F3552-->  <NAME><![CDATA[HQL]]></NAME>
+<!--AFC52045618140D49359B58E638F3552-->  <AD_REFERENCE_ID><![CDATA[CB6C648A6CAB4F749CB25EB1EBC4BAB5]]></AD_REFERENCE_ID>
+<!--AFC52045618140D49359B58E638F3552-->  <AD_MODULE_ID><![CDATA[2758CD25B2704AF6BBAD10365FC82C06]]></AD_MODULE_ID>
+<!--AFC52045618140D49359B58E638F3552--></AD_REF_LIST>
+
+</data>
--- a/modules/org.openbravo.client.querylist/src-db/database/model/tables/OBCQL_WIDGET_QUERY.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.querylist/src-db/database/model/tables/OBCQL_WIDGET_QUERY.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -37,7 +37,15 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <column name="HQL" primaryKey="false" required="true" type="VARCHAR" size="4000" autoIncrement="false">
+      <column name="HQL" primaryKey="false" required="false" type="VARCHAR" size="4000" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="TYPE" primaryKey="false" required="true" type="VARCHAR" size="60" autoIncrement="false">
+        <default><![CDATA[HQL]]></default>
+        <onCreateDefault><![CDATA['HQL']]></onCreateDefault>
+      </column>
+      <column name="OBSERDS_DATASOURCE_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
         <default/>
         <onCreateDefault/>
       </column>
@@ -47,9 +55,15 @@
       <foreign-key foreignTable="AD_CLIENT" name="OBCQL_WIDGET_QUERY_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="OBSERDS_DATASOURCE" name="OBCQL_WIDGET_QUERY_DS">
+        <reference local="OBSERDS_DATASOURCE_ID" foreign="OBSERDS_DATASOURCE_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="AD_ORG" name="OBCQL_WIDGET_QUERY_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
+      <index name="FKI_OBCQL_WIDGET_QUERY_DS" unique="false">
+        <index-column name="OBSERDS_DATASOURCE_ID"/>
+      </index>
       <check name="OBCQL_WIDGET_QUERY_ACTIVECHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_COLUMN.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_COLUMN.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -1,5 +1,42 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <data>
+<!--81001DA1F1D44C10979E937B1754307F--><AD_COLUMN>
+<!--81001DA1F1D44C10979E937B1754307F-->  <AD_COLUMN_ID><![CDATA[81001DA1F1D44C10979E937B1754307F]]></AD_COLUMN_ID>
+<!--81001DA1F1D44C10979E937B1754307F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--81001DA1F1D44C10979E937B1754307F-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--81001DA1F1D44C10979E937B1754307F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--81001DA1F1D44C10979E937B1754307F-->  <NAME><![CDATA[Type]]></NAME>
+<!--81001DA1F1D44C10979E937B1754307F-->  <DESCRIPTION><![CDATA[A distinct item characteristic used for processes and sometimes grouped within a category.]]></DESCRIPTION>
+<!--81001DA1F1D44C10979E937B1754307F-->  <HELP><![CDATA[The Type indicates the type of validation that will occur.  This can be SQL, Java Script or Java Language.]]></HELP>
+<!--81001DA1F1D44C10979E937B1754307F-->  <COLUMNNAME><![CDATA[Type]]></COLUMNNAME>
+<!--81001DA1F1D44C10979E937B1754307F-->  <AD_TABLE_ID><![CDATA[87AB97C7EED3429BBEFE9EF28EFACC08]]></AD_TABLE_ID>
+<!--81001DA1F1D44C10979E937B1754307F-->  <AD_REFERENCE_ID><![CDATA[17]]></AD_REFERENCE_ID>
+<!--81001DA1F1D44C10979E937B1754307F-->  <AD_REFERENCE_VALUE_ID><![CDATA[CB6C648A6CAB4F749CB25EB1EBC4BAB5]]></AD_REFERENCE_VALUE_ID>
+<!--81001DA1F1D44C10979E937B1754307F-->  <FIELDLENGTH><![CDATA[60]]></FIELDLENGTH>
+<!--81001DA1F1D44C10979E937B1754307F-->  <DEFAULTVALUE><![CDATA[HQL]]></DEFAULTVALUE>
+<!--81001DA1F1D44C10979E937B1754307F-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--81001DA1F1D44C10979E937B1754307F-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--81001DA1F1D44C10979E937B1754307F-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--81001DA1F1D44C10979E937B1754307F-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--81001DA1F1D44C10979E937B1754307F-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--81001DA1F1D44C10979E937B1754307F-->  <SEQNO><![CDATA[110]]></SEQNO>
+<!--81001DA1F1D44C10979E937B1754307F-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--81001DA1F1D44C10979E937B1754307F-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--81001DA1F1D44C10979E937B1754307F-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--81001DA1F1D44C10979E937B1754307F-->  <AD_ELEMENT_ID><![CDATA[600]]></AD_ELEMENT_ID>
+<!--81001DA1F1D44C10979E937B1754307F-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--81001DA1F1D44C10979E937B1754307F-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--81001DA1F1D44C10979E937B1754307F-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--81001DA1F1D44C10979E937B1754307F-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--81001DA1F1D44C10979E937B1754307F-->  <AD_MODULE_ID><![CDATA[0A060B2AF1974E8EAA8DB61388E9AECC]]></AD_MODULE_ID>
+<!--81001DA1F1D44C10979E937B1754307F-->  <POSITION><![CDATA[11]]></POSITION>
+<!--81001DA1F1D44C10979E937B1754307F-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--81001DA1F1D44C10979E937B1754307F-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--81001DA1F1D44C10979E937B1754307F-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--81001DA1F1D44C10979E937B1754307F-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--81001DA1F1D44C10979E937B1754307F-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--81001DA1F1D44C10979E937B1754307F--></AD_COLUMN>
+
 <!--95CC5757ECB2E5B8E040007F010076A5--><AD_COLUMN>
 <!--95CC5757ECB2E5B8E040007F010076A5-->  <AD_COLUMN_ID><![CDATA[95CC5757ECB2E5B8E040007F010076A5]]></AD_COLUMN_ID>
 <!--95CC5757ECB2E5B8E040007F010076A5-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -335,7 +372,7 @@
 <!--95CC5757ECBBE5B8E040007F010076A5-->  <FIELDLENGTH><![CDATA[4000]]></FIELDLENGTH>
 <!--95CC5757ECBBE5B8E040007F010076A5-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--95CC5757ECBBE5B8E040007F010076A5-->  <ISPARENT><![CDATA[N]]></ISPARENT>
-<!--95CC5757ECBBE5B8E040007F010076A5-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--95CC5757ECBBE5B8E040007F010076A5-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
 <!--95CC5757ECBBE5B8E040007F010076A5-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
 <!--95CC5757ECBBE5B8E040007F010076A5-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
 <!--95CC5757ECBBE5B8E040007F010076A5-->  <SEQNO><![CDATA[100]]></SEQNO>
@@ -1567,4 +1604,39 @@
 <!--998FF6ADFBCC705DE040007F01006349-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--998FF6ADFBCC705DE040007F01006349--></AD_COLUMN>
 
+<!--A679FE2F67C0486CBFB774E72A76618B--><AD_COLUMN>
+<!--A679FE2F67C0486CBFB774E72A76618B-->  <AD_COLUMN_ID><![CDATA[A679FE2F67C0486CBFB774E72A76618B]]></AD_COLUMN_ID>
+<!--A679FE2F67C0486CBFB774E72A76618B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--A679FE2F67C0486CBFB774E72A76618B-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--A679FE2F67C0486CBFB774E72A76618B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--A679FE2F67C0486CBFB774E72A76618B-->  <NAME><![CDATA[Datasource]]></NAME>
+<!--A679FE2F67C0486CBFB774E72A76618B-->  <DESCRIPTION><![CDATA[The datasource ]]></DESCRIPTION>
+<!--A679FE2F67C0486CBFB774E72A76618B-->  <HELP><![CDATA[The datasource provides data from the database or from in-memory data.]]></HELP>
+<!--A679FE2F67C0486CBFB774E72A76618B-->  <COLUMNNAME><![CDATA[Obserds_Datasource_ID]]></COLUMNNAME>
+<!--A679FE2F67C0486CBFB774E72A76618B-->  <AD_TABLE_ID><![CDATA[87AB97C7EED3429BBEFE9EF28EFACC08]]></AD_TABLE_ID>
+<!--A679FE2F67C0486CBFB774E72A76618B-->  <AD_REFERENCE_ID><![CDATA[19]]></AD_REFERENCE_ID>
+<!--A679FE2F67C0486CBFB774E72A76618B-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
+<!--A679FE2F67C0486CBFB774E72A76618B-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--A679FE2F67C0486CBFB774E72A76618B-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--A679FE2F67C0486CBFB774E72A76618B-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--A679FE2F67C0486CBFB774E72A76618B-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--A679FE2F67C0486CBFB774E72A76618B-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--A679FE2F67C0486CBFB774E72A76618B-->  <SEQNO><![CDATA[120]]></SEQNO>
+<!--A679FE2F67C0486CBFB774E72A76618B-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--A679FE2F67C0486CBFB774E72A76618B-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--A679FE2F67C0486CBFB774E72A76618B-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--A679FE2F67C0486CBFB774E72A76618B-->  <AD_ELEMENT_ID><![CDATA[73C534367AFA4C28A9F8767D59AAE37E]]></AD_ELEMENT_ID>
+<!--A679FE2F67C0486CBFB774E72A76618B-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--A679FE2F67C0486CBFB774E72A76618B-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--A679FE2F67C0486CBFB774E72A76618B-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--A679FE2F67C0486CBFB774E72A76618B-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--A679FE2F67C0486CBFB774E72A76618B-->  <AD_MODULE_ID><![CDATA[0A060B2AF1974E8EAA8DB61388E9AECC]]></AD_MODULE_ID>
+<!--A679FE2F67C0486CBFB774E72A76618B-->  <POSITION><![CDATA[12]]></POSITION>
+<!--A679FE2F67C0486CBFB774E72A76618B-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--A679FE2F67C0486CBFB774E72A76618B-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--A679FE2F67C0486CBFB774E72A76618B-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--A679FE2F67C0486CBFB774E72A76618B-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--A679FE2F67C0486CBFB774E72A76618B-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--A679FE2F67C0486CBFB774E72A76618B--></AD_COLUMN>
+
 </data>
--- a/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_FIELD.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_FIELD.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -1,5 +1,64 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <data>
+<!--82D5C58E310948088A4FE87611B1D84A--><AD_FIELD>
+<!--82D5C58E310948088A4FE87611B1D84A-->  <AD_FIELD_ID><![CDATA[82D5C58E310948088A4FE87611B1D84A]]></AD_FIELD_ID>
+<!--82D5C58E310948088A4FE87611B1D84A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--82D5C58E310948088A4FE87611B1D84A-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--82D5C58E310948088A4FE87611B1D84A-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--82D5C58E310948088A4FE87611B1D84A-->  <NAME><![CDATA[Type]]></NAME>
+<!--82D5C58E310948088A4FE87611B1D84A-->  <DESCRIPTION><![CDATA[A distinct item characteristic used for processes and sometimes grouped within a category.]]></DESCRIPTION>
+<!--82D5C58E310948088A4FE87611B1D84A-->  <HELP><![CDATA[The Type indicates the type of validation that will occur.  This can be SQL, Java Script or Java Language.]]></HELP>
+<!--82D5C58E310948088A4FE87611B1D84A-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--82D5C58E310948088A4FE87611B1D84A-->  <AD_TAB_ID><![CDATA[8BA14DE095DE496A82A84FE53F0B9821]]></AD_TAB_ID>
+<!--82D5C58E310948088A4FE87611B1D84A-->  <AD_COLUMN_ID><![CDATA[81001DA1F1D44C10979E937B1754307F]]></AD_COLUMN_ID>
+<!--82D5C58E310948088A4FE87611B1D84A-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--82D5C58E310948088A4FE87611B1D84A-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--82D5C58E310948088A4FE87611B1D84A-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
+<!--82D5C58E310948088A4FE87611B1D84A-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--82D5C58E310948088A4FE87611B1D84A-->  <SEQNO><![CDATA[10]]></SEQNO>
+<!--82D5C58E310948088A4FE87611B1D84A-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--82D5C58E310948088A4FE87611B1D84A-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--82D5C58E310948088A4FE87611B1D84A-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--82D5C58E310948088A4FE87611B1D84A-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--82D5C58E310948088A4FE87611B1D84A-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--82D5C58E310948088A4FE87611B1D84A-->  <AD_MODULE_ID><![CDATA[0A060B2AF1974E8EAA8DB61388E9AECC]]></AD_MODULE_ID>
+<!--82D5C58E310948088A4FE87611B1D84A-->  <GRID_SEQNO><![CDATA[0]]></GRID_SEQNO>
+<!--82D5C58E310948088A4FE87611B1D84A-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--82D5C58E310948088A4FE87611B1D84A-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--82D5C58E310948088A4FE87611B1D84A-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--82D5C58E310948088A4FE87611B1D84A-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--82D5C58E310948088A4FE87611B1D84A--></AD_FIELD>
+
+<!--90A30A5448AB4813BECCD8804DFF8592--><AD_FIELD>
+<!--90A30A5448AB4813BECCD8804DFF8592-->  <AD_FIELD_ID><![CDATA[90A30A5448AB4813BECCD8804DFF8592]]></AD_FIELD_ID>
+<!--90A30A5448AB4813BECCD8804DFF8592-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--90A30A5448AB4813BECCD8804DFF8592-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--90A30A5448AB4813BECCD8804DFF8592-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--90A30A5448AB4813BECCD8804DFF8592-->  <NAME><![CDATA[Datasource]]></NAME>
+<!--90A30A5448AB4813BECCD8804DFF8592-->  <DESCRIPTION><![CDATA[The datasource ]]></DESCRIPTION>
+<!--90A30A5448AB4813BECCD8804DFF8592-->  <HELP><![CDATA[The datasource provides data from the database or from in-memory data.]]></HELP>
+<!--90A30A5448AB4813BECCD8804DFF8592-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--90A30A5448AB4813BECCD8804DFF8592-->  <AD_TAB_ID><![CDATA[8BA14DE095DE496A82A84FE53F0B9821]]></AD_TAB_ID>
+<!--90A30A5448AB4813BECCD8804DFF8592-->  <AD_COLUMN_ID><![CDATA[A679FE2F67C0486CBFB774E72A76618B]]></AD_COLUMN_ID>
+<!--90A30A5448AB4813BECCD8804DFF8592-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--90A30A5448AB4813BECCD8804DFF8592-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--90A30A5448AB4813BECCD8804DFF8592-->  <DISPLAYLOGIC><![CDATA[@Type@='DS']]></DISPLAYLOGIC>
+<!--90A30A5448AB4813BECCD8804DFF8592-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
+<!--90A30A5448AB4813BECCD8804DFF8592-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--90A30A5448AB4813BECCD8804DFF8592-->  <SEQNO><![CDATA[30]]></SEQNO>
+<!--90A30A5448AB4813BECCD8804DFF8592-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--90A30A5448AB4813BECCD8804DFF8592-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--90A30A5448AB4813BECCD8804DFF8592-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--90A30A5448AB4813BECCD8804DFF8592-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--90A30A5448AB4813BECCD8804DFF8592-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--90A30A5448AB4813BECCD8804DFF8592-->  <AD_MODULE_ID><![CDATA[0A060B2AF1974E8EAA8DB61388E9AECC]]></AD_MODULE_ID>
+<!--90A30A5448AB4813BECCD8804DFF8592-->  <GRID_SEQNO><![CDATA[0]]></GRID_SEQNO>
+<!--90A30A5448AB4813BECCD8804DFF8592-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--90A30A5448AB4813BECCD8804DFF8592-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--90A30A5448AB4813BECCD8804DFF8592-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--90A30A5448AB4813BECCD8804DFF8592-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--90A30A5448AB4813BECCD8804DFF8592--></AD_FIELD>
+
 <!--95CC803CC7499A85E040007F010076A9--><AD_FIELD>
 <!--95CC803CC7499A85E040007F010076A9-->  <AD_FIELD_ID><![CDATA[95CC803CC7499A85E040007F010076A9]]></AD_FIELD_ID>
 <!--95CC803CC7499A85E040007F010076A9-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -66,6 +125,7 @@
 <!--95CC803CC74D9A85E040007F010076A9-->  <AD_COLUMN_ID><![CDATA[95CC5757ECBBE5B8E040007F010076A5]]></AD_COLUMN_ID>
 <!--95CC803CC74D9A85E040007F010076A9-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
 <!--95CC803CC74D9A85E040007F010076A9-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--95CC803CC74D9A85E040007F010076A9-->  <DISPLAYLOGIC><![CDATA[@Type@='HQL']]></DISPLAYLOGIC>
 <!--95CC803CC74D9A85E040007F010076A9-->  <DISPLAYLENGTH><![CDATA[4000]]></DISPLAYLENGTH>
 <!--95CC803CC74D9A85E040007F010076A9-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--95CC803CC74D9A85E040007F010076A9-->  <SEQNO><![CDATA[20]]></SEQNO>
@@ -99,7 +159,7 @@
 <!--95CC803CC74F9A85E040007F010076A9-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--95CC803CC74F9A85E040007F010076A9-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
 <!--95CC803CC74F9A85E040007F010076A9-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--95CC803CC74F9A85E040007F010076A9-->  <SEQNO><![CDATA[10]]></SEQNO>
+<!--95CC803CC74F9A85E040007F010076A9-->  <SEQNO><![CDATA[40]]></SEQNO>
 <!--95CC803CC74F9A85E040007F010076A9-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--95CC803CC74F9A85E040007F010076A9-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--95CC803CC74F9A85E040007F010076A9-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
--- a/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -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.19003]]></VERSION>
+<!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <VERSION><![CDATA[1.0.19180]]></VERSION>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <DESCRIPTION><![CDATA[Provides the Query/List superclass widget that allows to create widget classes that prints a grid of data based on a query.]]></DESCRIPTION>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <HELP><![CDATA[With this module you can define your own widget classes that just with simple Application Dictionary shows a grid of data based on a HQL Query.]]></HELP>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <URL><![CDATA[http://forge.openbravo.com/projects/querylistwidget]]></URL>
--- a/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -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.19003]]></STARTVERSION>
+<!--26558497C31140BFAB067BA4BC47D799-->  <STARTVERSION><![CDATA[2.1.19180]]></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/OBCQL_WIDGET_QUERY.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.querylist/src-db/database/sourcedata/OBCQL_WIDGET_QUERY.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -7,6 +7,7 @@
 <!--1EF87E8E961A4E5BA3B41E1AB772B47C-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--1EF87E8E961A4E5BA3B41E1AB772B47C-->  <OBKMO_WIDGET_CLASS_ID><![CDATA[147D825456D54D0486C3D7072531C5C9]]></OBKMO_WIDGET_CLASS_ID>
 <!--1EF87E8E961A4E5BA3B41E1AB772B47C-->  <HQL><![CDATA[select inv.id as invoiceId, inv.documentNo as documentNo,        inv.businessPartner.id as businessPartnerId, inv.businessPartner.name as businessPartnerName,        inv.invoiceDate as invoiceDate, inv.grandTotalAmount as grandTotalAmount,        inv.currency.iSOCode as currency, inv.paymentTerms.name as paymentTerms,        inv.outstandingAmount as outstandingAmount, inv.daysTillDue as daysTillDue,        inv.dueAmount as dueAmount, inv.organization.name as organizationName from Invoice as inv where inv.businessPartner.name like :businessPartnerName       and inv.documentNo like :documentNo       and inv.processed = true       and inv.paymentComplete = false       and inv.salesTransaction = true       and inv.client.id = :client       and inv.organization.id in (:organizationList)       and inv.organization.name like :organizationName       and @optional_filters@ order by inv.invoiceDate]]></HQL>
+<!--1EF87E8E961A4E5BA3B41E1AB772B47C-->  <TYPE><![CDATA[HQL]]></TYPE>
 <!--1EF87E8E961A4E5BA3B41E1AB772B47C--></OBCQL_WIDGET_QUERY>
 
 <!--58BCB96595FA45678CC1423402238309--><OBCQL_WIDGET_QUERY>
@@ -32,6 +33,7 @@
       and inv.organization.name like :organizationName
       and @optional_filters@
 order by inv.invoiceDate]]></HQL>
+<!--58BCB96595FA45678CC1423402238309-->  <TYPE><![CDATA[HQL]]></TYPE>
 <!--58BCB96595FA45678CC1423402238309--></OBCQL_WIDGET_QUERY>
 
 <!--E5A0DC8536134185AC8B1897F15DB816--><OBCQL_WIDGET_QUERY>
@@ -55,6 +57,7 @@
       and p.organization.name like :organizationName
       and @optional_filters@
 order by p.paymentDate]]></HQL>
+<!--E5A0DC8536134185AC8B1897F15DB816-->  <TYPE><![CDATA[HQL]]></TYPE>
 <!--E5A0DC8536134185AC8B1897F15DB816--></OBCQL_WIDGET_QUERY>
 
 <!--F5DEE669DD8047FB831A12064BB277BE--><OBCQL_WIDGET_QUERY>
@@ -97,6 +100,7 @@
     and ol.salesOrder.organization.name like :organizationName 
     and @optional_filters@ 
   order by ol.salesOrder.scheduledDeliveryDate, ol.salesOrder.documentNo]]></HQL>
+<!--F5DEE669DD8047FB831A12064BB277BE-->  <TYPE><![CDATA[HQL]]></TYPE>
 <!--F5DEE669DD8047FB831A12064BB277BE--></OBCQL_WIDGET_QUERY>
 
 <!--F94AEB4680AD4AD48255071903000A43--><OBCQL_WIDGET_QUERY>
@@ -120,6 +124,7 @@
       and p.organization.name like :organizationName
       and @optional_filters@
 order by p.paymentDate]]></HQL>
+<!--F94AEB4680AD4AD48255071903000A43-->  <TYPE><![CDATA[HQL]]></TYPE>
 <!--F94AEB4680AD4AD48255071903000A43--></OBCQL_WIDGET_QUERY>
 
 </data>
--- a/modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListWidgetProvider.java	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListWidgetProvider.java	Thu Jan 10 13:17:14 2013 +0100
@@ -30,6 +30,7 @@
 import org.openbravo.client.kernel.Component;
 import org.openbravo.client.kernel.ComponentProvider;
 import org.openbravo.client.kernel.KernelConstants;
+import org.openbravo.client.myob.WidgetClass;
 import org.openbravo.client.myob.WidgetInstance;
 import org.openbravo.client.myob.WidgetProvider;
 import org.openbravo.service.datasource.DataSourceComponentProvider;
@@ -93,8 +94,19 @@
     final Map<String, Object> localParameters = new HashMap<String, Object>();
     localParameters.putAll(getParameters());
     localParameters.put(DataSourceConstants.DS_ONLY_GENERATE_CREATESTATEMENT, true);
-    localParameters.put(WIDGETCLASS_PARAMETER, getWidgetClass());
-    final Component dsComponent = dataSourceComponentProvider.getComponent(DATASOURCEID,
+
+    WidgetClass widget = getWidgetClass();
+    OBCQL_WidgetQuery listWidget = widget.getOBCQLWidgetQueryList().get(0);
+    String listWidgetType = listWidget.getType();
+    String datasourceId = null;
+    if ("HQL".equals(listWidgetType)) {
+      datasourceId = DATASOURCEID;
+    } else {
+      datasourceId = listWidget.getDatasource().getId();
+    }
+
+    localParameters.put(WIDGETCLASS_PARAMETER, widget);
+    final Component dsComponent = dataSourceComponentProvider.getComponent(datasourceId,
         localParameters);
     final String dsJavaScript = dsComponent.generate();
     return dsJavaScript;
--- a/modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -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.19003]]></VERSION>
+<!--FF8080812D842086012D844F3CC0003E-->  <VERSION><![CDATA[0.0.19180]]></VERSION>
 <!--FF8080812D842086012D844F3CC0003E-->  <DESCRIPTION><![CDATA[Collection of Workspace Widgets]]></DESCRIPTION>
 <!--FF8080812D842086012D844F3CC0003E-->  <HELP><![CDATA[Collection of Workspace Widgets]]></HELP>
 <!--FF8080812D842086012D844F3CC0003E-->  <URL><![CDATA[http://forge.openbravo.com/projects/widgetscollection]]></URL>
--- a/modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -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.19003]]></STARTVERSION>
+<!--FF8080812D842086012D845002070046-->  <STARTVERSION><![CDATA[2.1.19180]]></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/OBCQL_WIDGET_QUERY.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.client.widgets/src-db/database/sourcedata/OBCQL_WIDGET_QUERY.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -15,6 +15,7 @@
 and ol.product.name like :pname
 group by product.name, product.uOM.name, product.id, product.uOM.id 
 order by sum(orderedQuantity) desc]]></HQL>
+<!--CFDF8EE593F04CFE9709F5AD19A3A573-->  <TYPE><![CDATA[HQL]]></TYPE>
 <!--CFDF8EE593F04CFE9709F5AD19A3A573--></OBCQL_WIDGET_QUERY>
 
 <!--D2003CD3F9984BF39457BA1F2FFF01C9--><OBCQL_WIDGET_QUERY>
@@ -46,6 +47,7 @@
 	and tel.expenseSheet.businessPartner=u.businessPartner
 	and u.id=:user
 order by  tel.expenseSheet.reportDate, tel.expenseSheet.documentNo]]></HQL>
+<!--D2003CD3F9984BF39457BA1F2FFF01C9-->  <TYPE><![CDATA[HQL]]></TYPE>
 <!--D2003CD3F9984BF39457BA1F2FFF01C9--></OBCQL_WIDGET_QUERY>
 
 </data>
--- a/modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -6,7 +6,7 @@
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <NAME><![CDATA[Payment Report]]></NAME>
-<!--2A5EE903D7974AC298C0504FBC4501A7-->  <VERSION><![CDATA[3.0.19003]]></VERSION>
+<!--2A5EE903D7974AC298C0504FBC4501A7-->  <VERSION><![CDATA[3.0.19180]]></VERSION>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <DESCRIPTION><![CDATA[Payment Report]]></DESCRIPTION>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <URL><![CDATA[http://forge.openbravo.com/projects/paymentreport]]></URL>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <TYPE><![CDATA[M]]></TYPE>
--- a/modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -7,7 +7,7 @@
 <!--A3B449C4D5FE4D688CC58236FE33B802-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--A3B449C4D5FE4D688CC58236FE33B802-->  <AD_MODULE_ID><![CDATA[2A5EE903D7974AC298C0504FBC4501A7]]></AD_MODULE_ID>
 <!--A3B449C4D5FE4D688CC58236FE33B802-->  <AD_DEPENDENT_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_DEPENDENT_MODULE_ID>
-<!--A3B449C4D5FE4D688CC58236FE33B802-->  <STARTVERSION><![CDATA[3.0.19003]]></STARTVERSION>
+<!--A3B449C4D5FE4D688CC58236FE33B802-->  <STARTVERSION><![CDATA[3.0.19180]]></STARTVERSION>
 <!--A3B449C4D5FE4D688CC58236FE33B802-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--A3B449C4D5FE4D688CC58236FE33B802-->  <DEPENDANT_MODULE_NAME><![CDATA[Advanced Payables and Receivables Mngmt]]></DEPENDANT_MODULE_NAME>
 <!--A3B449C4D5FE4D688CC58236FE33B802-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_PROCESS.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_PROCESS.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -19,6 +19,7 @@
 <!--6AD04479EC134BD4826077F36B709876-->  <AD_MODULE_ID><![CDATA[2A5EE903D7974AC298C0504FBC4501A7]]></AD_MODULE_ID>
 <!--6AD04479EC134BD4826077F36B709876-->  <UIPATTERN><![CDATA[M]]></UIPATTERN>
 <!--6AD04479EC134BD4826077F36B709876-->  <ISADVANCEDFEATURE><![CDATA[N]]></ISADVANCEDFEATURE>
+<!--6AD04479EC134BD4826077F36B709876-->  <PREVENTCONCURRENT><![CDATA[N]]></PREVENTCONCURRENT>
 <!--6AD04479EC134BD4826077F36B709876--></AD_PROCESS>
 
 </data>
--- a/modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_TEXTINTERFACES.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_TEXTINTERFACES.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -462,6 +462,17 @@
 <!--7FFF499FA6DE45D8A60427A22D91165E-->  <AD_MODULE_ID><![CDATA[2A5EE903D7974AC298C0504FBC4501A7]]></AD_MODULE_ID>
 <!--7FFF499FA6DE45D8A60427A22D91165E--></AD_TEXTINTERFACES>
 
+<!--81DD7CAF25BE4F17BF5F04B43BB076E0--><AD_TEXTINTERFACES>
+<!--81DD7CAF25BE4F17BF5F04B43BB076E0-->  <AD_TEXTINTERFACES_ID><![CDATA[81DD7CAF25BE4F17BF5F04B43BB076E0]]></AD_TEXTINTERFACES_ID>
+<!--81DD7CAF25BE4F17BF5F04B43BB076E0-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--81DD7CAF25BE4F17BF5F04B43BB076E0-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--81DD7CAF25BE4F17BF5F04B43BB076E0-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--81DD7CAF25BE4F17BF5F04B43BB076E0-->  <TEXT><![CDATA[ACCS_ACCOUNT_ID_D]]></TEXT>
+<!--81DD7CAF25BE4F17BF5F04B43BB076E0-->  <FILENAME><![CDATA[/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReportPDF.jrxml]]></FILENAME>
+<!--81DD7CAF25BE4F17BF5F04B43BB076E0-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--81DD7CAF25BE4F17BF5F04B43BB076E0-->  <AD_MODULE_ID><![CDATA[2A5EE903D7974AC298C0504FBC4501A7]]></AD_MODULE_ID>
+<!--81DD7CAF25BE4F17BF5F04B43BB076E0--></AD_TEXTINTERFACES>
+
 <!--8747F91C31704FD0A9EC0C35237158BE--><AD_TEXTINTERFACES>
 <!--8747F91C31704FD0A9EC0C35237158BE-->  <AD_TEXTINTERFACES_ID><![CDATA[8747F91C31704FD0A9EC0C35237158BE]]></AD_TEXTINTERFACES_ID>
 <!--8747F91C31704FD0A9EC0C35237158BE-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -748,6 +759,17 @@
 <!--B973837A2C334DC49973CEE4179F43B7-->  <AD_MODULE_ID><![CDATA[2A5EE903D7974AC298C0504FBC4501A7]]></AD_MODULE_ID>
 <!--B973837A2C334DC49973CEE4179F43B7--></AD_TEXTINTERFACES>
 
+<!--B9CF74E3592E4EF684332D8BD3F34AE2--><AD_TEXTINTERFACES>
+<!--B9CF74E3592E4EF684332D8BD3F34AE2-->  <AD_TEXTINTERFACES_ID><![CDATA[B9CF74E3592E4EF684332D8BD3F34AE2]]></AD_TEXTINTERFACES_ID>
+<!--B9CF74E3592E4EF684332D8BD3F34AE2-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--B9CF74E3592E4EF684332D8BD3F34AE2-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--B9CF74E3592E4EF684332D8BD3F34AE2-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--B9CF74E3592E4EF684332D8BD3F34AE2-->  <TEXT><![CDATA[Financial Account]]></TEXT>
+<!--B9CF74E3592E4EF684332D8BD3F34AE2-->  <FILENAME><![CDATA[/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReportExcel.jrxml]]></FILENAME>
+<!--B9CF74E3592E4EF684332D8BD3F34AE2-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--B9CF74E3592E4EF684332D8BD3F34AE2-->  <AD_MODULE_ID><![CDATA[2A5EE903D7974AC298C0504FBC4501A7]]></AD_MODULE_ID>
+<!--B9CF74E3592E4EF684332D8BD3F34AE2--></AD_TEXTINTERFACES>
+
 <!--BA44533ED06A4B73BCE144691D928626--><AD_TEXTINTERFACES>
 <!--BA44533ED06A4B73BCE144691D928626-->  <AD_TEXTINTERFACES_ID><![CDATA[BA44533ED06A4B73BCE144691D928626]]></AD_TEXTINTERFACES_ID>
 <!--BA44533ED06A4B73BCE144691D928626-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReport.html	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReport.html	Thu Jan 10 13:17:14 2013 +0100
@@ -1127,7 +1127,7 @@
                       <table border="0" cellspacing="0" cellpadding="0" width="90%" class="DataGrid_Header_Table DataGrid_Body_Table" style="table-layout: auto;">
                         <div id="sectionStatus">
                           <tr class="DataGrid_Body_Row">
-                            <th colspan="15"  class="DataGrid_Header_Cell" style="text-align:left">Status<span>:&nbsp;</span>
+                            <th colspan="16"  class="DataGrid_Header_Cell" style="text-align:left">Status<span>:&nbsp;</span>
                             <span id="fieldStatus">xxStatusName</span></th>
                           </tr>
                     
@@ -1148,6 +1148,7 @@
                             <th width="10%" class="DataGrid_Header_Cell">Trans. Currency</th>
                             <th width="10%" class="DataGrid_Header_Cell">Base Amount</th>
                             <th width="10%" class="DataGrid_Header_Cell">Base Currency</th>
+                            <th width="10%" class="DataGrid_Header_Cell">Financial Account</th>
                           </tr>
                     
                           <div id="sectionDetail">
@@ -1177,6 +1178,7 @@
                               <td width="10%" id="fieldTransCurrency" class="DataGrid_Body_Cell">xx14500.34</td>
                               <td width="10%" id="fieldBaseAmount" class="DataGrid_Body_Cell_Amount">xx14500.34</td>
                               <td width="10%" id="fieldBaseCurrency" class="DataGrid_Body_Cell" style="text-align:center">xx14500.34</td>
+                              <td width="10%" id="fieldFinAccount" class="DataGrid_Body_Cell" style="text-align:center">xx14500.34</td>                       
                             </tr>
                           </div>
                           <tr class="DataGrid_Body_Row">
@@ -1184,9 +1186,10 @@
                             <th width="100%" class="DataGrid_Header_Cell_Amount" colspan="12"></th>
                             <th width="10%" class="DataGrid_Header_Cell_Amount" style="text-align:right"><span class="Bold" id="subtotalBaseAmount"></span></th>
                             <th width="10%" class="DataGrid_Header_Cell"><span class="Bold" id="fieldBaseCurrency"></span></th>
+                            <th width="100%" class="DataGrid_Header_Cell_Amount"></th>
                           </tr>
                           <tr>
-                            <th colspan="15" height="25px"/>
+                            <th colspan="16" height="25px"/>
                           </tr>
                         </div>
                       </table>
@@ -1195,7 +1198,7 @@
                       <table cellspacing="0" cellpadding="0" width="90%" class="DataGrid_Header_Table DataGrid_Body_Table" style="table-layout: auto;">
                           <div id="sectionGroupCrit">
                             <tr class="DataGrid_Body_Row">
-                              <th colspan="12" class="DataGrid_Header_Cell" style="text-align:left">Grouping Criteria<span>:&nbsp;</span>
+                              <th colspan="13" class="DataGrid_Header_Cell" style="text-align:left">Grouping Criteria<span>:&nbsp;</span>
                                 <span id="fieldGroupCritName">xxGroupCritName</span></th>
                              <!-- <th class="DataGrid_Header_Cell">Balance</th>
                               <th class="DataGrid_Header_Cell_Amount"><span id="sumBalanceAmount"></span></th>
@@ -1204,7 +1207,7 @@
                             </tr>
                             <div id="sectionStatus2">
                                 <tr class="DataGrid_Body_Row">
-                                  <th colspan="15" class="DataGrid_Header_Cell" style="text-align:left">Status<span>:&nbsp;</span>
+                                  <th colspan="16" class="DataGrid_Header_Cell" style="text-align:left">Status<span>:&nbsp;</span>
                                 <span id="fieldStatus2">xxStatusName</span></th>
                                 </tr>
                         
@@ -1224,6 +1227,7 @@
                                     <th width="10%" class="DataGrid_Header_Cell">Trans. Currency</th>
                                     <th width="10%" class="DataGrid_Header_Cell">Base Amount</th>
                                     <th width="10%" class="DataGrid_Header_Cell">Base Currency</th>
+                                    <th width="10%" class="DataGrid_Header_Cell">Financial Account</th>
                                 </tr>
                         
                                 <div id="sectionDetail2">
@@ -1252,6 +1256,7 @@
                                     <td width="10%" id="fieldTransCurrency2" class="DataGrid_Body_Cell">xx14500.34</td>
                                     <td width="10%" id="fieldBaseAmount2" class="DataGrid_Body_Cell_Amount">xx14500.34</td>
                                     <td width="10%" id="fieldBaseCurrency2" class="DataGrid_Body_Cell" style="text-align:center">xx14500.34</td>
+                                    <td width="10%" id="fieldFinAccount2" class="DataGrid_Body_Cell" style="text-align:center">xx14500.34</td>
                                   </tr>
                                 </div>
                                 <tr class="DataGrid_Body_Row">
@@ -1259,11 +1264,12 @@
                                   <th width="100%" class="DataGrid_Header_Cell_Amount" colspan="12"></th>
                                   <th width="10%" class="DataGrid_Header_Cell_Amount" style="text-align:right"><span class="Bold" id="subtotalBaseAmountStatus"></span></th>
                                   <th width="10%" class="DataGrid_Header_Cell"><span class="Bold" id="fieldBaseCurrency2"></span></th>
+                                  <th width="100%" class="DataGrid_Header_Cell_Amount"></th>
                                 </tr>
                               
                             </div>
                             <tr>
-                              <th colspan="15" style="height:25px"/>
+                              <th colspan="16" style="height:25px"/>
                             </tr>
                           </div>
                       </table>
--- a/modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReport.java	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReport.java	Thu Jan 10 13:17:14 2013 +0100
@@ -123,7 +123,7 @@
       String strGroupCrit = vars.getGlobalVariable("inpGroupCrit", "PaymentReport|GroupCrit", "");
       String strOrdCrit = vars.getInGlobalVariable("inpShown", "PaymentReport|OrdCrit", "",
           new ValueListFilter("Date", "APRM_FATS_BPARTNER", "Project", "INS_CURRENCY",
-              "FINPR_BPartner_Category", ""));
+              "FINPR_BPartner_Category", "ACCS_ACCOUNT_ID_D", "DueDate", ""));
       final String strInclPaymentUsingCredit = vars.getGlobalVariable("inpInclPaymentUsingCredit",
           "PaymentReport|IncludePaymentUsingCredit", "Y");
       printPageDataSheet(response, vars, strOrg, strInclSubOrg, strDueDateFrom, strDueDateTo,
@@ -197,7 +197,7 @@
           .getRequestGlobalVariable("inpGroupCrit", "PaymentReport|GroupCrit");
       String strOrdCrit = vars.getRequestInGlobalVariable("inpShown", "PaymentReport|OrdCrit",
           new ValueListFilter("Date", "APRM_FATS_BPARTNER", "Project", "INS_CURRENCY",
-              "FINPR_BPartner_Category", ""));
+              "FINPR_BPartner_Category", "ACCS_ACCOUNT_ID_D", "DueDate", ""));
       final String strInclPaymentUsingCredit = vars.getStringParameter("inpInclPaymentUsingCredit",
           "N");
       vars.setSessionValue("PaymentReport|IncludePaymentUsingCredit", strInclPaymentUsingCredit);
@@ -255,7 +255,7 @@
           .getRequestGlobalVariable("inpGroupCrit", "PaymentReport|GroupCrit");
       String strOrdCrit = vars.getRequestInGlobalVariable("inpShown", "PaymentReport|OrdCrit",
           new ValueListFilter("Date", "APRM_FATS_BPARTNER", "Project", "INS_CURRENCY",
-              "FINPR_BPartner_Category", ""));
+              "FINPR_BPartner_Category", "ACCS_ACCOUNT_ID_D", "DueDate", ""));
       String strOutput = "html";
       final String strInclPaymentUsingCredit = vars.getStringParameter("inpInclPaymentUsingCredit",
           "N");
@@ -636,6 +636,11 @@
     sqlRO.setData("NAME", Utility.messageBD(this, "INS_CURRENCY", vars.getLanguage()));
     sqlRO.setData("DESCRIPTION", "");
     vector.addElement(sqlRO);
+    sqlRO = new SQLReturnObject();
+    sqlRO.setData("ID", "ACCS_ACCOUNT_ID_D");
+    sqlRO.setData("NAME", Utility.messageBD(this, "ACCS_ACCOUNT_ID_D", vars.getLanguage()));
+    sqlRO.setData("DESCRIPTION", "");
+    vector.addElement(sqlRO);
 
     objectListData = new FieldProvider[vector.size()];
     vector.copyInto(objectListData);
@@ -673,6 +678,18 @@
     sqlRO.setData("DESCRIPTION", "");
     vector.addElement(sqlRO);
 
+    sqlRO = new SQLReturnObject();
+    sqlRO.setData("ID", "ACCS_ACCOUNT_ID_D");
+    sqlRO.setData("NAME", Utility.messageBD(this, "ACCS_ACCOUNT_ID_D", vars.getLanguage()));
+    sqlRO.setData("DESCRIPTION", "");
+    vector.addElement(sqlRO);
+
+    sqlRO = new SQLReturnObject();
+    sqlRO.setData("ID", "DueDate");
+    sqlRO.setData("NAME", Utility.messageBD(this, "DueDate", vars.getLanguage()));
+    sqlRO.setData("DESCRIPTION", "");
+    vector.addElement(sqlRO);
+
     objectListData = new FieldProvider[vector.size()];
     vector.copyInto(objectListData);
 
--- a/modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReport.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReport.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -154,6 +154,7 @@
     <FIELD id="fieldTransCurrency">TRANS_CURRENCY</FIELD>
     <FIELD id="fieldBaseAmount" format="euroInform">BASE_AMOUNT</FIELD>
     <FIELD id="fieldBaseCurrency">BASE_CURRENCY</FIELD>
+    <FIELD id="fieldFinAccount">FINANCIAL_ACCOUNT</FIELD>
 
 <!--     Accumulates Base Amount columns values -->
     <FUNCTION id="subtotalBaseAmount" name="SUM" format="euroInform">BASE_AMOUNT</FUNCTION>
@@ -192,6 +193,7 @@
     <FIELD id="fieldTransCurrency2">TRANS_CURRENCY</FIELD>
     <FIELD id="fieldBaseAmount2" format="euroInform">BASE_AMOUNT</FIELD>
     <FIELD id="fieldBaseCurrency2">BASE_CURRENCY</FIELD>
+    <FIELD id="fieldFinAccount2">FINANCIAL_ACCOUNT</FIELD>
     <FIELD id="fieldGroupCritName">GROUP_CRIT_ID</FIELD>
     <FIELD id="fieldGroupCrit">GROUP_CRIT_ID</FIELD>
 
--- a/modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReportDao.java	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReportDao.java	Thu Jan 10 13:17:14 2013 +0100
@@ -79,6 +79,7 @@
   private java.util.List<String> bpList;
   private java.util.List<String> bpCategoryList;
   private java.util.List<String> projectList;
+  private java.util.List<String> acctList;
 
   public PaymentReportDao() {
   }
@@ -476,6 +477,14 @@
         hsqlScript.append(", invcur.");
         hsqlScript.append(Currency.PROPERTY_ISOCODE);
         hsqlScript.append("), ");
+      } else if (strGroupCrit.equalsIgnoreCase("ACCS_ACCOUNT_ID_D")) {
+        hsqlScript.append(" coalesce(");
+        hsqlScript
+            .append(" (select trans.account.name from FIN_Finacc_Transaction trans left outer join trans.finPayment payment where payment.id=pay.id),");
+        hsqlScript.append(" pay.");
+        hsqlScript.append(FIN_Payment.PROPERTY_ACCOUNT);
+        hsqlScript.append(".name, 'Awaiting Payment'");
+        hsqlScript.append("), ");
       }
 
       hsqlScript.append(" a, coalesce(pay.");
@@ -486,7 +495,7 @@
         String[] strOrdCritList = strOrdCrit.substring(2, strOrdCrit.length() - 2).split("', '");
 
         for (int i = 0; i < strOrdCritList.length; i++) {
-          if (strOrdCritList[i].contains("Date")) {
+          if (strOrdCritList[i].equalsIgnoreCase("Date")) {
             hsqlScript.append(", inv.");
             hsqlScript.append(Invoice.PROPERTY_INVOICEDATE);
           }
@@ -518,6 +527,18 @@
             hsqlScript.append(Currency.PROPERTY_ISOCODE);
             hsqlScript.append(")");
           }
+          if (strOrdCritList[i].equalsIgnoreCase("ACCS_ACCOUNT_ID_D")) {
+            hsqlScript.append(", coalesce(");
+            hsqlScript
+                .append(" (select trans.account.name from FIN_Finacc_Transaction trans left outer join trans.finPayment payment where payment.id=pay.id),");
+            hsqlScript.append(" pay.");
+            hsqlScript.append(FIN_Payment.PROPERTY_ACCOUNT);
+            hsqlScript.append(".name)");
+          }
+          if (strOrdCritList[i].equalsIgnoreCase("DueDate")) {
+            hsqlScript.append(", invps.");
+            hsqlScript.append(FIN_PaymentSchedule.PROPERTY_DUEDATE);
+          }
         }
       }
 
@@ -525,9 +546,9 @@
       hsqlScript.append(FIN_PaymentScheduleDetail.PROPERTY_INVOICEPAYMENTSCHEDULE);
       hsqlScript.append(".");
       hsqlScript.append(FIN_PaymentSchedule.PROPERTY_ID);
-
       final Session session = OBDal.getInstance().getSession();
       final Query query = session.createQuery(hsqlScript.toString());
+
       int pos = 0;
       for (final Object param : parameters) {
         if (param instanceof BaseOBObject) {
@@ -641,8 +662,12 @@
           // payment yes / no
           FieldProviderFactory.setField(data[i], "PAYMENT_Y_N", "");
           // financialAccount
-          FieldProviderFactory.setField(data[i], "FINANCIAL_ACCOUNT", FIN_PaymentScheduleDetail[i]
-              .getPaymentDetails().getFinPayment().getAccount().getIdentifier());
+          FieldProviderFactory.setField(data[i], "FINANCIAL_ACCOUNT",
+              FIN_PaymentScheduleDetail[i].getPaymentDetails().getFinPayment()
+                  .getFINFinaccTransactionList().size() != 0 ? FIN_PaymentScheduleDetail[i]
+                  .getPaymentDetails().getFinPayment().getFINFinaccTransactionList().get(0)
+                  .getAccount().getName() : FIN_PaymentScheduleDetail[i].getPaymentDetails()
+                  .getFinPayment().getAccount().getName());
           // status
           FieldProviderFactory.setField(data[i], "STATUS",
               translateRefList(FIN_PaymentScheduleDetail[i].getPaymentDetails().getFinPayment()
@@ -969,6 +994,10 @@
           FieldProviderFactory.setField(previousRow, "GROUP_CRIT_ID",
               previousRow.getField("TRANS_CURRENCY"));
           FieldProviderFactory.setField(previousRow, "GROUP_CRIT", "Currency");
+        } else if (strGroupCrit.equalsIgnoreCase("ACCS_ACCOUNT_ID_D")) {
+          FieldProviderFactory.setField(previousRow, "GROUP_CRIT_ID",
+              previousRow.getField("FINANCIAL_ACCOUNT"));
+          FieldProviderFactory.setField(previousRow, "GROUP_CRIT", "Financial Account");
         } else {
           FieldProviderFactory.setField(previousRow, "GROUP_CRIT_ID", "");
         }
@@ -1157,7 +1186,7 @@
     FieldProviderFactory.setField(transactionData, "PAYMENT_Y_N", "Display:None");
     // financialAccount
     FieldProviderFactory.setField(transactionData, "FINANCIAL_ACCOUNT", transaction.getAccount()
-        .getIdentifier());
+        .getName());
     // status
     FieldProviderFactory.setField(transactionData, "STATUS",
         translateRefList(transaction.getStatus()));
@@ -1246,6 +1275,10 @@
       FieldProviderFactory.setField(transactionData, "GROUP_CRIT_ID",
           transactionData.getField("TRANS_CURRENCY"));
       FieldProviderFactory.setField(transactionData, "GROUP_CRIT", "Currency");
+    } else if (strGroupCrit.equalsIgnoreCase("ACCS_ACCOUNT_ID_D")) {
+      FieldProviderFactory.setField(transactionData, "GROUP_CRIT_ID",
+          transactionData.getField("FINANCIAL_ACCOUNT"));
+      FieldProviderFactory.setField(transactionData, "GROUP_CRIT", "Financial Account");
     } else {
       FieldProviderFactory.setField(transactionData, "GROUP_CRIT_ID", "");
       FieldProviderFactory.setField(transactionData, "GROUP_CRIT", "");
@@ -1326,6 +1359,20 @@
             .compareTo(data.getField("TRANS_CURRENCY")) < 0) {
           isBefore = true;
         }
+      } else if (strGroupCrit.equalsIgnoreCase("ACCS_ACCOUNT_ID_D")) {
+        if (acctList == null) {
+          createAcctList();
+        }
+        int posData = acctList.indexOf(data.getField("FINANCIAL_ACCOUNT"));
+        int pos = acctList.indexOf(transaction.getAccount().getName());
+
+        if (transaction.getAccount().getName().equals(data.getField("FINANCIAL_ACCOUNT"))) {
+          isBefore = isBeforeStatusAndOrder(transaction, data, strOrdCrit, BPName, BPCategory,
+              strProject);
+        } else if ((pos < posData || data.getField("FINANCIAL_ACCOUNT").equals(""))
+            && !transaction.getAccount().getName().equals("")) {
+          isBefore = true;
+        }
       }
 
     } else {
@@ -1407,6 +1454,20 @@
             || (transaction.getCurrency().getISOCode().toString()
                 .compareTo(data.getField("TRANS_CURRENCY")) < 0);
       }
+      if (strOrdCritList[i].equalsIgnoreCase("DueDate")) {
+        Date dataDate = FIN_Utility.getDate(data.getField("DUE_DATE"));
+        isBefore = isBefore || (transaction.getDateAcct().compareTo(dataDate) < 0);
+      }
+      if (strOrdCritList[i].equalsIgnoreCase("ACCS_ACCOUNT_ID_D")) {
+        if (acctList == null) {
+          createAcctList();
+        }
+        int posData = acctList.indexOf(data.getField("FINANCIAL_ACCOUNT"));
+        int pos = acctList.indexOf(transaction.getAccount().getName());
+        isBefore = isBefore
+            || (((pos < posData) || data.getField("FINANCIAL_ACCOUNT").equals("")) && !transaction
+                .getAccount().getName().equals(""));
+      }
       return isBefore;
     } else {
       if (strOrdCritList[i].contains("Project")) {
@@ -1457,7 +1518,7 @@
           isBefore = isBeforeOrder(transaction, data, strOrdCritList, i + 1, BPName, BPCategory,
               strProject);
         }
-      } else if (strOrdCritList[i].contains("Date")) {
+      } else if (strOrdCritList[i].equalsIgnoreCase("Date")) {
         Date dataDate = FIN_Utility.getDate(data.getField("INVOICE_DATE"));
         if (dataDate != null) {
           isBefore = false;
@@ -1465,7 +1526,32 @@
           isBefore = isBeforeOrder(transaction, data, strOrdCritList, i + 1, BPName, BPCategory,
               strProject);
         }
+      } else if (strOrdCritList[i].equalsIgnoreCase("DueDate")) {
+        Date dataDate = FIN_Utility.getDate(data.getField("DUE_DATE"));
+        if (dataDate == null) {
+          isBefore = true;
+        } else if ((transaction.getDateAcct().compareTo(dataDate) < 0)) {
+          isBefore = true;
+        } else {
+          isBefore = isBeforeOrder(transaction, data, strOrdCritList, i + 1, BPName, BPCategory,
+              strProject);
+        }
+      } else if (strOrdCritList[i].equalsIgnoreCase("ACCS_ACCOUNT_ID_D")) {
+        if (acctList == null) {
+          createAcctList();
+        }
+        int posData = acctList.indexOf(data.getField("FINANCIAL_ACCOUNT"));
+        int pos = acctList.indexOf(transaction.getAccount().getName());
+
+        if ((pos < posData || data.getField("FINANCIAL_ACCOUNT").equals(""))
+            && !transaction.getAccount().getName().equals("")) {
+          isBefore = true;
+        } else if (transaction.getAccount().getName().equals(data.getField("FINANCIAL_ACCOUNT"))) {
+          isBefore = isBeforeOrder(transaction, data, strOrdCritList, i + 1, BPName, BPCategory,
+              strProject);
+        }
       }
+
       return isBefore;
     }
   }
@@ -1538,6 +1624,8 @@
           .createAlias(FIN_FinaccTransaction.PROPERTY_PROJECT, "p", OBCriteria.LEFT_JOIN);
       obCriteriaTrans.createAlias(FIN_FinaccTransaction.PROPERTY_CURRENCY, "c",
           OBCriteria.LEFT_JOIN);
+      obCriteriaTrans.createAlias(FIN_FinaccTransaction.PROPERTY_ACCOUNT, "acc",
+          OBCriteria.LEFT_JOIN);
       obCriteriaTrans.add(Restrictions.isNull(FIN_FinaccTransaction.PROPERTY_FINPAYMENT));
       obCriteriaTrans.add(Restrictions.in(FIN_FinaccTransaction.PROPERTY_ORGANIZATION,
           organizations));
@@ -1670,6 +1758,8 @@
         obCriteriaTrans.addOrder(Order.asc("bpc." + Category.PROPERTY_NAME));
       } else if (strGroupCrit.equalsIgnoreCase("INS_CURRENCY")) {
         obCriteriaTrans.addOrder(Order.asc("c." + Currency.PROPERTY_ISOCODE));
+      } else if (strGroupCrit.equalsIgnoreCase("ACCS_ACCOUNT_ID_D")) {
+        obCriteriaTrans.addOrder(Order.asc("acc." + FIN_FinancialAccount.PROPERTY_NAME));
       }
 
       obCriteriaTrans.addOrder(Order.asc(FIN_FinaccTransaction.PROPERTY_STATUS));
@@ -1677,7 +1767,7 @@
       if (!strOrdCrit.isEmpty()) {
         String[] strOrdCritList = strOrdCrit.substring(2, strOrdCrit.length() - 2).split("', '");
         for (int i = 0; i < strOrdCritList.length; i++) {
-          if (strOrdCritList[i].contains("Date")) {
+          if (strOrdCritList[i].equalsIgnoreCase("Date")) {
             obCriteriaTrans.addOrder(Order.asc(FIN_FinaccTransaction.PROPERTY_DATEACCT));
           }
           if (strOrdCritList[i].contains("Project")) {
@@ -1692,6 +1782,12 @@
           if (strOrdCritList[i].contains("INS_CURRENCY")) {
             obCriteriaTrans.addOrder(Order.asc("c." + Currency.PROPERTY_ISOCODE));
           }
+          if (strOrdCritList[i].contains("ACCS_ACCOUNT_ID_D")) {
+            obCriteriaTrans.addOrder(Order.asc("acc." + FIN_FinancialAccount.PROPERTY_NAME));
+          }
+          if (strOrdCritList[i].equalsIgnoreCase("DueDate")) {
+            obCriteriaTrans.addOrder(Order.asc(FIN_FinaccTransaction.PROPERTY_TRANSACTIONDATE));
+          }
         }
       }
       obCriteriaTrans.addOrderBy(FIN_FinaccTransaction.PROPERTY_ID, true);
@@ -2064,4 +2160,14 @@
     }
   }
 
+  private void createAcctList() {
+    acctList = new ArrayList<String>();
+    OBCriteria<FIN_FinancialAccount> critAcct = OBDal.getInstance().createCriteria(
+        FIN_FinancialAccount.class);
+    critAcct.addOrderBy(FIN_FinancialAccount.PROPERTY_NAME, true);
+    for (FIN_FinancialAccount acct : critAcct.list()) {
+      acctList.add(acct.getName());
+    }
+  }
+
 }
--- a/modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReportExcel.jrxml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReportExcel.jrxml	Thu Jan 10 13:17:14 2013 +0100
@@ -3,7 +3,7 @@
 	<property name="ireport.scriptlethandling" value="0"/>
 	<property name="ireport.encoding" value="UTF-8"/>
 	<property name="ireport.zoom" value="1.0"/>
-	<property name="ireport.x" value="734"/>
+	<property name="ireport.x" value="1058"/>
 	<property name="ireport.y" value="0"/>
 	<import value="net.sf.jasperreports.engine.*"/>
 	<import value="java.util.*"/>
@@ -266,6 +266,14 @@
 				</textElement>
 				<text><![CDATA[Deposit/Withdraw Date]]></text>
 			</staticText>
+			<staticText>
+               <reportElement key="staticText-14" style="Detail_Header" x="1574" y="25" width="77" height="25"/>
+               <box leftPadding="2"/>
+               <textElement textAlignment="Center">
+                   <font size="8" isBold="false"/>
+               </textElement>
+               <text><![CDATA[Financial Account]]></text>
+           </staticText>
 		</band>
 	</pageHeader>
 	<columnHeader>
@@ -426,6 +434,13 @@
 				</textElement>
 				<textFieldExpression class="java.util.Date"><![CDATA[$F{DEPOSIT_WITHDRAW_DATE}]]></textFieldExpression>
 			</textField>
+			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
+               <reportElement key="textField-14" style="Report_Footer" x="1574" y="0" width="77" height="25"/>
+               <textElement textAlignment="Center">
+                   <font size="8"/>
+               </textElement>
+               <textFieldExpression class="java.lang.String"><![CDATA[$F{FINANCIAL_ACCOUNT}]]></textFieldExpression>
+           </textField>
 		</band>
 	</detail>
 	<columnFooter>
--- a/modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReportPDF.jrxml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReportPDF.jrxml	Thu Jan 10 13:17:14 2013 +0100
@@ -3,8 +3,8 @@
 	<property name="ireport.scriptlethandling" value="0"/>
 	<property name="ireport.encoding" value="UTF-8"/>
 	<property name="ireport.zoom" value="1.0"/>
-	<property name="ireport.x" value="0"/>
-	<property name="ireport.y" value="48"/>
+	<property name="ireport.x" value="25"/>
+	<property name="ireport.y" value="151"/>
 	<import value="net.sf.jasperreports.engine.*"/>
 	<import value="java.util.*"/>
 	<import value="net.sf.jasperreports.engine.data.*"/>
@@ -288,7 +288,9 @@
 		<groupExpression><![CDATA[($P{GROUP_CRIT}.equalsIgnoreCase("APRM_FATS_BPARTNER") ? $F{BPARTNER} :
   ($P{GROUP_CRIT}.equalsIgnoreCase("Project") ? $F{PROJECT} :
     ($P{GROUP_CRIT}.equalsIgnoreCase("FINPR_BPartner_Category") ? $F{BP_GROUP} :
-      ($P{GROUP_CRIT}.equalsIgnoreCase("INS_CURRENCY") ? $F{BASE_CURRENCY} : " "
+      ($P{GROUP_CRIT}.equalsIgnoreCase("INS_CURRENCY") ? $F{TRANS_CURRENCY} :
+        ($P{GROUP_CRIT}.equalsIgnoreCase("ACCS_ACCOUNT_ID_D") ? $F{FINANCIAL_ACCOUNT} :  " "
+        )
       )
     )
   )
@@ -304,7 +306,9 @@
 					<textFieldExpression class="java.lang.String"><![CDATA[($P{GROUP_CRIT}.equalsIgnoreCase("APRM_FATS_BPARTNER") ? $F{BPARTNER}.toString() :
   ($P{GROUP_CRIT}.equalsIgnoreCase("Project") ? $F{PROJECT}.toString() :
     ($P{GROUP_CRIT}.equalsIgnoreCase("FINPR_BPartner_Category") ? $F{BP_GROUP}.toString() :
-      ($P{GROUP_CRIT}.equalsIgnoreCase("INS_CURRENCY") ? $F{TRANS_CURRENCY}.toString() : "None"
+      ($P{GROUP_CRIT}.equalsIgnoreCase("INS_CURRENCY") ? $F{TRANS_CURRENCY}.toString() :
+        ($P{GROUP_CRIT}.equalsIgnoreCase("ACCS_ACCOUNT_ID_D") ? $F{FINANCIAL_ACCOUNT}.toString() :  "None"
+        )
       )
     )
   )
--- a/modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -6,7 +6,7 @@
 <!--3A3A943684D64DEF9EC39F588A656848-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--3A3A943684D64DEF9EC39F588A656848-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--3A3A943684D64DEF9EC39F588A656848-->  <NAME><![CDATA[Orders Awaiting Delivery]]></NAME>
-<!--3A3A943684D64DEF9EC39F588A656848-->  <VERSION><![CDATA[1.1.19003]]></VERSION>
+<!--3A3A943684D64DEF9EC39F588A656848-->  <VERSION><![CDATA[1.1.19180]]></VERSION>
 <!--3A3A943684D64DEF9EC39F588A656848-->  <DESCRIPTION><![CDATA[Report displaying sales orders not shipped.]]></DESCRIPTION>
 <!--3A3A943684D64DEF9EC39F588A656848-->  <URL><![CDATA[http://forge.openbravo.com/projects/ordersawaitingdlivery]]></URL>
 <!--3A3A943684D64DEF9EC39F588A656848-->  <TYPE><![CDATA[M]]></TYPE>
--- a/modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -7,7 +7,7 @@
 <!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <AD_MODULE_ID><![CDATA[3A3A943684D64DEF9EC39F588A656848]]></AD_MODULE_ID>
 <!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <STARTVERSION><![CDATA[3.0.19003]]></STARTVERSION>
+<!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <STARTVERSION><![CDATA[3.0.19180]]></STARTVERSION>
 <!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <DEPENDANT_MODULE_NAME><![CDATA[core]]></DEPENDANT_MODULE_NAME>
 <!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_PROCESS.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_PROCESS.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -19,6 +19,7 @@
 <!--3DAA5E63A30D45A8ABF87701F8BD91EF-->  <AD_MODULE_ID><![CDATA[3A3A943684D64DEF9EC39F588A656848]]></AD_MODULE_ID>
 <!--3DAA5E63A30D45A8ABF87701F8BD91EF-->  <UIPATTERN><![CDATA[M]]></UIPATTERN>
 <!--3DAA5E63A30D45A8ABF87701F8BD91EF-->  <ISADVANCEDFEATURE><![CDATA[N]]></ISADVANCEDFEATURE>
+<!--3DAA5E63A30D45A8ABF87701F8BD91EF-->  <PREVENTCONCURRENT><![CDATA[N]]></PREVENTCONCURRENT>
 <!--3DAA5E63A30D45A8ABF87701F8BD91EF--></AD_PROCESS>
 
 </data>
--- a/modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -6,7 +6,7 @@
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <NAME><![CDATA[JSON Datasource]]></NAME>
-<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <VERSION><![CDATA[2.1.19003]]></VERSION>
+<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <VERSION><![CDATA[2.1.19180]]></VERSION>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <DESCRIPTION><![CDATA[Provides data source CRUD functionality using JSON as the data format]]></DESCRIPTION>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <HELP><![CDATA[This module implements the datasource concept. Datasources play a central role in Smartclient applications. The datasource module automatically creates a datasource for each Openbravo entity. In addition custom data source implementations can be defined.]]></HELP>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <URL><![CDATA[http://forge.openbravo.com/projects/datasourceservice]]></URL>
--- a/modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -7,7 +7,7 @@
 <!--0BA071C783CC4984AC9C03BB7CAA87C7-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--0BA071C783CC4984AC9C03BB7CAA87C7-->  <AD_MODULE_ID><![CDATA[A44B9BA75C354D8FB2E3F7D6EB6BFDC4]]></AD_MODULE_ID>
 <!--0BA071C783CC4984AC9C03BB7CAA87C7-->  <AD_DEPENDENT_MODULE_ID><![CDATA[C70732EA90A14EC0916078B85CC33D2D]]></AD_DEPENDENT_MODULE_ID>
-<!--0BA071C783CC4984AC9C03BB7CAA87C7-->  <STARTVERSION><![CDATA[1.1.19003]]></STARTVERSION>
+<!--0BA071C783CC4984AC9C03BB7CAA87C7-->  <STARTVERSION><![CDATA[1.1.19180]]></STARTVERSION>
 <!--0BA071C783CC4984AC9C03BB7CAA87C7-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--0BA071C783CC4984AC9C03BB7CAA87C7-->  <DEPENDANT_MODULE_NAME><![CDATA[JBoss Weld]]></DEPENDANT_MODULE_NAME>
 <!--0BA071C783CC4984AC9C03BB7CAA87C7-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -21,7 +21,7 @@
 <!--3E531F0CD0A54130996F5AF3B6A2D01B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--3E531F0CD0A54130996F5AF3B6A2D01B-->  <AD_MODULE_ID><![CDATA[A44B9BA75C354D8FB2E3F7D6EB6BFDC4]]></AD_MODULE_ID>
 <!--3E531F0CD0A54130996F5AF3B6A2D01B-->  <AD_DEPENDENT_MODULE_ID><![CDATA[F8D1B3ECB3474E8DA5C216473C840DF1]]></AD_DEPENDENT_MODULE_ID>
-<!--3E531F0CD0A54130996F5AF3B6A2D01B-->  <STARTVERSION><![CDATA[2.0.19003]]></STARTVERSION>
+<!--3E531F0CD0A54130996F5AF3B6A2D01B-->  <STARTVERSION><![CDATA[2.0.19180]]></STARTVERSION>
 <!--3E531F0CD0A54130996F5AF3B6A2D01B-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--3E531F0CD0A54130996F5AF3B6A2D01B-->  <DEPENDANT_MODULE_NAME><![CDATA[JSON REST Webservice]]></DEPENDANT_MODULE_NAME>
 <!--3E531F0CD0A54130996F5AF3B6A2D01B-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -35,7 +35,7 @@
 <!--4FCE95802A854F7E8623AFF7C33D13EE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--4FCE95802A854F7E8623AFF7C33D13EE-->  <AD_MODULE_ID><![CDATA[A44B9BA75C354D8FB2E3F7D6EB6BFDC4]]></AD_MODULE_ID>
 <!--4FCE95802A854F7E8623AFF7C33D13EE-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--4FCE95802A854F7E8623AFF7C33D13EE-->  <STARTVERSION><![CDATA[3.0.19003]]></STARTVERSION>
+<!--4FCE95802A854F7E8623AFF7C33D13EE-->  <STARTVERSION><![CDATA[3.0.19180]]></STARTVERSION>
 <!--4FCE95802A854F7E8623AFF7C33D13EE-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--4FCE95802A854F7E8623AFF7C33D13EE-->  <DEPENDANT_MODULE_NAME><![CDATA[core]]></DEPENDANT_MODULE_NAME>
 <!--4FCE95802A854F7E8623AFF7C33D13EE-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -49,7 +49,7 @@
 <!--54AF8B39C55E4E7496902893ECD82786-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--54AF8B39C55E4E7496902893ECD82786-->  <AD_MODULE_ID><![CDATA[A44B9BA75C354D8FB2E3F7D6EB6BFDC4]]></AD_MODULE_ID>
 <!--54AF8B39C55E4E7496902893ECD82786-->  <AD_DEPENDENT_MODULE_ID><![CDATA[4B828F4D03264080AA1D2057B13F613C]]></AD_DEPENDENT_MODULE_ID>
-<!--54AF8B39C55E4E7496902893ECD82786-->  <STARTVERSION><![CDATA[2.1.19003]]></STARTVERSION>
+<!--54AF8B39C55E4E7496902893ECD82786-->  <STARTVERSION><![CDATA[2.1.19180]]></STARTVERSION>
 <!--54AF8B39C55E4E7496902893ECD82786-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--54AF8B39C55E4E7496902893ECD82786-->  <DEPENDANT_MODULE_NAME><![CDATA[User Interface Client Kernel]]></DEPENDANT_MODULE_NAME>
 <!--54AF8B39C55E4E7496902893ECD82786-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -63,7 +63,7 @@
 <!--D03C56D8A4E14F45A5466350E05C631F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--D03C56D8A4E14F45A5466350E05C631F-->  <AD_MODULE_ID><![CDATA[A44B9BA75C354D8FB2E3F7D6EB6BFDC4]]></AD_MODULE_ID>
 <!--D03C56D8A4E14F45A5466350E05C631F-->  <AD_DEPENDENT_MODULE_ID><![CDATA[EC356CEE3D46416CA1EBEEB9AB82EDB9]]></AD_DEPENDENT_MODULE_ID>
-<!--D03C56D8A4E14F45A5466350E05C631F-->  <STARTVERSION><![CDATA[8.1.19003]]></STARTVERSION>
+<!--D03C56D8A4E14F45A5466350E05C631F-->  <STARTVERSION><![CDATA[8.1.19180]]></STARTVERSION>
 <!--D03C56D8A4E14F45A5466350E05C631F-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--D03C56D8A4E14F45A5466350E05C631F-->  <DEPENDANT_MODULE_NAME><![CDATA[Smartclient]]></DEPENDANT_MODULE_NAME>
 <!--D03C56D8A4E14F45A5466350E05C631F-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DataSourceServlet.java	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DataSourceServlet.java	Thu Jan 10 13:17:14 2013 +0100
@@ -25,6 +25,7 @@
 import java.text.DecimalFormat;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Calendar;
 import java.util.Date;
 import java.util.Enumeration;
@@ -32,6 +33,7 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.TimeZone;
 import java.util.Vector;
 
 import javax.inject.Inject;
@@ -67,6 +69,7 @@
 import org.openbravo.dal.service.OBDal;
 import org.openbravo.database.SessionInfo;
 import org.openbravo.erpCommon.businessUtility.Preferences;
+import org.openbravo.erpCommon.utility.PropertyException;
 import org.openbravo.erpCommon.utility.PropertyNotFoundException;
 import org.openbravo.erpCommon.utility.Utility;
 import org.openbravo.model.ad.datamodel.Column;
@@ -264,6 +267,7 @@
     List<String> numericCols = new ArrayList<String>();
     Map<String, DecimalFormat> formats = new HashMap<String, DecimalFormat>();
     int clientUTCOffsetMiliseconds;
+    TimeZone clientTimeZone;
 
     public QueryJSONWriterToCSV(HttpServletRequest request, HttpServletResponse response,
         Map<String, String> parameters, Entity entity) {
@@ -308,6 +312,26 @@
         } else {
           clientUTCOffsetMiliseconds = 0;
         }
+
+        clientTimeZone = null;
+        try {
+          String clientTimeZoneId = Preferences.getPreferenceValue("localTimeZoneID", true,
+              OBContext.getOBContext().getCurrentClient(), OBContext.getOBContext()
+                  .getCurrentOrganization(), OBContext.getOBContext().getUser(), OBContext
+                  .getOBContext().getRole(), null);
+          List<String> validTimeZoneIDs = Arrays.asList(TimeZone.getAvailableIDs());
+          if (validTimeZoneIDs.contains(clientTimeZoneId)) {
+            clientTimeZone = TimeZone.getTimeZone(clientTimeZoneId);
+          } else {
+            log4j
+                .error(clientTimeZoneId
+                    + " is not a valid time zone identifier. For a list of all accepted identifiers check http://www.java2s.com/Tutorial/Java/0120__Development/GettingallthetimezonesIDs.htm");
+          }
+        } catch (PropertyException pe) {
+          log4j
+              .warn("The local Local Timezone ID property is not defined. It can be defined in a preference. For a list of all accepted values check http://www.java2s.com/Tutorial/Java/0120__Development/GettingallthetimezonesIDs.htm");
+        }
+
         fieldProperties = new ArrayList<String>();
         if (parameters.get("viewState") != null
             && !parameters.get("viewState").toString().equals("undefined")) {
@@ -485,6 +509,7 @@
         } else {
           itKeys = json.keys();
         }
+
         boolean isFirst = true;
         while (itKeys.hasNext()) {
           String key = (String) itKeys.next();
@@ -535,7 +560,8 @@
               && !keyValue.toString().equals("null")) {
             final String repairedString = JsonUtils.convertFromXSDToJavaFormat(keyValue.toString());
             Date localDate = JsonUtils.createDateTimeFormat().parse(repairedString);
-            Date clientTimezoneDate = convertFromLocalToClientTimezone(localDate);
+            Date clientTimezoneDate = null;
+            clientTimezoneDate = convertFromLocalToClientTimezone(localDate);
             String pattern = RequestContext.get().getSessionAttribute("#AD_JAVADATETIMEFORMAT")
                 .toString();
             SimpleDateFormat dateFormat = new SimpleDateFormat(pattern);
@@ -559,18 +585,32 @@
     }
 
     private Date convertFromLocalToClientTimezone(Date localDate) {
-      Calendar now = Calendar.getInstance();
+
+      Date UTCDate = convertFromLocalToUTCTimezone(localDate);
+      Calendar calendar = null;
+      if (clientTimeZone != null) {
+        calendar = Calendar.getInstance(clientTimeZone);
+        calendar.setTime(UTCDate);
+        int gmtMillisecondOffset = (calendar.get(Calendar.ZONE_OFFSET) + calendar
+            .get(Calendar.DST_OFFSET));
+        calendar.add(Calendar.MILLISECOND, gmtMillisecondOffset);
+      } else {
+        calendar = Calendar.getInstance();
+        calendar.setTime(UTCDate);
+        calendar.add(Calendar.MILLISECOND, clientUTCOffsetMiliseconds);
+      }
+
+      return calendar.getTime();
+    }
+
+    private Date convertFromLocalToUTCTimezone(Date localDate) {
       Calendar calendar = Calendar.getInstance();
       calendar.setTime(localDate);
-      calendar.set(Calendar.DATE, now.get(Calendar.DATE));
-      calendar.set(Calendar.MONTH, now.get(Calendar.MONTH));
-      calendar.set(Calendar.YEAR, now.get(Calendar.YEAR));
 
-      int gmtMillisecondOffset = (now.get(Calendar.ZONE_OFFSET) + now.get(Calendar.DST_OFFSET));
+      int gmtMillisecondOffset = (calendar.get(Calendar.ZONE_OFFSET) + calendar
+          .get(Calendar.DST_OFFSET));
       calendar.add(Calendar.MILLISECOND, -gmtMillisecondOffset);
 
-      calendar.add(Calendar.MILLISECOND, clientUTCOffsetMiliseconds);
-
       return calendar.getTime();
     }
   }
--- a/modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -6,7 +6,7 @@
 <!--FF8080813129ADA401312CA1222A0005-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--FF8080813129ADA401312CA1222A0005-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF8080813129ADA401312CA1222A0005-->  <NAME><![CDATA[Integration with Google APIs]]></NAME>
-<!--FF8080813129ADA401312CA1222A0005-->  <VERSION><![CDATA[0.1.19003]]></VERSION>
+<!--FF8080813129ADA401312CA1222A0005-->  <VERSION><![CDATA[0.1.19180]]></VERSION>
 <!--FF8080813129ADA401312CA1222A0005-->  <DESCRIPTION><![CDATA[Integration with Google APIs]]></DESCRIPTION>
 <!--FF8080813129ADA401312CA1222A0005-->  <TYPE><![CDATA[M]]></TYPE>
 <!--FF8080813129ADA401312CA1222A0005-->  <LICENSE><![CDATA[Licensed under the Openbravo Public License Version 1.1.
--- a/modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -7,7 +7,7 @@
 <!--FF8080813141B198013141BA0F7D0012-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF8080813141B198013141BA0F7D0012-->  <AD_MODULE_ID><![CDATA[FF8080813129ADA401312CA1222A0005]]></AD_MODULE_ID>
 <!--FF8080813141B198013141BA0F7D0012-->  <AD_DEPENDENT_MODULE_ID><![CDATA[FF8080813141B198013141B86DD70003]]></AD_DEPENDENT_MODULE_ID>
-<!--FF8080813141B198013141BA0F7D0012-->  <STARTVERSION><![CDATA[0.1.19003]]></STARTVERSION>
+<!--FF8080813141B198013141BA0F7D0012-->  <STARTVERSION><![CDATA[0.1.19180]]></STARTVERSION>
 <!--FF8080813141B198013141BA0F7D0012-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--FF8080813141B198013141BA0F7D0012-->  <DEPENDANT_MODULE_NAME><![CDATA[OpenID Service Integration]]></DEPENDANT_MODULE_NAME>
 <!--FF8080813141B198013141BA0F7D0012-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -21,7 +21,7 @@
 <!--FF8080813151AEE1013151C4ACE6001B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF8080813151AEE1013151C4ACE6001B-->  <AD_MODULE_ID><![CDATA[FF8080813129ADA401312CA1222A0005]]></AD_MODULE_ID>
 <!--FF8080813151AEE1013151C4ACE6001B-->  <AD_DEPENDENT_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_DEPENDENT_MODULE_ID>
-<!--FF8080813151AEE1013151C4ACE6001B-->  <STARTVERSION><![CDATA[2.1.19003]]></STARTVERSION>
+<!--FF8080813151AEE1013151C4ACE6001B-->  <STARTVERSION><![CDATA[2.1.19180]]></STARTVERSION>
 <!--FF8080813151AEE1013151C4ACE6001B-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--FF8080813151AEE1013151C4ACE6001B-->  <DEPENDANT_MODULE_NAME><![CDATA[Openbravo 3.0 Framework]]></DEPENDANT_MODULE_NAME>
 <!--FF8080813151AEE1013151C4ACE6001B-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -6,7 +6,7 @@
 <!--FF8080813141B198013141B86DD70003-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--FF8080813141B198013141B86DD70003-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF8080813141B198013141B86DD70003-->  <NAME><![CDATA[OpenID Service Integration]]></NAME>
-<!--FF8080813141B198013141B86DD70003-->  <VERSION><![CDATA[0.1.19003]]></VERSION>
+<!--FF8080813141B198013141B86DD70003-->  <VERSION><![CDATA[0.1.19180]]></VERSION>
 <!--FF8080813141B198013141B86DD70003-->  <DESCRIPTION><![CDATA[OpenID Service Integration]]></DESCRIPTION>
 <!--FF8080813141B198013141B86DD70003-->  <TYPE><![CDATA[M]]></TYPE>
 <!--FF8080813141B198013141B86DD70003-->  <LICENSE><![CDATA[Licensed under the Openbravo Public License Version 1.1.
--- a/modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -7,7 +7,7 @@
 <!--FF8080813141B198013141B8B21B0006-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF8080813141B198013141B8B21B0006-->  <AD_MODULE_ID><![CDATA[FF8080813141B198013141B86DD70003]]></AD_MODULE_ID>
 <!--FF8080813141B198013141B8B21B0006-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--FF8080813141B198013141B8B21B0006-->  <STARTVERSION><![CDATA[3.0.19003]]></STARTVERSION>
+<!--FF8080813141B198013141B8B21B0006-->  <STARTVERSION><![CDATA[3.0.19180]]></STARTVERSION>
 <!--FF8080813141B198013141B8B21B0006-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--FF8080813141B198013141B8B21B0006-->  <DEPENDANT_MODULE_NAME><![CDATA[Core]]></DEPENDANT_MODULE_NAME>
 <!--FF8080813141B198013141B8B21B0006-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.service.json/src-db/database/sourcedata/AD_MODULE.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.service.json/src-db/database/sourcedata/AD_MODULE.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -6,7 +6,7 @@
 <!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <NAME><![CDATA[JSON REST Webservice]]></NAME>
-<!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <VERSION><![CDATA[2.0.19003]]></VERSION>
+<!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <VERSION><![CDATA[2.0.19180]]></VERSION>
 <!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <DESCRIPTION><![CDATA[Provides a JSON REST webservice for CRUD service requests]]></DESCRIPTION>
 <!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <HELP><![CDATA[Provides a JSON REST webservice for CRUD service requests. Both the servlet implementation (receiving HTTP REST requests in JSON) as the backend processing are provided.]]></HELP>
 <!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <URL><![CDATA[http://forge.openbravo.com/projects/openbravojsonrest]]></URL>
--- a/modules/org.openbravo.service.json/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.service.json/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -7,7 +7,7 @@
 <!--9E3E7B42DB16405FB794496D309D7044-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--9E3E7B42DB16405FB794496D309D7044-->  <AD_MODULE_ID><![CDATA[F8D1B3ECB3474E8DA5C216473C840DF1]]></AD_MODULE_ID>
 <!--9E3E7B42DB16405FB794496D309D7044-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--9E3E7B42DB16405FB794496D309D7044-->  <STARTVERSION><![CDATA[3.0.19003]]></STARTVERSION>
+<!--9E3E7B42DB16405FB794496D309D7044-->  <STARTVERSION><![CDATA[3.0.19180]]></STARTVERSION>
 <!--9E3E7B42DB16405FB794496D309D7044-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--9E3E7B42DB16405FB794496D309D7044-->  <DEPENDANT_MODULE_NAME><![CDATA[core]]></DEPENDANT_MODULE_NAME>
 <!--9E3E7B42DB16405FB794496D309D7044-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.service.json/src/org/openbravo/service/json/AdvancedQueryBuilder.java	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.service.json/src/org/openbravo/service/json/AdvancedQueryBuilder.java	Thu Jan 10 13:17:14 2013 +0100
@@ -28,6 +28,7 @@
 import java.util.Map;
 import java.util.Set;
 
+import org.apache.commons.lang.StringUtils;
 import org.codehaus.jettison.json.JSONArray;
 import org.codehaus.jettison.json.JSONException;
 import org.codehaus.jettison.json.JSONObject;
@@ -1085,7 +1086,17 @@
     }
     final StringBuilder sb = new StringBuilder();
     boolean firstElement = true;
+    int columnsInDescending = StringUtils.countMatches(orderBy, "-");
+    int totalColumnSeperators = StringUtils.countMatches(orderBy, ",");
+    boolean orderPrimaryKeyInDesc = false;
+    if (columnsInDescending == totalColumnSeperators) {
+      orderPrimaryKeyInDesc = true;
+    }
+
     for (String localOrderBy : orderBy.split(",")) {
+      if (orderPrimaryKeyInDesc && localOrderBy.equals("id")) {
+        localOrderBy = "-".concat(localOrderBy);
+      }
       if (!firstElement) {
         sb.append(",");
       }
--- a/modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODULE.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODULE.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -6,7 +6,7 @@
 <!--5EB4F15C80684ACA904756BDC12ADBE5-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--5EB4F15C80684ACA904756BDC12ADBE5-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--5EB4F15C80684ACA904756BDC12ADBE5-->  <NAME><![CDATA[User Interface Selector]]></NAME>
-<!--5EB4F15C80684ACA904756BDC12ADBE5-->  <VERSION><![CDATA[2.1.19003]]></VERSION>
+<!--5EB4F15C80684ACA904756BDC12ADBE5-->  <VERSION><![CDATA[2.1.19180]]></VERSION>
 <!--5EB4F15C80684ACA904756BDC12ADBE5-->  <DESCRIPTION><![CDATA[Provides a selector with a suggestion box and popup grid window]]></DESCRIPTION>
 <!--5EB4F15C80684ACA904756BDC12ADBE5-->  <HELP><![CDATA[The Openbravo selector provides new selector functionality which is used inside of existing Openbravo forms. The selector is mainly used for supporting foreign key references in the user interface. The selector combines both suggestion box behavior with a popup grid.]]></HELP>
 <!--5EB4F15C80684ACA904756BDC12ADBE5-->  <URL><![CDATA[http://forge.openbravo.com/projects/selector]]></URL>
--- a/modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -7,7 +7,7 @@
 <!--38825CAED43941D38CA0C78DB04FCFA0-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--38825CAED43941D38CA0C78DB04FCFA0-->  <AD_MODULE_ID><![CDATA[5EB4F15C80684ACA904756BDC12ADBE5]]></AD_MODULE_ID>
 <!--38825CAED43941D38CA0C78DB04FCFA0-->  <AD_DEPENDENT_MODULE_ID><![CDATA[EC356CEE3D46416CA1EBEEB9AB82EDB9]]></AD_DEPENDENT_MODULE_ID>
-<!--38825CAED43941D38CA0C78DB04FCFA0-->  <STARTVERSION><![CDATA[8.1.19003]]></STARTVERSION>
+<!--38825CAED43941D38CA0C78DB04FCFA0-->  <STARTVERSION><![CDATA[8.1.19180]]></STARTVERSION>
 <!--38825CAED43941D38CA0C78DB04FCFA0-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--38825CAED43941D38CA0C78DB04FCFA0-->  <DEPENDANT_MODULE_NAME><![CDATA[Smartclient]]></DEPENDANT_MODULE_NAME>
 <!--38825CAED43941D38CA0C78DB04FCFA0-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -21,7 +21,7 @@
 <!--6DDE7B1A70174242AF82B5022FB89279-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--6DDE7B1A70174242AF82B5022FB89279-->  <AD_MODULE_ID><![CDATA[5EB4F15C80684ACA904756BDC12ADBE5]]></AD_MODULE_ID>
 <!--6DDE7B1A70174242AF82B5022FB89279-->  <AD_DEPENDENT_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_DEPENDENT_MODULE_ID>
-<!--6DDE7B1A70174242AF82B5022FB89279-->  <STARTVERSION><![CDATA[2.1.19003]]></STARTVERSION>
+<!--6DDE7B1A70174242AF82B5022FB89279-->  <STARTVERSION><![CDATA[2.1.19180]]></STARTVERSION>
 <!--6DDE7B1A70174242AF82B5022FB89279-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--6DDE7B1A70174242AF82B5022FB89279-->  <DEPENDANT_MODULE_NAME><![CDATA[User Interface Application]]></DEPENDANT_MODULE_NAME>
 <!--6DDE7B1A70174242AF82B5022FB89279-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -35,7 +35,7 @@
 <!--94F9CD2CB5EF4467A67475C786C984A7-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--94F9CD2CB5EF4467A67475C786C984A7-->  <AD_MODULE_ID><![CDATA[5EB4F15C80684ACA904756BDC12ADBE5]]></AD_MODULE_ID>
 <!--94F9CD2CB5EF4467A67475C786C984A7-->  <AD_DEPENDENT_MODULE_ID><![CDATA[4B828F4D03264080AA1D2057B13F613C]]></AD_DEPENDENT_MODULE_ID>
-<!--94F9CD2CB5EF4467A67475C786C984A7-->  <STARTVERSION><![CDATA[2.1.19003]]></STARTVERSION>
+<!--94F9CD2CB5EF4467A67475C786C984A7-->  <STARTVERSION><![CDATA[2.1.19180]]></STARTVERSION>
 <!--94F9CD2CB5EF4467A67475C786C984A7-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--94F9CD2CB5EF4467A67475C786C984A7-->  <DEPENDANT_MODULE_NAME><![CDATA[User Interface Client Kernel]]></DEPENDANT_MODULE_NAME>
 <!--94F9CD2CB5EF4467A67475C786C984A7-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -49,7 +49,7 @@
 <!--BCCB5A08EC0446DE8BCE191C6BC607A4-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--BCCB5A08EC0446DE8BCE191C6BC607A4-->  <AD_MODULE_ID><![CDATA[5EB4F15C80684ACA904756BDC12ADBE5]]></AD_MODULE_ID>
 <!--BCCB5A08EC0446DE8BCE191C6BC607A4-->  <AD_DEPENDENT_MODULE_ID><![CDATA[C70732EA90A14EC0916078B85CC33D2D]]></AD_DEPENDENT_MODULE_ID>
-<!--BCCB5A08EC0446DE8BCE191C6BC607A4-->  <STARTVERSION><![CDATA[1.1.19003]]></STARTVERSION>
+<!--BCCB5A08EC0446DE8BCE191C6BC607A4-->  <STARTVERSION><![CDATA[1.1.19180]]></STARTVERSION>
 <!--BCCB5A08EC0446DE8BCE191C6BC607A4-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--BCCB5A08EC0446DE8BCE191C6BC607A4-->  <DEPENDANT_MODULE_NAME><![CDATA[JBoss Weld]]></DEPENDANT_MODULE_NAME>
 <!--BCCB5A08EC0446DE8BCE191C6BC607A4-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -63,7 +63,7 @@
 <!--C8DAC574B88649D08C9468521B343F12-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--C8DAC574B88649D08C9468521B343F12-->  <AD_MODULE_ID><![CDATA[5EB4F15C80684ACA904756BDC12ADBE5]]></AD_MODULE_ID>
 <!--C8DAC574B88649D08C9468521B343F12-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--C8DAC574B88649D08C9468521B343F12-->  <STARTVERSION><![CDATA[3.0.19003]]></STARTVERSION>
+<!--C8DAC574B88649D08C9468521B343F12-->  <STARTVERSION><![CDATA[3.0.19180]]></STARTVERSION>
 <!--C8DAC574B88649D08C9468521B343F12-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--C8DAC574B88649D08C9468521B343F12-->  <DEPENDANT_MODULE_NAME><![CDATA[core]]></DEPENDANT_MODULE_NAME>
 <!--C8DAC574B88649D08C9468521B343F12-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -77,7 +77,7 @@
 <!--F14EB17946BE4724A46F80CB1A47EC70-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--F14EB17946BE4724A46F80CB1A47EC70-->  <AD_MODULE_ID><![CDATA[5EB4F15C80684ACA904756BDC12ADBE5]]></AD_MODULE_ID>
 <!--F14EB17946BE4724A46F80CB1A47EC70-->  <AD_DEPENDENT_MODULE_ID><![CDATA[A44B9BA75C354D8FB2E3F7D6EB6BFDC4]]></AD_DEPENDENT_MODULE_ID>
-<!--F14EB17946BE4724A46F80CB1A47EC70-->  <STARTVERSION><![CDATA[2.1.19003]]></STARTVERSION>
+<!--F14EB17946BE4724A46F80CB1A47EC70-->  <STARTVERSION><![CDATA[2.1.19180]]></STARTVERSION>
 <!--F14EB17946BE4724A46F80CB1A47EC70-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--F14EB17946BE4724A46F80CB1A47EC70-->  <DEPENDANT_MODULE_NAME><![CDATA[JSON Datasource]]></DEPENDANT_MODULE_NAME>
 <!--F14EB17946BE4724A46F80CB1A47EC70-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js	Thu Jan 10 13:17:14 2013 +0100
@@ -512,7 +512,9 @@
     }
 
     // only jump to the next field if the value has really been set
-    if (currentValue && this.form.focusInNextItem) {
+    // do not jump to the next field if the event has been triggered by the Tab key,
+    // to prevent a field from being skipped (see https://issues.openbravo.com/view.php?id=21419)
+    if (currentValue && this.form.focusInNextItem && isc.EH.getKeyName() !== 'Tab') {
       this.form.focusInNextItem(this.name);
     }
   },
--- a/modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -6,7 +6,7 @@
 <!--96998CBC42744B3DBEE28AC8095C9335-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--96998CBC42744B3DBEE28AC8095C9335-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--96998CBC42744B3DBEE28AC8095C9335-->  <NAME><![CDATA[2.50 to 3.00 Compatibility Skin]]></NAME>
-<!--96998CBC42744B3DBEE28AC8095C9335-->  <VERSION><![CDATA[2.0.19003]]></VERSION>
+<!--96998CBC42744B3DBEE28AC8095C9335-->  <VERSION><![CDATA[2.0.19180]]></VERSION>
 <!--96998CBC42744B3DBEE28AC8095C9335-->  <DESCRIPTION><![CDATA[Skin module to proper visualization of classic windows inside the MDI interface]]></DESCRIPTION>
 <!--96998CBC42744B3DBEE28AC8095C9335-->  <HELP><![CDATA[With this skin module the classic windows styles will display in a way more coherent with the new 3.00 styles]]></HELP>
 <!--96998CBC42744B3DBEE28AC8095C9335-->  <URL><![CDATA[www.openbravo.com]]></URL>
--- a/modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -7,7 +7,7 @@
 <!--39BF75AD9AB3453698BF5DE29E727AA9-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--39BF75AD9AB3453698BF5DE29E727AA9-->  <AD_MODULE_ID><![CDATA[96998CBC42744B3DBEE28AC8095C9335]]></AD_MODULE_ID>
 <!--39BF75AD9AB3453698BF5DE29E727AA9-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--39BF75AD9AB3453698BF5DE29E727AA9-->  <STARTVERSION><![CDATA[3.0.19003]]></STARTVERSION>
+<!--39BF75AD9AB3453698BF5DE29E727AA9-->  <STARTVERSION><![CDATA[3.0.19180]]></STARTVERSION>
 <!--39BF75AD9AB3453698BF5DE29E727AA9-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--39BF75AD9AB3453698BF5DE29E727AA9-->  <DEPENDANT_MODULE_NAME><![CDATA[core]]></DEPENDANT_MODULE_NAME>
 <!--39BF75AD9AB3453698BF5DE29E727AA9-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.userinterface.smartclient/src-db/database/sourcedata/AD_MODULE.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.userinterface.smartclient/src-db/database/sourcedata/AD_MODULE.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -6,7 +6,7 @@
 <!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <NAME><![CDATA[Smartclient]]></NAME>
-<!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <VERSION><![CDATA[8.1.19003]]></VERSION>
+<!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <VERSION><![CDATA[8.1.19180]]></VERSION>
 <!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <DESCRIPTION><![CDATA[SmartClient libraries for use within Openbravo]]></DESCRIPTION>
 <!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <HELP><![CDATA[This module contains the SmartClient libraries for usage by other modules. It also contains some simple test pages to validate that SmartClient is working correctly. Also contains generic Openbravo SmartClient components]]></HELP>
 <!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <URL><![CDATA[http://forge.openbravo.com/projects/obsmartclient]]></URL>
--- a/modules/org.openbravo.userinterface.smartclient/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.userinterface.smartclient/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -7,7 +7,7 @@
 <!--086331E18477496B8AC74D2CFEBD1307-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--086331E18477496B8AC74D2CFEBD1307-->  <AD_MODULE_ID><![CDATA[EC356CEE3D46416CA1EBEEB9AB82EDB9]]></AD_MODULE_ID>
 <!--086331E18477496B8AC74D2CFEBD1307-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--086331E18477496B8AC74D2CFEBD1307-->  <STARTVERSION><![CDATA[3.0.19003]]></STARTVERSION>
+<!--086331E18477496B8AC74D2CFEBD1307-->  <STARTVERSION><![CDATA[3.0.19180]]></STARTVERSION>
 <!--086331E18477496B8AC74D2CFEBD1307-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--086331E18477496B8AC74D2CFEBD1307-->  <DEPENDANT_MODULE_NAME><![CDATA[core]]></DEPENDANT_MODULE_NAME>
 <!--086331E18477496B8AC74D2CFEBD1307-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -21,7 +21,7 @@
 <!--DC5D4EF450244482BD2B458DAA496333-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--DC5D4EF450244482BD2B458DAA496333-->  <AD_MODULE_ID><![CDATA[EC356CEE3D46416CA1EBEEB9AB82EDB9]]></AD_MODULE_ID>
 <!--DC5D4EF450244482BD2B458DAA496333-->  <AD_DEPENDENT_MODULE_ID><![CDATA[4B828F4D03264080AA1D2057B13F613C]]></AD_DEPENDENT_MODULE_ID>
-<!--DC5D4EF450244482BD2B458DAA496333-->  <STARTVERSION><![CDATA[2.1.19003]]></STARTVERSION>
+<!--DC5D4EF450244482BD2B458DAA496333-->  <STARTVERSION><![CDATA[2.1.19180]]></STARTVERSION>
 <!--DC5D4EF450244482BD2B458DAA496333-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--DC5D4EF450244482BD2B458DAA496333-->  <DEPENDANT_MODULE_NAME><![CDATA[User Interface Client Kernel]]></DEPENDANT_MODULE_NAME>
 <!--DC5D4EF450244482BD2B458DAA496333-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -35,7 +35,7 @@
 <!--F2AF15C0AF5540E393D96BE506E20648-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--F2AF15C0AF5540E393D96BE506E20648-->  <AD_MODULE_ID><![CDATA[EC356CEE3D46416CA1EBEEB9AB82EDB9]]></AD_MODULE_ID>
 <!--F2AF15C0AF5540E393D96BE506E20648-->  <AD_DEPENDENT_MODULE_ID><![CDATA[C70732EA90A14EC0916078B85CC33D2D]]></AD_DEPENDENT_MODULE_ID>
-<!--F2AF15C0AF5540E393D96BE506E20648-->  <STARTVERSION><![CDATA[1.1.19003]]></STARTVERSION>
+<!--F2AF15C0AF5540E393D96BE506E20648-->  <STARTVERSION><![CDATA[1.1.19180]]></STARTVERSION>
 <!--F2AF15C0AF5540E393D96BE506E20648-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--F2AF15C0AF5540E393D96BE506E20648-->  <DEPENDANT_MODULE_NAME><![CDATA[JBoss Weld]]></DEPENDANT_MODULE_NAME>
 <!--F2AF15C0AF5540E393D96BE506E20648-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/isomorphic/ISC_Combined.js	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/isomorphic/ISC_Combined.js	Thu Jan 10 13:17:14 2013 +0100
@@ -6892,7 +6892,7 @@
 if(!this.cacheDOM&&!this.isPrinting){_31.append("<DIV style='width:1px;");if(_43){_31.append("height:",_41,"px;overflow:hidden;")}
 if(_41==0)_31.append("display:none;");_31.append("' ");if(_13||this.isPrinting){_31.append(">")}else{_31.append(" ID="+this.getID()+"$471>")}
 _31.append(isc.Canvas.spacerHTML(1,_41),"</DIV>")}
-if(!this.$47s||(_2==0&&!this.printChunkOnly)){_31.append("<TABLE role='presentation' BORDER=0",_39,((!_13&&!this.isPrinting)?" ID="+this.getTableElementId():null),(this.tableStyle&&isc.Browser.isDOM?" CLASS='"+this.tableStyle+this.$sm:isc.$ah)," CELLSPACING=",this.cellSpacing," CELLPADDING=",this.cellPadding," STYLE='",(isc.Browser.isDOM&&!_38&&this.fixedColumnWidths?"table-layout:fixed;overflow:hidden;wrap:false;":""),(!_30?_37+(this.isRTL()?"-right: ":"-left:")+_34+"px;"+_37+(this.isRTL()?"-left:":"-right:")+_35+"px;":""),(this.cacheDOM&&this.$47z>0?"margin-top:"+this.$47z+"px;":""),(this.$46p!=null&&!(isc.Browser.isIE&&this.$xa)?"visibility:hidden;":""),"'>",(isc.Browser.isMoz?"<TBODY>":""));var _45=0,_46=0,_47=this.$472();if(isc.Browser.isStrict&&(isc.Browser.isSafari||isc.Browser.isIE)){if((isc.Browser.isIE&&isc.Browser.version<8)||(isc.Browser.isSafari&&isc.Browser.safariVersion<530))
+if(!this.$47s||(_2==0&&!this.printChunkOnly)){_31.append("<TABLE role='presentation' BORDER=0",_39,((!_13&&!this.isPrinting)?" ID="+this.getTableElementId():null),(this.tableStyle&&isc.Browser.isDOM?" CLASS='"+this.tableStyle+this.$sm:isc.$ah)," CELLSPACING=",this.cellSpacing," CELLPADDING=",this.cellPadding," STYLE='",(isc.Browser.isDOM&&!_38&&this.fixedColumnWidths?"table-layout:fixed;overflow:hidden;wrap:false;":""),(!_30?_37+(this.isRTL()?"-right: ":"-left:")+_34+"px;"+_37+(this.isRTL()?"-left:":"-right:")+_35+"px;":""),(this.cacheDOM&&this.$47z>0?"margin-top:"+this.$47z+"px;":""),(this.$46p!=null&&!(isc.Browser.isIE&&this.$xa)?"visibility:hidden;":""),"'>",(isc.Browser.isMoz?"<TBODY>":""));var _45=0,_46=0,_47=this.$472();if(isc.Browser.isStrict&&((isc.Browser.isMoz&&isc.Browser.version>=17)||(isc.Browser.isSafari||isc.Browser.isIE))){if((isc.Browser.isIE&&isc.Browser.version<8)||(isc.Browser.isSafari&&isc.Browser.safariVersion<530))
 {_46=this.$473()}
 _45=(this.fixedRowHeights?0:this.cellPadding*2);_45+=isc.Element.$rg(_47)}
 this.$474=_45;this.$475=_46;if(!_38&&isc.Browser.isDOM){for(var i=0;i<_28.length;i++){_31.append("<COL WIDTH=",(_33[_28[i]]-_46),">")}}
@@ -7064,7 +7064,7 @@
 {return _2}
 return null}
 ,isc.A.setRowHeight=function isc_GridRenderer_setRowHeight(_1,_2,_3,_4,_5,_6){var _7=this.$61,_8=this.$461;if(_5==null){if(_3==null)_3=this.getCellRecord(_1,_7);_5=this.fixedRowHeights&&(this.shouldFixRowHeight==null||this.shouldFixRowHeight(_3,_1)!=false)}
-var _9=this.getTableElement(_1,_7),_10=_9?parseInt(_9.height):null,_11;if(!isc.isA.Number(_10))_10=null;if((isc.Browser.isSafari||isc.Browser.isIE)&&isc.Browser.isStrict){if(_3==null)_3=this.getCellRecord(_1,_7);var _12=_4;if(_12==null)_12=this.getCellStyle(_3,_1,_7)
+var _9=this.getTableElement(_1,_7),_10=_9?parseInt(_9.height):null,_11;if(!isc.isA.Number(_10))_10=null;if(isc.Browser.isStrict&&((isc.Browser.isMoz&&isc.Browser.version>=17)||(isc.Browser.isSafari||isc.Browser.isIE))){if(_3==null)_3=this.getCellRecord(_1,_7);var _12=_4;if(_12==null)_12=this.getCellStyle(_3,_1,_7)
 _2-=isc.Element.$rg(_12);if(!this.fixedRowHeights)_2-=(this.cellPadding*2)}
 if((!_5&&_10!=null)||(_10!=_2&&!(_10==null&&_2==isc.emptyString)))
 {_11=true}
@@ -14258,7 +14258,7 @@
 );isc.B._maxIndex=isc.C+72;isc.ValuesManager.registerStringMethods({handleHiddenValidationErrors:"errors",submitValues:"values,valuesManager"});if(isc.Window){isc.ClassFactory.defineClass("ColorPicker",isc.Window);isc.A=isc.ColorPicker;isc.A.MORE_BUTTON_TITLE="More >>";isc.A.LESS_BUTTON_TITLE="<< Less";isc.A=isc.ColorPicker;isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.B.push(isc.A.getSharedColorPicker=function isc_c_ColorPicker_getSharedColorPicker(_1,_2){_1=_1||{};if(!isc.isA.ColorPicker(this.$370)){this.$370=isc.ColorPicker.create(_1)}else{if(_1.colorSelected==null)delete this.$370.colorSelected;if(_1.colorChanged==null)delete this.$370.colorChanged;this.$370.setProperties(_1)}
 if(!_2){var _3=this.$370;if(_3.$371!=_3.defaultPickMode){_3.$371=_3.defaultPickMode;if(_3.$371=='simple'){_3.removeComplexElements();if(_3.allowComplexMode){_3.modeToggleButton.setTitle(isc.ColorPicker.MORE_BUTTON_TITLE)}}else{if(!_3.$372){_3.createComplexElements()}
 _3.addComplexElements();_3.modeToggleButton.setTitle(isc.ColorPicker.LESS_BUTTON_TITLE)}}
-_3.setHtmlColor(_3.defaultColor);_3.$373=this.defaultOpacity}
+_3.setHtmlColor(_3.defaultColor);_3.setOpacity(_3.defaultOpacity)}
 return this.$370}
 );isc.B._maxIndex=isc.C+1;isc.addGlobal("ColorChooser",isc.ColorPicker);isc.A=isc.ColorPicker.getPrototype();isc.B=isc._allFuncs;isc.C=isc.B._maxIndex;isc.D=isc._funcClasses;isc.D[isc.C]=isc.A.Class;isc.A.title="Select a Color";isc.A.autoSize=true;isc.A.isModal=true;isc.A.autoCenter=true;isc.A.autoDraw=false;isc.A.showMinimizeButton=false;isc.A.layoutMargin=2;isc.A.canFocus=false;isc.A.showOkButton=true;isc.A.okButtonConstructor=isc.IButton;isc.A.okButtonDefaults={title:"OK",width:80,autoParent:"buttonLayout",click:function(){if(this.creator.colorSelected){this.creator.colorSelected(this.creator.getHtmlColor(),this.creator.getOpacity())}
 this.creator.hide()}};isc.A.showCancelButton=true;isc.A.cancelButtonConstructor=isc.IButton;isc.A.cancelButtonDefaults={title:"Cancel",width:80,autoParent:"buttonLayout",click:function(){this.creator.hide()}};isc.A.showModeToggleButton=true;isc.A.modeToggleButtonConstructor=isc.IButton;isc.A.modeToggleButtonDefaults={title:isc.ColorPicker.MORE_BUTTON_TITLE,width:80,autoParent:"buttonLayout",click:function(){this.creator.$374()}};isc.A.showButtonLayout=true;isc.A.buttonLayoutConstructor="HLayout";isc.A.buttonLayoutDefaults={autoParent:"contentLayout"};isc.A.defaultColor="#808080";isc.A.colorButtonSize=20;isc.A.colorButtonBaseStyle="colorChooserCell";isc.A.colorArray=["#000000","#996100","#636300","#006300","#006366","#000080","#636399","#636363","#800000","#FF6600","#808000","#8000FF","#008080","#0000FF","#666699","#808080","#FF0000","#FF9900","#99CC00","#639966","#63CCCC","#6366FF","#800080","#999999","#FF00FF","#FFCC00","#FFFF00","#00FF00","#00FFFF","#00CCFF","#996366","#C0C0C0","#FF99CC","#FFCC99","#FFFF99","#CCFFCC","#CCFFFF","#99CCFF","#CC99FF","#FFFFFF"];isc.A.swatchWidth=170;isc.A.swatchHeight=170;isc.A.lumStep=4;isc.A.lumWidth=15;isc.A.supportsTransparency=true;isc.A.opacityText="Lorem ipsum dolor sit amet, consectetuer adipiscing elit.";isc.A.swatchImageURL="[SKIN]ColorPicker/spectrum.png";isc.A.crosshairImageURL="[SKIN]ColorPicker/crosshair.png";isc.A.basicColorLabel="Basic Colors:";isc.A.selectedColorLabel="Selected Color:";isc.A.opacitySliderLabel="Opacity:";isc.A.defaultOpacity=100;isc.A.autoPosition=true;isc.A.autoCenterOnShow=true;isc.A.defaultPickMode="simple";isc.A.allowComplexMode=true;isc.A.$375=true;isc.B.push(isc.A.closeClick=function isc_ColorPicker_closeClick(){this.hide()}
@@ -14310,13 +14310,14 @@
 if(this.$375===true)
 this.$38t('html')}}
 ,isc.A.setOpacity=function isc_ColorPicker_setOpacity(_1){if(this.$371=='complex'&&this.supportsTransparency){if(_1<0)this.$373=0;else if(_1>100)this.$373=100;else this.$373=_1/ 1;if(this.$375===true)
-this.$38t('opacity')}}
+{this.$38t('opacity');}}}
 ,isc.A.$38t=function isc_ColorPicker__changeColor(_1){if(_1=='rgb'){var _2=isc.ColorUtils.rgbToHsl(this.$378,this.$379,this.$38a);this.$375=false;this.setHue(_2.h);this.setSaturation(_2.s);this.setLuminosity(_2.l);this.setHtmlColor(isc.ColorUtils.rgbToHtml(this.$378,this.$379,this.$38a));this.$375=true;this.$38s(this.$38d,this.$38e)}else if(_1=='hsl'){var _3=isc.ColorUtils.hslToRgb(this.$38d,this.$38e,this.$38f);this.$375=false;this.setRed(_3.r);this.setGreen(_3.g);this.setBlue(_3.b);this.setHtmlColor(isc.ColorUtils.rgbToHtml(this.$378,this.$379,this.$38a));this.$375=true;if(this.$38d!=this.$38u||this.$38e!=this.$38v){this.$38s(this.$38d,this.$38e)}}else if(_1=='html'){var _3=isc.ColorUtils.htmlToRgb(this.$38b);this.$375=false;this.setRed(_3.r);this.setGreen(_3.g);this.setBlue(_3.b);var _2=isc.ColorUtils.rgbToHsl(this.$378,this.$379,this.$38a);this.setHue(_2.h);this.setSaturation(_2.s);this.setLuminosity(_2.l);this.$375=true;this.$38s(this.$38d,this.$38e)}
 if(this.$371=='complex'){this.$38m.setValue(this.$38f)}
 if(this.$371=='complex'){this.$38j.setBackgroundColor(isc.ColorUtils.hslToHtml(this.$38d,this.$38e,this.$38f))}
 if(this.$38d!=this.$38u||this.$38e!=this.$38v){this.$377()}
-if(this.$371=='complex')
-this.$38j.setOpacity(this.$373);this.$38u=this.$38d;this.$38v=this.$38e;if(this.colorChanged)this.colorChanged()}
+if(this.$371=='complex'){
+this.$38j.setOpacity(this.$373);var slider=this.$38n,sliderVal=slider.getValue(),newSliderVal=this.$373;if(newSliderVal===null)newSliderVal=100;if(sliderVal!=newSliderVal)this.$38n.setValue(this.$373);
+}this.$38u=this.$38d;this.$38v=this.$38e;if(this.colorChanged)this.colorChanged()}
 ,isc.A.$376=function isc_ColorPicker__oneClickColorSelected(_1){this.hide();if(this.colorSelected)this.colorSelected(_1)}
 ,isc.A.$38s=function isc_ColorPicker__positionCrossHair(_1,_2){if(this.$371!='complex'){return}
 if(this.$38h===true){this.$38h=false;return}
--- a/modules/org.openbravo.v3.datasets/src-db/database/sourcedata/AD_MODULE.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.v3.datasets/src-db/database/sourcedata/AD_MODULE.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -6,7 +6,7 @@
 <!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <NAME><![CDATA[Standard Roles]]></NAME>
-<!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <VERSION><![CDATA[3.0.19003]]></VERSION>
+<!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <VERSION><![CDATA[3.0.19180]]></VERSION>
 <!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <DESCRIPTION><![CDATA[Pre-configured collection of standard ERP roles]]></DESCRIPTION>
 <!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <HELP><![CDATA[This dataset contains the following roles with their access to corresponding Openbravo entities - windows, reports, actions.
 * Employee - Any person of the enterprise
--- a/modules/org.openbravo.v3.datasets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.v3.datasets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -7,7 +7,7 @@
 <!--148A000EE9A04A3CA653B1296A00B8E6-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--148A000EE9A04A3CA653B1296A00B8E6-->  <AD_MODULE_ID><![CDATA[883B5872CA0548F9AF2BBBE7D2DDFA61]]></AD_MODULE_ID>
 <!--148A000EE9A04A3CA653B1296A00B8E6-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--148A000EE9A04A3CA653B1296A00B8E6-->  <STARTVERSION><![CDATA[3.0.19003]]></STARTVERSION>
+<!--148A000EE9A04A3CA653B1296A00B8E6-->  <STARTVERSION><![CDATA[3.0.19180]]></STARTVERSION>
 <!--148A000EE9A04A3CA653B1296A00B8E6-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--148A000EE9A04A3CA653B1296A00B8E6-->  <DEPENDANT_MODULE_NAME><![CDATA[core]]></DEPENDANT_MODULE_NAME>
 <!--148A000EE9A04A3CA653B1296A00B8E6-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -21,7 +21,7 @@
 <!--30F966407A6F4E15965821BAEE34D25B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--30F966407A6F4E15965821BAEE34D25B-->  <AD_MODULE_ID><![CDATA[883B5872CA0548F9AF2BBBE7D2DDFA61]]></AD_MODULE_ID>
 <!--30F966407A6F4E15965821BAEE34D25B-->  <AD_DEPENDENT_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_DEPENDENT_MODULE_ID>
-<!--30F966407A6F4E15965821BAEE34D25B-->  <STARTVERSION><![CDATA[3.0.19003]]></STARTVERSION>
+<!--30F966407A6F4E15965821BAEE34D25B-->  <STARTVERSION><![CDATA[3.0.19180]]></STARTVERSION>
 <!--30F966407A6F4E15965821BAEE34D25B-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--30F966407A6F4E15965821BAEE34D25B-->  <DEPENDANT_MODULE_NAME><![CDATA[Advanced Payables and Receivables Mngmt]]></DEPENDANT_MODULE_NAME>
 <!--30F966407A6F4E15965821BAEE34D25B-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -35,7 +35,7 @@
 <!--F93CE30003B24F8F8886510B0065EECC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--F93CE30003B24F8F8886510B0065EECC-->  <AD_MODULE_ID><![CDATA[883B5872CA0548F9AF2BBBE7D2DDFA61]]></AD_MODULE_ID>
 <!--F93CE30003B24F8F8886510B0065EECC-->  <AD_DEPENDENT_MODULE_ID><![CDATA[3A3A943684D64DEF9EC39F588A656848]]></AD_DEPENDENT_MODULE_ID>
-<!--F93CE30003B24F8F8886510B0065EECC-->  <STARTVERSION><![CDATA[1.1.19003]]></STARTVERSION>
+<!--F93CE30003B24F8F8886510B0065EECC-->  <STARTVERSION><![CDATA[1.1.19180]]></STARTVERSION>
 <!--F93CE30003B24F8F8886510B0065EECC-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--F93CE30003B24F8F8886510B0065EECC-->  <DEPENDANT_MODULE_NAME><![CDATA[Orders Awaiting Delivery]]></DEPENDANT_MODULE_NAME>
 <!--F93CE30003B24F8F8886510B0065EECC-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.v3.framework/src-db/database/sourcedata/AD_MODULE.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.v3.framework/src-db/database/sourcedata/AD_MODULE.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -6,7 +6,7 @@
 <!--7E48CDD73B7E493A8BED4F7253E7C989-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--7E48CDD73B7E493A8BED4F7253E7C989-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--7E48CDD73B7E493A8BED4F7253E7C989-->  <NAME><![CDATA[Openbravo 3.0 Framework]]></NAME>
-<!--7E48CDD73B7E493A8BED4F7253E7C989-->  <VERSION><![CDATA[2.1.19003]]></VERSION>
+<!--7E48CDD73B7E493A8BED4F7253E7C989-->  <VERSION><![CDATA[2.1.19180]]></VERSION>
 <!--7E48CDD73B7E493A8BED4F7253E7C989-->  <DESCRIPTION><![CDATA[Openbravo 3.0 Framework]]></DESCRIPTION>
 <!--7E48CDD73B7E493A8BED4F7253E7C989-->  <HELP><![CDATA[Contains all the components required to run the Openbravo 3.0 framework]]></HELP>
 <!--7E48CDD73B7E493A8BED4F7253E7C989-->  <URL><![CDATA[http://forge.openbravo.com/projects/openbravov30framework]]></URL>
--- a/modules/org.openbravo.v3.framework/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.v3.framework/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -7,7 +7,7 @@
 <!--01E1BCCEC9114DE0960538DF34E30E6F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--01E1BCCEC9114DE0960538DF34E30E6F-->  <AD_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_MODULE_ID>
 <!--01E1BCCEC9114DE0960538DF34E30E6F-->  <AD_DEPENDENT_MODULE_ID><![CDATA[2758CD25B2704AF6BBAD10365FC82C06]]></AD_DEPENDENT_MODULE_ID>
-<!--01E1BCCEC9114DE0960538DF34E30E6F-->  <STARTVERSION><![CDATA[2.1.19003]]></STARTVERSION>
+<!--01E1BCCEC9114DE0960538DF34E30E6F-->  <STARTVERSION><![CDATA[2.1.19180]]></STARTVERSION>
 <!--01E1BCCEC9114DE0960538DF34E30E6F-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--01E1BCCEC9114DE0960538DF34E30E6F-->  <DEPENDANT_MODULE_NAME><![CDATA[My Openbravo Tab]]></DEPENDANT_MODULE_NAME>
 <!--01E1BCCEC9114DE0960538DF34E30E6F-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -21,7 +21,7 @@
 <!--025B181F63CA47B48A920F6983242390-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--025B181F63CA47B48A920F6983242390-->  <AD_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_MODULE_ID>
 <!--025B181F63CA47B48A920F6983242390-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--025B181F63CA47B48A920F6983242390-->  <STARTVERSION><![CDATA[3.0.19003]]></STARTVERSION>
+<!--025B181F63CA47B48A920F6983242390-->  <STARTVERSION><![CDATA[3.0.19180]]></STARTVERSION>
 <!--025B181F63CA47B48A920F6983242390-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--025B181F63CA47B48A920F6983242390-->  <DEPENDANT_MODULE_NAME><![CDATA[core]]></DEPENDANT_MODULE_NAME>
 <!--025B181F63CA47B48A920F6983242390-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -35,7 +35,7 @@
 <!--054B4FEAF919478AA3FF27098A46D1D6-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--054B4FEAF919478AA3FF27098A46D1D6-->  <AD_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_MODULE_ID>
 <!--054B4FEAF919478AA3FF27098A46D1D6-->  <AD_DEPENDENT_MODULE_ID><![CDATA[9BA0836A3CD74EE4AB48753A47211BCC]]></AD_DEPENDENT_MODULE_ID>
-<!--054B4FEAF919478AA3FF27098A46D1D6-->  <STARTVERSION><![CDATA[2.1.19003]]></STARTVERSION>
+<!--054B4FEAF919478AA3FF27098A46D1D6-->  <STARTVERSION><![CDATA[2.1.19180]]></STARTVERSION>
 <!--054B4FEAF919478AA3FF27098A46D1D6-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--054B4FEAF919478AA3FF27098A46D1D6-->  <DEPENDANT_MODULE_NAME><![CDATA[User Interface Application]]></DEPENDANT_MODULE_NAME>
 <!--054B4FEAF919478AA3FF27098A46D1D6-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -49,7 +49,7 @@
 <!--1FA6BAA6DC3A4434A6E62A0D1319A9D7-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--1FA6BAA6DC3A4434A6E62A0D1319A9D7-->  <AD_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_MODULE_ID>
 <!--1FA6BAA6DC3A4434A6E62A0D1319A9D7-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0A060B2AF1974E8EAA8DB61388E9AECC]]></AD_DEPENDENT_MODULE_ID>
-<!--1FA6BAA6DC3A4434A6E62A0D1319A9D7-->  <STARTVERSION><![CDATA[1.0.19003]]></STARTVERSION>
+<!--1FA6BAA6DC3A4434A6E62A0D1319A9D7-->  <STARTVERSION><![CDATA[1.0.19180]]></STARTVERSION>
 <!--1FA6BAA6DC3A4434A6E62A0D1319A9D7-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--1FA6BAA6DC3A4434A6E62A0D1319A9D7-->  <DEPENDANT_MODULE_NAME><![CDATA[Query/List Widget]]></DEPENDANT_MODULE_NAME>
 <!--1FA6BAA6DC3A4434A6E62A0D1319A9D7-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -63,7 +63,7 @@
 <!--224754C3EF674C93B0D468F47BAAB824-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--224754C3EF674C93B0D468F47BAAB824-->  <AD_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_MODULE_ID>
 <!--224754C3EF674C93B0D468F47BAAB824-->  <AD_DEPENDENT_MODULE_ID><![CDATA[5EB4F15C80684ACA904756BDC12ADBE5]]></AD_DEPENDENT_MODULE_ID>
-<!--224754C3EF674C93B0D468F47BAAB824-->  <STARTVERSION><![CDATA[2.1.19003]]></STARTVERSION>
+<!--224754C3EF674C93B0D468F47BAAB824-->  <STARTVERSION><![CDATA[2.1.19180]]></STARTVERSION>
 <!--224754C3EF674C93B0D468F47BAAB824-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--224754C3EF674C93B0D468F47BAAB824-->  <DEPENDANT_MODULE_NAME><![CDATA[User Interface Selector]]></DEPENDANT_MODULE_NAME>
 <!--224754C3EF674C93B0D468F47BAAB824-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -77,7 +77,7 @@
 <!--5B72D24032DD4879A950194139D961B6-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--5B72D24032DD4879A950194139D961B6-->  <AD_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_MODULE_ID>
 <!--5B72D24032DD4879A950194139D961B6-->  <AD_DEPENDENT_MODULE_ID><![CDATA[A44B9BA75C354D8FB2E3F7D6EB6BFDC4]]></AD_DEPENDENT_MODULE_ID>
-<!--5B72D24032DD4879A950194139D961B6-->  <STARTVERSION><![CDATA[2.1.19003]]></STARTVERSION>
+<!--5B72D24032DD4879A950194139D961B6-->  <STARTVERSION><![CDATA[2.1.19180]]></STARTVERSION>
 <!--5B72D24032DD4879A950194139D961B6-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--5B72D24032DD4879A950194139D961B6-->  <DEPENDANT_MODULE_NAME><![CDATA[JSON Datasource]]></DEPENDANT_MODULE_NAME>
 <!--5B72D24032DD4879A950194139D961B6-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -91,7 +91,7 @@
 <!--8730CA6A4224439D82E0DD31B3806E36-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--8730CA6A4224439D82E0DD31B3806E36-->  <AD_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_MODULE_ID>
 <!--8730CA6A4224439D82E0DD31B3806E36-->  <AD_DEPENDENT_MODULE_ID><![CDATA[D393BE6F22BB44B7B728259B34FC795A]]></AD_DEPENDENT_MODULE_ID>
-<!--8730CA6A4224439D82E0DD31B3806E36-->  <STARTVERSION><![CDATA[1.0.19003]]></STARTVERSION>
+<!--8730CA6A4224439D82E0DD31B3806E36-->  <STARTVERSION><![CDATA[1.0.19180]]></STARTVERSION>
 <!--8730CA6A4224439D82E0DD31B3806E36-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--8730CA6A4224439D82E0DD31B3806E36-->  <DEPENDANT_MODULE_NAME><![CDATA[HTML Widget]]></DEPENDANT_MODULE_NAME>
 <!--8730CA6A4224439D82E0DD31B3806E36-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -105,7 +105,7 @@
 <!--98C47FF058F8413B8A2B26036061446E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--98C47FF058F8413B8A2B26036061446E-->  <AD_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_MODULE_ID>
 <!--98C47FF058F8413B8A2B26036061446E-->  <AD_DEPENDENT_MODULE_ID><![CDATA[EC356CEE3D46416CA1EBEEB9AB82EDB9]]></AD_DEPENDENT_MODULE_ID>
-<!--98C47FF058F8413B8A2B26036061446E-->  <STARTVERSION><![CDATA[8.1.19003]]></STARTVERSION>
+<!--98C47FF058F8413B8A2B26036061446E-->  <STARTVERSION><![CDATA[8.1.19180]]></STARTVERSION>
 <!--98C47FF058F8413B8A2B26036061446E-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--98C47FF058F8413B8A2B26036061446E-->  <DEPENDANT_MODULE_NAME><![CDATA[Smartclient]]></DEPENDANT_MODULE_NAME>
 <!--98C47FF058F8413B8A2B26036061446E-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -119,7 +119,7 @@
 <!--A6D7BA917B3B4DEABD7CA1BA00B01E8A-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--A6D7BA917B3B4DEABD7CA1BA00B01E8A-->  <AD_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_MODULE_ID>
 <!--A6D7BA917B3B4DEABD7CA1BA00B01E8A-->  <AD_DEPENDENT_MODULE_ID><![CDATA[96998CBC42744B3DBEE28AC8095C9335]]></AD_DEPENDENT_MODULE_ID>
-<!--A6D7BA917B3B4DEABD7CA1BA00B01E8A-->  <STARTVERSION><![CDATA[2.0.19003]]></STARTVERSION>
+<!--A6D7BA917B3B4DEABD7CA1BA00B01E8A-->  <STARTVERSION><![CDATA[2.0.19180]]></STARTVERSION>
 <!--A6D7BA917B3B4DEABD7CA1BA00B01E8A-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--A6D7BA917B3B4DEABD7CA1BA00B01E8A-->  <DEPENDANT_MODULE_NAME><![CDATA[2.50 to 3.00 Compatibility Skin]]></DEPENDANT_MODULE_NAME>
 <!--A6D7BA917B3B4DEABD7CA1BA00B01E8A-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -133,7 +133,7 @@
 <!--A9CB99330AF34944877F889DD8A0AB3C-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--A9CB99330AF34944877F889DD8A0AB3C-->  <AD_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_MODULE_ID>
 <!--A9CB99330AF34944877F889DD8A0AB3C-->  <AD_DEPENDENT_MODULE_ID><![CDATA[4B828F4D03264080AA1D2057B13F613C]]></AD_DEPENDENT_MODULE_ID>
-<!--A9CB99330AF34944877F889DD8A0AB3C-->  <STARTVERSION><![CDATA[2.1.19003]]></STARTVERSION>
+<!--A9CB99330AF34944877F889DD8A0AB3C-->  <STARTVERSION><![CDATA[2.1.19180]]></STARTVERSION>
 <!--A9CB99330AF34944877F889DD8A0AB3C-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--A9CB99330AF34944877F889DD8A0AB3C-->  <DEPENDANT_MODULE_NAME><![CDATA[User Interface Client Kernel]]></DEPENDANT_MODULE_NAME>
 <!--A9CB99330AF34944877F889DD8A0AB3C-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -147,7 +147,7 @@
 <!--E72A053A403C4A98A189C105B850ADB0-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--E72A053A403C4A98A189C105B850ADB0-->  <AD_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_MODULE_ID>
 <!--E72A053A403C4A98A189C105B850ADB0-->  <AD_DEPENDENT_MODULE_ID><![CDATA[C70732EA90A14EC0916078B85CC33D2D]]></AD_DEPENDENT_MODULE_ID>
-<!--E72A053A403C4A98A189C105B850ADB0-->  <STARTVERSION><![CDATA[1.1.19003]]></STARTVERSION>
+<!--E72A053A403C4A98A189C105B850ADB0-->  <STARTVERSION><![CDATA[1.1.19180]]></STARTVERSION>
 <!--E72A053A403C4A98A189C105B850ADB0-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--E72A053A403C4A98A189C105B850ADB0-->  <DEPENDANT_MODULE_NAME><![CDATA[JBoss Weld]]></DEPENDANT_MODULE_NAME>
 <!--E72A053A403C4A98A189C105B850ADB0-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -161,7 +161,7 @@
 <!--F62443FC17DA4C0E84FBCA9F2E5B68C0-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--F62443FC17DA4C0E84FBCA9F2E5B68C0-->  <AD_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_MODULE_ID>
 <!--F62443FC17DA4C0E84FBCA9F2E5B68C0-->  <AD_DEPENDENT_MODULE_ID><![CDATA[F8D1B3ECB3474E8DA5C216473C840DF1]]></AD_DEPENDENT_MODULE_ID>
-<!--F62443FC17DA4C0E84FBCA9F2E5B68C0-->  <STARTVERSION><![CDATA[2.0.19003]]></STARTVERSION>
+<!--F62443FC17DA4C0E84FBCA9F2E5B68C0-->  <STARTVERSION><![CDATA[2.0.19180]]></STARTVERSION>
 <!--F62443FC17DA4C0E84FBCA9F2E5B68C0-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--F62443FC17DA4C0E84FBCA9F2E5B68C0-->  <DEPENDANT_MODULE_NAME><![CDATA[JSON REST Webservice]]></DEPENDANT_MODULE_NAME>
 <!--F62443FC17DA4C0E84FBCA9F2E5B68C0-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.v3/src-db/database/sourcedata/AD_MODULE.xml	Fri Dec 21 16:24:55 2012 +0100
+++ b/modules/org.openbravo.v3/src-db/database/sourcedata/AD_MODULE.xml	Thu Jan 10 13:17:14 2013 +0100
@@ -6,7 +6,7 @@
 <!--0138E7A89B5E4DC3932462252801FFBC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--0138E7A89B5E4DC3932462252801FFBC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--0138E7A89B5E4DC3932462252801FFBC-->  <NAME><![CDATA[Openbravo 3.0]]></NAME>
-<!--0138E7A89B5E4DC3932462252801FFBC-->  <VERSION><![CDATA[3.0.19003]]></VERSION>