Merge with pi 3.0PR14Q3.6 default tip
authorGorka Ion Damián <gorkaion.damian@openbravo.com>
Wed, 11 Feb 2015 09:31:54 +0100
changeset 24129 f20634951622
parent 24072 34173eb858f9 (current diff)
parent 24128 628cb1400c02 (diff)
Merge with pi 3.0PR14Q3.6
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_AddPayment.java
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java
src-db/database/model/functions/C_INVOICE_POST.xml
src-db/database/model/functions/M_INOUT_POST.xml
src-db/database/sourcedata/AD_FIELD.xml
src-db/database/sourcedata/AD_TAB.xml
src-db/database/sourcedata/AD_TABLE.xml
Binary file modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/Issue28591UpdatePSD.class has changed
Binary file modules/org.openbravo.advpaymentmngt/build/classes/org/openbravo/advpaymentmngt/modulescript/Issue28591UpdatePSDData.class has changed
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE.xml	Wed Feb 11 09:31:54 2015 +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.24019]]></VERSION>
+<!--A918E3331C404B889D69AA9BFAFB23AC-->  <VERSION><![CDATA[3.0.24075]]></VERSION>
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <DESCRIPTION><![CDATA[Managing your finances with an ERP does not have to be difficult. Enjoy a radically improved user experience that combines the power of an enterprise grade financial application with the simplicity and ease of a web 2.0 personal accounting service.]]></DESCRIPTION>
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <HELP><![CDATA[Advanced Payables and Receivables Management simplifies and automates the business processes around the management of financial accounts, from the receipt and issue of payment, to the reconciliation of those events with bank statements.
 If you would like to help shape this module you are welcome to take part in the forum discussions or register feature requests or issues in the corresponding (Forum and Bug Tracking) sections in the Advanced Payables and Receivable project in the OB Forge.]]></HELP>
@@ -25,7 +25,7 @@
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <UPDATEINFO><![CDATA[Fixed issue with document sequence numbers reset in case of applying dataset second time.
 Fixed issue 15305.]]></UPDATEINFO>
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <REFERENCEDATAINFO><![CDATA[Document types and default algorithm for bank statement auto matching]]></REFERENCEDATAINFO>
-<!--A918E3331C404B889D69AA9BFAFB23AC-->  <VERSION_LABEL><![CDATA[PR14Q3.1]]></VERSION_LABEL>
+<!--A918E3331C404B889D69AA9BFAFB23AC-->  <VERSION_LABEL><![CDATA[PR14Q3.6]]></VERSION_LABEL>
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--A918E3331C404B889D69AA9BFAFB23AC-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--A918E3331C404B889D69AA9BFAFB23AC--></AD_MODULE>
--- a/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Feb 11 09:31:54 2015 +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.24019]]></STARTVERSION>
+<!--89326AE95DAD449D85DFAB2C5B1C6683-->  <STARTVERSION><![CDATA[2.1.24075]]></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.24019]]></STARTVERSION>
+<!--B97FC854C6DD41E692161585645A900F-->  <STARTVERSION><![CDATA[3.0.24075]]></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/OBUISEL_SELECTOR.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/OBUISEL_SELECTOR.xml	Wed Feb 11 09:31:54 2015 +0100
@@ -12,7 +12,7 @@
 <!--41B3A5EA61AB46FBAF4567E3755BA190-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--41B3A5EA61AB46FBAF4567E3755BA190-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--41B3A5EA61AB46FBAF4567E3755BA190-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--41B3A5EA61AB46FBAF4567E3755BA190-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--41B3A5EA61AB46FBAF4567E3755BA190-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--41B3A5EA61AB46FBAF4567E3755BA190-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--41B3A5EA61AB46FBAF4567E3755BA190--></OBUISEL_SELECTOR>
 
@@ -27,7 +27,7 @@
 <!--4C399E0BD7C34BAFA55FEAACA0568B31-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--4C399E0BD7C34BAFA55FEAACA0568B31-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--4C399E0BD7C34BAFA55FEAACA0568B31-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--4C399E0BD7C34BAFA55FEAACA0568B31-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--4C399E0BD7C34BAFA55FEAACA0568B31-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--4C399E0BD7C34BAFA55FEAACA0568B31-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--4C399E0BD7C34BAFA55FEAACA0568B31--></OBUISEL_SELECTOR>
 
@@ -43,7 +43,7 @@
 <!--5D29D4DFCF4440B8BF89420419A0DBFE-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--5D29D4DFCF4440B8BF89420419A0DBFE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--5D29D4DFCF4440B8BF89420419A0DBFE-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--5D29D4DFCF4440B8BF89420419A0DBFE-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--5D29D4DFCF4440B8BF89420419A0DBFE-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--5D29D4DFCF4440B8BF89420419A0DBFE-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--5D29D4DFCF4440B8BF89420419A0DBFE--></OBUISEL_SELECTOR>
 
@@ -64,7 +64,7 @@
 <!--6643B422022B41698FEFD6C7FAD7AC4B-->  <OBCLKER_TEMPLATE_ID><![CDATA[C1FD42039C804705B8E5012E4553433C]]></OBCLKER_TEMPLATE_ID>
 <!--6643B422022B41698FEFD6C7FAD7AC4B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--6643B422022B41698FEFD6C7FAD7AC4B-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--6643B422022B41698FEFD6C7FAD7AC4B-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--6643B422022B41698FEFD6C7FAD7AC4B-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--6643B422022B41698FEFD6C7FAD7AC4B-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--6643B422022B41698FEFD6C7FAD7AC4B--></OBUISEL_SELECTOR>
 
@@ -79,7 +79,7 @@
 <!--7811D4DBBB734D5ABB5DCC0CFDA21B88-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--7811D4DBBB734D5ABB5DCC0CFDA21B88-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--7811D4DBBB734D5ABB5DCC0CFDA21B88-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--7811D4DBBB734D5ABB5DCC0CFDA21B88-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--7811D4DBBB734D5ABB5DCC0CFDA21B88-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--7811D4DBBB734D5ABB5DCC0CFDA21B88-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--7811D4DBBB734D5ABB5DCC0CFDA21B88--></OBUISEL_SELECTOR>
 
@@ -96,7 +96,7 @@
 <!--9FAD469CE4414A25974CF45C0AD22D35-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--9FAD469CE4414A25974CF45C0AD22D35-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--9FAD469CE4414A25974CF45C0AD22D35-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--9FAD469CE4414A25974CF45C0AD22D35-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--9FAD469CE4414A25974CF45C0AD22D35-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--9FAD469CE4414A25974CF45C0AD22D35-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--9FAD469CE4414A25974CF45C0AD22D35--></OBUISEL_SELECTOR>
 
@@ -127,7 +127,7 @@
 <!--A98899B1C75A4F4EBD3414F1B654EFAB-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--A98899B1C75A4F4EBD3414F1B654EFAB-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--A98899B1C75A4F4EBD3414F1B654EFAB-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--A98899B1C75A4F4EBD3414F1B654EFAB-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--A98899B1C75A4F4EBD3414F1B654EFAB-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--A98899B1C75A4F4EBD3414F1B654EFAB-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--A98899B1C75A4F4EBD3414F1B654EFAB--></OBUISEL_SELECTOR>
 
@@ -143,7 +143,7 @@
 <!--B15DC1DA631A402C9B05AC11A2EA724C-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--B15DC1DA631A402C9B05AC11A2EA724C-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--B15DC1DA631A402C9B05AC11A2EA724C-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--B15DC1DA631A402C9B05AC11A2EA724C-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--B15DC1DA631A402C9B05AC11A2EA724C-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--B15DC1DA631A402C9B05AC11A2EA724C-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--B15DC1DA631A402C9B05AC11A2EA724C--></OBUISEL_SELECTOR>
 
@@ -158,7 +158,7 @@
 <!--B496EA4EDC36442D90CC9B553311DC11-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--B496EA4EDC36442D90CC9B553311DC11-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--B496EA4EDC36442D90CC9B553311DC11-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--B496EA4EDC36442D90CC9B553311DC11-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--B496EA4EDC36442D90CC9B553311DC11-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--B496EA4EDC36442D90CC9B553311DC11-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--B496EA4EDC36442D90CC9B553311DC11--></OBUISEL_SELECTOR>
 
@@ -174,7 +174,7 @@
 <!--BA4FDCB15ACB47AD81BE3985E13032EE-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--BA4FDCB15ACB47AD81BE3985E13032EE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--BA4FDCB15ACB47AD81BE3985E13032EE-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--BA4FDCB15ACB47AD81BE3985E13032EE-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--BA4FDCB15ACB47AD81BE3985E13032EE-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--BA4FDCB15ACB47AD81BE3985E13032EE-->  <ENTITY_ALIAS><![CDATA[e]]></ENTITY_ALIAS>
 <!--BA4FDCB15ACB47AD81BE3985E13032EE-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--BA4FDCB15ACB47AD81BE3985E13032EE--></OBUISEL_SELECTOR>
@@ -190,7 +190,7 @@
 <!--FDDCBE57CCDF4FB89ED708316E2BF0E6-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--FDDCBE57CCDF4FB89ED708316E2BF0E6-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FDDCBE57CCDF4FB89ED708316E2BF0E6-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--FDDCBE57CCDF4FB89ED708316E2BF0E6-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--FDDCBE57CCDF4FB89ED708316E2BF0E6-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--FDDCBE57CCDF4FB89ED708316E2BF0E6-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--FDDCBE57CCDF4FB89ED708316E2BF0E6--></OBUISEL_SELECTOR>
 
@@ -206,7 +206,7 @@
 <!--FF808181312D569C01312D8C1EC40036-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--FF808181312D569C01312D8C1EC40036-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF808181312D569C01312D8C1EC40036-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--FF808181312D569C01312D8C1EC40036-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--FF808181312D569C01312D8C1EC40036-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--FF808181312D569C01312D8C1EC40036-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--FF808181312D569C01312D8C1EC40036--></OBUISEL_SELECTOR>
 
@@ -222,7 +222,7 @@
 <!--FF808181312D569C01312D8DCCD50045-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--FF808181312D569C01312D8DCCD50045-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF808181312D569C01312D8DCCD50045-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--FF808181312D569C01312D8DCCD50045-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--FF808181312D569C01312D8DCCD50045-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--FF808181312D569C01312D8DCCD50045-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--FF808181312D569C01312D8DCCD50045--></OBUISEL_SELECTOR>
 
@@ -238,7 +238,7 @@
 <!--FF808181312D569C01312D8EE5430054-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--FF808181312D569C01312D8EE5430054-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF808181312D569C01312D8EE5430054-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--FF808181312D569C01312D8EE5430054-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--FF808181312D569C01312D8EE5430054-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--FF808181312D569C01312D8EE5430054-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--FF808181312D569C01312D8EE5430054--></OBUISEL_SELECTOR>
 
@@ -254,7 +254,7 @@
 <!--FF808181312D569C01312D90408D005D-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--FF808181312D569C01312D90408D005D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF808181312D569C01312D90408D005D-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--FF808181312D569C01312D90408D005D-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--FF808181312D569C01312D90408D005D-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--FF808181312D569C01312D90408D005D-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--FF808181312D569C01312D90408D005D--></OBUISEL_SELECTOR>
 
@@ -272,7 +272,7 @@
 <!--FF808181312DA8D801312DDE869B000C-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--FF808181312DA8D801312DDE869B000C-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF808181312DA8D801312DDE869B000C-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--FF808181312DA8D801312DDE869B000C-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--FF808181312DA8D801312DDE869B000C-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--FF808181312DA8D801312DDE869B000C-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--FF808181312DA8D801312DDE869B000C--></OBUISEL_SELECTOR>
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/Issue28591UpdatePSD.java	Wed Feb 11 09:31:54 2015 +0100
@@ -0,0 +1,41 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2015 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ *************************************************************************
+ */
+package org.openbravo.advpaymentmngt.modulescript;
+
+import org.openbravo.database.ConnectionProvider;
+import org.openbravo.modulescript.ModuleScript;
+import java.math.BigDecimal;
+
+public class Issue28591UpdatePSD extends ModuleScript {
+  public void execute() {
+    try {
+      ConnectionProvider cp = getConnectionProvider();
+      boolean issue28591UpdatePSD =  Issue28591UpdatePSDData.updateWrongPSD(cp);
+      if(!issue28591UpdatePSD) {
+        Issue28591UpdatePSDData[] data = Issue28591UpdatePSDData.selectPSD(cp);
+        for (Issue28591UpdatePSDData upsd : data) {
+          Issue28591UpdatePSDData.updatePSDAmount(cp, upsd.outstandingamt, upsd.finPaymentScheduledetailId);
+        }
+        Issue28591UpdatePSDData.createPreference(cp);
+     }
+    } catch (Exception e) {
+      handleError(e);
+    }
+ }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/org/openbravo/advpaymentmngt/modulescript/Issue28591UpdatePSD_data.xsql	Wed Feb 11 09:31:54 2015 +0100
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2015 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ *************************************************************************
+-->
+<SqlClass name="Issue28591UpdatePSDData" package="org.openbravo.advpaymentmngt.modulescript">
+   <SqlClassComment></SqlClassComment>
+   <SqlMethod name="select" type="preparedStatement" return="multiple">
+    <SqlMethodComment></SqlMethodComment>
+    <Sql>
+      <![CDATA[
+        SELECT '' as fin_payment_scheduledetail_id, '' as outstandingamt, '' as wrongamt, 
+        '' as fin_payment_schedule_id, '' as c_invoice_id, '' as c_currency_id, '' as bp_currency_id,
+        '' as fin_payment_id, '' as fin_payment_detail_id, '' as isreceipt, '' as c_bpartner_id
+        FROM DUAL
+      ]]>
+    </Sql>
+   </SqlMethod>
+   <SqlMethod name="selectPSD" type="preparedStatement" return="multiple">
+    <SqlMethodComment></SqlMethodComment>
+    <Sql>
+      <![CDATA[
+      select ps.outstandingamt as outstandingamt, max(psd.fin_payment_scheduledetail_id) as fin_payment_scheduledetail_id
+      from fin_payment_scheduledetail psd
+      LEFT JOIN fin_payment_schedule ps ON ps.fin_payment_schedule_id = COALESCE(psd.fin_payment_schedule_invoice,psd.fin_payment_schedule_order)
+      where psd.fin_payment_detail_id is null and ps.outstandingamt > 0
+      group by ps.outstandingamt, ps.fin_payment_schedule_id
+      having sum(psd.amount) <> ps.outstandingamt
+      ]]>
+    </Sql>
+  </SqlMethod>
+  <SqlMethod name="updatePSDAmount" type="preparedStatement" return="rowcount">
+    <SqlMethodComment></SqlMethodComment>
+    <Sql>
+      <![CDATA[
+        UPDATE FIN_PAYMENT_SCHEDULEDETAIL SET AMOUNT=TO_NUMBER(?),
+        updatedby='0', updated=now()
+        WHERE FIN_PAYMENT_SCHEDULEDETAIL_ID = ?
+      ]]>
+    </Sql>
+    <Parameter name="outStandingAmount"/>
+    <Parameter name="finPaymentScheduledetailId"/>
+  </SqlMethod>
+  <SqlMethod name="updateWrongPSD" type="preparedStatement" return="boolean">
+    <SqlMethodComment></SqlMethodComment>
+    <Sql>
+      <![CDATA[
+        SELECT count(*) as exist
+        FROM DUAL
+        WHERE EXISTS (SELECT 1 FROM ad_preference
+                      WHERE attribute = 'Issue28591updateWrongPSD')
+      ]]>
+    </Sql>
+  </SqlMethod>
+  <SqlMethod name="createPreference" type="preparedStatement" return="rowcount">
+    <SqlMethodComment></SqlMethodComment>
+    <Sql>
+      <![CDATA[
+        INSERT INTO ad_preference (
+          ad_preference_id, ad_client_id, ad_org_id, isactive,
+          createdby, created, updatedby, updated,
+          attribute
+        ) VALUES (
+          get_uuid(), '0', '0', 'Y',
+          '0', NOW(), '0', NOW(),
+          'Issue28591updateWrongPSD'
+        )
+      ]]>
+    </Sql>
+  </SqlMethod>
+ </SqlClass>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src-util/modulescript/src/src/org/openbravo/advpaymentmngt/modulescript/Issue28591UpdatePSDData.java	Wed Feb 11 09:31:54 2015 +0100
@@ -0,0 +1,292 @@
+//Sqlc generated V1.O00-1
+package org.openbravo.advpaymentmngt.modulescript;
+
+import java.sql.*;
+
+import org.apache.log4j.Logger;
+
+import javax.servlet.ServletException;
+
+import org.openbravo.data.FieldProvider;
+import org.openbravo.database.ConnectionProvider;
+import org.openbravo.data.UtilSql;
+import java.util.*;
+
+class Issue28591UpdatePSDData implements FieldProvider {
+static Logger log4j = Logger.getLogger(Issue28591UpdatePSDData.class);
+  private String InitRecordNumber="0";
+  public String finPaymentScheduledetailId;
+  public String outstandingamt;
+  public String wrongamt;
+  public String finPaymentScheduleId;
+  public String cInvoiceId;
+  public String cCurrencyId;
+  public String bpCurrencyId;
+  public String finPaymentId;
+  public String finPaymentDetailId;
+  public String isreceipt;
+  public String cBpartnerId;
+
+  public String getInitRecordNumber() {
+    return InitRecordNumber;
+  }
+
+  public String getField(String fieldName) {
+    if (fieldName.equalsIgnoreCase("fin_payment_scheduledetail_id") || fieldName.equals("finPaymentScheduledetailId"))
+      return finPaymentScheduledetailId;
+    else if (fieldName.equalsIgnoreCase("outstandingamt"))
+      return outstandingamt;
+    else if (fieldName.equalsIgnoreCase("wrongamt"))
+      return wrongamt;
+    else if (fieldName.equalsIgnoreCase("fin_payment_schedule_id") || fieldName.equals("finPaymentScheduleId"))
+      return finPaymentScheduleId;
+    else if (fieldName.equalsIgnoreCase("c_invoice_id") || fieldName.equals("cInvoiceId"))
+      return cInvoiceId;
+    else if (fieldName.equalsIgnoreCase("c_currency_id") || fieldName.equals("cCurrencyId"))
+      return cCurrencyId;
+    else if (fieldName.equalsIgnoreCase("bp_currency_id") || fieldName.equals("bpCurrencyId"))
+      return bpCurrencyId;
+    else if (fieldName.equalsIgnoreCase("fin_payment_id") || fieldName.equals("finPaymentId"))
+      return finPaymentId;
+    else if (fieldName.equalsIgnoreCase("fin_payment_detail_id") || fieldName.equals("finPaymentDetailId"))
+      return finPaymentDetailId;
+    else if (fieldName.equalsIgnoreCase("isreceipt"))
+      return isreceipt;
+    else if (fieldName.equalsIgnoreCase("c_bpartner_id") || fieldName.equals("cBpartnerId"))
+      return cBpartnerId;
+   else {
+     log4j.debug("Field does not exist: " + fieldName);
+     return null;
+   }
+ }
+
+  public static Issue28591UpdatePSDData[] select(ConnectionProvider connectionProvider)    throws ServletException {
+    return select(connectionProvider, 0, 0);
+  }
+
+  public static Issue28591UpdatePSDData[] select(ConnectionProvider connectionProvider, int firstRegister, int numberRegisters)    throws ServletException {
+    String strSql = "";
+    strSql = strSql + 
+      "        SELECT '' as fin_payment_scheduledetail_id, '' as outstandingamt, '' as wrongamt, " +
+      "        '' as fin_payment_schedule_id, '' as c_invoice_id, '' as c_currency_id, '' as bp_currency_id," +
+      "        '' as fin_payment_id, '' as fin_payment_detail_id, '' as isreceipt, '' as c_bpartner_id" +
+      "        FROM DUAL";
+
+    ResultSet result;
+    Vector<java.lang.Object> vector = new Vector<java.lang.Object>(0);
+    PreparedStatement st = null;
+
+    try {
+    st = connectionProvider.getPreparedStatement(strSql);
+
+      result = st.executeQuery();
+      long countRecord = 0;
+      long countRecordSkip = 1;
+      boolean continueResult = true;
+      while(countRecordSkip < firstRegister && continueResult) {
+        continueResult = result.next();
+        countRecordSkip++;
+      }
+      while(continueResult && result.next()) {
+        countRecord++;
+        Issue28591UpdatePSDData objectIssue28591UpdatePSDData = new Issue28591UpdatePSDData();
+        objectIssue28591UpdatePSDData.finPaymentScheduledetailId = UtilSql.getValue(result, "fin_payment_scheduledetail_id");
+        objectIssue28591UpdatePSDData.outstandingamt = UtilSql.getValue(result, "outstandingamt");
+        objectIssue28591UpdatePSDData.wrongamt = UtilSql.getValue(result, "wrongamt");
+        objectIssue28591UpdatePSDData.finPaymentScheduleId = UtilSql.getValue(result, "fin_payment_schedule_id");
+        objectIssue28591UpdatePSDData.cInvoiceId = UtilSql.getValue(result, "c_invoice_id");
+        objectIssue28591UpdatePSDData.cCurrencyId = UtilSql.getValue(result, "c_currency_id");
+        objectIssue28591UpdatePSDData.bpCurrencyId = UtilSql.getValue(result, "bp_currency_id");
+        objectIssue28591UpdatePSDData.finPaymentId = UtilSql.getValue(result, "fin_payment_id");
+        objectIssue28591UpdatePSDData.finPaymentDetailId = UtilSql.getValue(result, "fin_payment_detail_id");
+        objectIssue28591UpdatePSDData.isreceipt = UtilSql.getValue(result, "isreceipt");
+        objectIssue28591UpdatePSDData.cBpartnerId = UtilSql.getValue(result, "c_bpartner_id");
+        objectIssue28591UpdatePSDData.InitRecordNumber = Integer.toString(firstRegister);
+        vector.addElement(objectIssue28591UpdatePSDData);
+        if (countRecord >= numberRegisters && numberRegisters != 0) {
+          continueResult = false;
+        }
+      }
+      result.close();
+    } catch(SQLException e){
+      log4j.error("SQL error in query: " + strSql + "Exception:"+ e);
+      throw new ServletException("@CODE=" + Integer.toString(e.getErrorCode()) + "@" + e.getMessage());
+    } catch(Exception ex){
+      log4j.error("Exception in query: " + strSql + "Exception:"+ ex);
+      throw new ServletException("@CODE=@" + ex.getMessage());
+    } finally {
+      try {
+        connectionProvider.releasePreparedStatement(st);
+      } catch(Exception ignore){
+        ignore.printStackTrace();
+      }
+    }
+    Issue28591UpdatePSDData objectIssue28591UpdatePSDData[] = new Issue28591UpdatePSDData[vector.size()];
+    vector.copyInto(objectIssue28591UpdatePSDData);
+    return(objectIssue28591UpdatePSDData);
+  }
+
+  public static Issue28591UpdatePSDData[] selectPSD(ConnectionProvider connectionProvider)    throws ServletException {
+    return selectPSD(connectionProvider, 0, 0);
+  }
+
+  public static Issue28591UpdatePSDData[] selectPSD(ConnectionProvider connectionProvider, int firstRegister, int numberRegisters)    throws ServletException {
+    String strSql = "";
+    strSql = strSql + 
+      "      select ps.outstandingamt as outstandingamt, max(psd.fin_payment_scheduledetail_id) as fin_payment_scheduledetail_id" +
+      "      from fin_payment_scheduledetail psd" +
+      "      LEFT JOIN fin_payment_schedule ps ON ps.fin_payment_schedule_id = COALESCE(psd.fin_payment_schedule_invoice,psd.fin_payment_schedule_order)" +
+      "      where psd.fin_payment_detail_id is null and ps.outstandingamt > 0" +
+      "      group by ps.outstandingamt, ps.fin_payment_schedule_id" +
+      "      having sum(psd.amount) <> ps.outstandingamt";
+
+    ResultSet result;
+    Vector<java.lang.Object> vector = new Vector<java.lang.Object>(0);
+    PreparedStatement st = null;
+
+    try {
+    st = connectionProvider.getPreparedStatement(strSql);
+
+      result = st.executeQuery();
+      long countRecord = 0;
+      long countRecordSkip = 1;
+      boolean continueResult = true;
+      while(countRecordSkip < firstRegister && continueResult) {
+        continueResult = result.next();
+        countRecordSkip++;
+      }
+      while(continueResult && result.next()) {
+        countRecord++;
+        Issue28591UpdatePSDData objectIssue28591UpdatePSDData = new Issue28591UpdatePSDData();
+        objectIssue28591UpdatePSDData.outstandingamt = UtilSql.getValue(result, "outstandingamt");
+        objectIssue28591UpdatePSDData.finPaymentScheduledetailId = UtilSql.getValue(result, "fin_payment_scheduledetail_id");
+        objectIssue28591UpdatePSDData.InitRecordNumber = Integer.toString(firstRegister);
+        vector.addElement(objectIssue28591UpdatePSDData);
+        if (countRecord >= numberRegisters && numberRegisters != 0) {
+          continueResult = false;
+        }
+      }
+      result.close();
+    } catch(SQLException e){
+      log4j.error("SQL error in query: " + strSql + "Exception:"+ e);
+      throw new ServletException("@CODE=" + Integer.toString(e.getErrorCode()) + "@" + e.getMessage());
+    } catch(Exception ex){
+      log4j.error("Exception in query: " + strSql + "Exception:"+ ex);
+      throw new ServletException("@CODE=@" + ex.getMessage());
+    } finally {
+      try {
+        connectionProvider.releasePreparedStatement(st);
+      } catch(Exception ignore){
+        ignore.printStackTrace();
+      }
+    }
+    Issue28591UpdatePSDData objectIssue28591UpdatePSDData[] = new Issue28591UpdatePSDData[vector.size()];
+    vector.copyInto(objectIssue28591UpdatePSDData);
+    return(objectIssue28591UpdatePSDData);
+  }
+
+  public static int updatePSDAmount(ConnectionProvider connectionProvider, String outStandingAmount, String finPaymentScheduledetailId)    throws ServletException {
+    String strSql = "";
+    strSql = strSql + 
+      "        UPDATE FIN_PAYMENT_SCHEDULEDETAIL SET AMOUNT=TO_NUMBER(?)," +
+      "        updatedby='0', updated=now()" +
+      "        WHERE FIN_PAYMENT_SCHEDULEDETAIL_ID = ?";
+
+    int updateCount = 0;
+    PreparedStatement st = null;
+
+    int iParameter = 0;
+    try {
+    st = connectionProvider.getPreparedStatement(strSql);
+      iParameter++; UtilSql.setValue(st, iParameter, 12, null, outStandingAmount);
+      iParameter++; UtilSql.setValue(st, iParameter, 12, null, finPaymentScheduledetailId);
+
+      updateCount = st.executeUpdate();
+    } catch(SQLException e){
+      log4j.error("SQL error in query: " + strSql + "Exception:"+ e);
+      throw new ServletException("@CODE=" + Integer.toString(e.getErrorCode()) + "@" + e.getMessage());
+    } catch(Exception ex){
+      log4j.error("Exception in query: " + strSql + "Exception:"+ ex);
+      throw new ServletException("@CODE=@" + ex.getMessage());
+    } finally {
+      try {
+        connectionProvider.releasePreparedStatement(st);
+      } catch(Exception ignore){
+        ignore.printStackTrace();
+      }
+    }
+    return(updateCount);
+  }
+
+  public static boolean updateWrongPSD(ConnectionProvider connectionProvider)    throws ServletException {
+    String strSql = "";
+    strSql = strSql + 
+      "        SELECT count(*) as exist" +
+      "        FROM DUAL" +
+      "        WHERE EXISTS (SELECT 1 FROM ad_preference" +
+      "                      WHERE attribute = 'Issue28591updateWrongPSD')";
+
+    ResultSet result;
+    boolean boolReturn = false;
+    PreparedStatement st = null;
+
+    try {
+    st = connectionProvider.getPreparedStatement(strSql);
+
+      result = st.executeQuery();
+      if(result.next()) {
+        boolReturn = !UtilSql.getValue(result, "exist").equals("0");
+      }
+      result.close();
+    } catch(SQLException e){
+      log4j.error("SQL error in query: " + strSql + "Exception:"+ e);
+      throw new ServletException("@CODE=" + Integer.toString(e.getErrorCode()) + "@" + e.getMessage());
+    } catch(Exception ex){
+      log4j.error("Exception in query: " + strSql + "Exception:"+ ex);
+      throw new ServletException("@CODE=@" + ex.getMessage());
+    } finally {
+      try {
+        connectionProvider.releasePreparedStatement(st);
+      } catch(Exception ignore){
+        ignore.printStackTrace();
+      }
+    }
+    return(boolReturn);
+  }
+
+  public static int createPreference(ConnectionProvider connectionProvider)    throws ServletException {
+    String strSql = "";
+    strSql = strSql + 
+      "        INSERT INTO ad_preference (" +
+      "          ad_preference_id, ad_client_id, ad_org_id, isactive," +
+      "          createdby, created, updatedby, updated," +
+      "          attribute" +
+      "        ) VALUES (" +
+      "          get_uuid(), '0', '0', 'Y'," +
+      "          '0', NOW(), '0', NOW()," +
+      "          'Issue28591updateWrongPSD'" +
+      "        )";
+
+    int updateCount = 0;
+    PreparedStatement st = null;
+
+    try {
+    st = connectionProvider.getPreparedStatement(strSql);
+
+      updateCount = st.executeUpdate();
+    } catch(SQLException e){
+      log4j.error("SQL error in query: " + strSql + "Exception:"+ e);
+      throw new ServletException("@CODE=" + Integer.toString(e.getErrorCode()) + "@" + e.getMessage());
+    } catch(Exception ex){
+      log4j.error("Exception in query: " + strSql + "Exception:"+ ex);
+      throw new ServletException("@CODE=@" + ex.getMessage());
+    } finally {
+      try {
+        connectionProvider.releasePreparedStatement(st);
+      } catch(Exception ignore){
+        ignore.printStackTrace();
+      }
+    }
+    return(updateCount);
+  }
+}
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/PaymentMethodMulticurrencyActionHandler.java	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/PaymentMethodMulticurrencyActionHandler.java	Wed Feb 11 09:31:54 2015 +0100
@@ -67,7 +67,7 @@
       }
       if (finAccPaymentMethod != null) {
         if (finAccPaymentMethod.getAccount().getCurrency().getId().equals(currencyId)) {
-          result.put("conversionrate", "1");
+          result.put("conversionrate", 1);
         } else {
           ConversionRate convRate = FinancialUtils.getConversionRate(paymentDate, OBDal
               .getInstance().get(Currency.class, currencyId), finAccPaymentMethod.getAccount()
@@ -76,14 +76,14 @@
           if (convRate != null) {
             result.put("conversionrate", convRate.getMultipleRateBy());
           } else {
-            result.put("conversionrate", "1");
+            result.put("conversionrate", 1);
           }
         }
         result.put("currencyToId", finAccPaymentMethod.getAccount().getCurrency().getId());
         result.put("currencyToIdentifier", finAccPaymentMethod.getAccount().getCurrency()
             .getIdentifier());
       } else {
-        result.put("conversionrate", "1");
+        result.put("conversionrate", 1);
         result.put("currencyToId", currencyId);
       }
       return result;
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_AddPayment.java	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_AddPayment.java	Wed Feb 11 09:31:54 2015 +0100
@@ -1163,15 +1163,18 @@
    */
   public static void updatePaymentScheduleAmounts(FIN_PaymentDetail paymentDetail,
       FIN_PaymentSchedule paymentSchedule, BigDecimal amount, BigDecimal writeOffAmount) {
-    paymentSchedule.setPaidAmount(paymentSchedule.getPaidAmount().add(amount));
-    paymentSchedule.setOutstandingAmount(paymentSchedule.getOutstandingAmount().subtract(amount));
-    if (writeOffAmount != null && writeOffAmount.compareTo(BigDecimal.ZERO) != 0) {
-      paymentSchedule.setPaidAmount(paymentSchedule.getPaidAmount().add(writeOffAmount));
-      paymentSchedule.setOutstandingAmount(paymentSchedule.getOutstandingAmount().subtract(
-          writeOffAmount));
+    if (paymentSchedule.getOutstandingAmount().compareTo(BigDecimal.ZERO) != 0) {
+      paymentSchedule.setPaidAmount(paymentSchedule.getPaidAmount().add(amount));
+      paymentSchedule.setOutstandingAmount(paymentSchedule.getOutstandingAmount().subtract(amount));
+      if (writeOffAmount != null && writeOffAmount.compareTo(BigDecimal.ZERO) != 0) {
+        paymentSchedule.setPaidAmount(paymentSchedule.getPaidAmount().add(writeOffAmount));
+        paymentSchedule.setOutstandingAmount(paymentSchedule.getOutstandingAmount().subtract(
+            writeOffAmount));
+      }
+      OBDal.getInstance().save(paymentSchedule);
+      CashVATUtil.createInvoiceTaxCashVAT(paymentDetail, paymentSchedule,
+          amount.add(writeOffAmount));
     }
-    OBDal.getInstance().save(paymentSchedule);
-    CashVATUtil.createInvoiceTaxCashVAT(paymentDetail, paymentSchedule, amount.add(writeOffAmount));
     if (paymentSchedule.getInvoice() != null) {
       updateInvoicePaymentMonitor(paymentSchedule, amount, writeOffAmount);
     }
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java	Wed Feb 11 09:31:54 2015 +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-2014 Openbravo SLU
+ * All portions are Copyright (C) 2010-2015 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  *************************************************************************
@@ -578,7 +578,7 @@
                 if (openPSDs.size() > 0) {
                   FIN_PaymentScheduleDetail openPSD = openPSDs.get(0);
                   BigDecimal openAmount = openPSD.getAmount().add(
-                      payment.getAmount().add(payment.getWriteoffAmount()));
+                      psd.getAmount().add(psd.getWriteoffAmount()));
                   if (openAmount.compareTo(BigDecimal.ZERO) == 0) {
                     OBDal.getInstance().remove(openPSD);
                   } else {
@@ -591,7 +591,7 @@
                   openPSD.setPaymentDetails(null);
                   // Amounts
                   openPSD.setWriteoffAmount(BigDecimal.ZERO);
-                  openPSD.setAmount(payment.getAmount().add(payment.getWriteoffAmount()));
+                  openPSD.setAmount(psd.getAmount().add(psd.getWriteoffAmount()));
 
                   openPSD.setCanceled(false);
                   OBDal.getInstance().save(openPSD);
@@ -767,17 +767,17 @@
         OBContext.setAdminMode();
         try {
           BusinessPartner businessPartner = payment.getBusinessPartner();
-          // When credit is used (consumed) we compensate so_creditused as this amount is already
-          // included in the payment details. Credit consumed should not affect to so_creditused
           BigDecimal paidAmount = BigDecimal.ZERO;
-          String fromCurrency = payment.getCurrency().getId();
-          String toCurrency = businessPartner.getCurrency().getId();
-          if (payment.getGeneratedCredit().compareTo(BigDecimal.ZERO) == 0
-              && payment.getUsedCredit().compareTo(BigDecimal.ZERO) != 0) {
-            if (isReceipt) {
-              decreaseCustomerCredit(businessPartner, payment.getUsedCredit());
-            } else {
-              increaseCustomerCredit(businessPartner, payment.getUsedCredit());
+          if (!(businessPartner == null)) {
+            // When credit is used (consumed) we compensate so_creditused as this amount is already
+            // included in the payment details. Credit consumed should not affect to so_creditused
+            if (payment.getGeneratedCredit().compareTo(BigDecimal.ZERO) == 0
+                && payment.getUsedCredit().compareTo(BigDecimal.ZERO) != 0) {
+              if (isReceipt) {
+                decreaseCustomerCredit(businessPartner, payment.getUsedCredit());
+              } else {
+                increaseCustomerCredit(businessPartner, payment.getUsedCredit());
+              }
             }
           }
           List<FIN_PaymentDetail> paymentDetails = payment.getFINPaymentDetailList();
@@ -839,42 +839,45 @@
                         .getInvoicePaymentSchedule() != null ? paymentScheduleDetail
                         .getInvoicePaymentSchedule().getInvoice() : null;
                     paidAmount = BigDecimal.ZERO;
-                    fromCurrency = payment.getCurrency().getId();
-                    toCurrency = businessPartner.getCurrency().getId();
-                    if (!fromCurrency.equals(toCurrency)) {
-                      BigDecimal exchangeRate = BigDecimal.ZERO;
-                      // check at invoice document level
-                      List<ConversionRateDoc> conversionRateDocumentForInvoice = getConversionRateDocumentForInvoice(
-                          invoiceForConversion, isReceipt);
-                      if (conversionRateDocumentForInvoice.size() > 0) {
-                        exchangeRate = conversionRateDocumentForInvoice.get(0).getRate();
+                    if (!(businessPartner == null)) {
+                      final Currency fromCurrency = payment.getCurrency();
+                      // At this point the BP must have a currency, because it is set when
+                      // processing the payment associated to the invoice
+                      final Currency toCurrency = businessPartner.getCurrency();
+                      if (fromCurrency != null && toCurrency != null
+                          && !fromCurrency.getId().equals(toCurrency.getId())) {
+                        BigDecimal exchangeRate = BigDecimal.ZERO;
+                        // check at invoice document level
+                        List<ConversionRateDoc> conversionRateDocumentForInvoice = getConversionRateDocumentForInvoice(
+                            invoiceForConversion, isReceipt);
+                        if (conversionRateDocumentForInvoice.size() > 0) {
+                          exchangeRate = conversionRateDocumentForInvoice.get(0).getRate();
+                        } else {
+                          // global
+                          exchangeRate = getConversionRate(payment.getOrganization().getId(),
+                              fromCurrency.getId(), toCurrency.getId(),
+                              invoiceForConversion != null ? invoiceForConversion.getInvoiceDate()
+                                  : payment.getPaymentDate());
+                        }
+                        if (exchangeRate == BigDecimal.ZERO) {
+                          msg.setType("Error");
+                          msg.setTitle(Utility.messageBD(conProvider, "Error", language));
+                          msg.setMessage(Utility.parseTranslation(conProvider, vars, language,
+                              "@NoCurrencyConversion@"));
+                          bundle.setResult(msg);
+                          OBDal.getInstance().rollbackAndClose();
+                          return;
+                        }
+                        paidAmount = amount.multiply(exchangeRate);
                       } else {
-                        // global
-                        exchangeRate = getConversionRate(payment.getOrganization().getId(),
-                            fromCurrency, toCurrency,
-                            invoiceForConversion != null ? invoiceForConversion.getInvoiceDate()
-                                : payment.getPaymentDate());
+                        paidAmount = amount;
                       }
-                      if (exchangeRate == BigDecimal.ZERO) {
-                        msg.setType("Error");
-                        msg.setTitle(Utility.messageBD(conProvider, "Error", language));
-                        msg.setMessage(Utility.parseTranslation(conProvider, vars, language,
-                            "@NoCurrencyConversion@"));
-                        bundle.setResult(msg);
-                        OBDal.getInstance().rollbackAndClose();
-                        return;
+                      if (isReceipt) {
+                        increaseCustomerCredit(businessPartner, paidAmount);
+                      } else {
+                        decreaseCustomerCredit(businessPartner, paidAmount);
                       }
-                      paidAmount = amount.multiply(exchangeRate);
-                    } else {
-                      paidAmount = amount;
                     }
-                    if (isReceipt) {
-                      increaseCustomerCredit(businessPartner, paidAmount);
-                    } else {
-                      decreaseCustomerCredit(businessPartner, paidAmount);
-
-                    }
-
                   }
                 }
                 if (paymentScheduleDetail.getOrderPaymentSchedule() != null && restorePaidAmounts) {
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/APRMApplicationInitializer.java	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/utility/APRMApplicationInitializer.java	Wed Feb 11 09:31:54 2015 +0100
@@ -50,9 +50,9 @@
       if (is11R2orNewer()) {
         return "listagg(to_char(?1), ',') WITHIN GROUP (ORDER BY ?1)";
       } else if (existsStrAgg()) {
-        return "stragg(to_char(?1)";
+        return "stragg(to_char(?1))";
       } else {
-        return "wm_concat(to_char(?1)";
+        return "wm_concat(to_char(?1))";
       }
     } else {
       return "array_to_string(array_agg(?1), ',')";
--- a/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE.xml	Wed Feb 11 09:31:54 2015 +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.24019]]></VERSION>
+<!--C70732EA90A14EC0916078B85CC33D2D-->  <VERSION><![CDATA[1.1.24075]]></VERSION>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <DESCRIPTION><![CDATA[JBoss Weld]]></DESCRIPTION>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <HELP><![CDATA[Provides the JBoss Weld framework: Java Contexts and Dependency Injection for the Java EE platform (CDI). For more information see http://seamframework.org/Weld]]></HELP>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <URL><![CDATA[http://forge.openbravo.com/projects/weld]]></URL>
@@ -22,7 +22,7 @@
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <UPDATEINFO><![CDATA[Bug fixing.]]></UPDATEINFO>
-<!--C70732EA90A14EC0916078B85CC33D2D-->  <VERSION_LABEL><![CDATA[PR14Q3.1]]></VERSION_LABEL>
+<!--C70732EA90A14EC0916078B85CC33D2D-->  <VERSION_LABEL><![CDATA[PR14Q3.6]]></VERSION_LABEL>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--C70732EA90A14EC0916078B85CC33D2D-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--C70732EA90A14EC0916078B85CC33D2D--></AD_MODULE>
--- a/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.base.weld/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Feb 11 09:31:54 2015 +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.24019]]></STARTVERSION>
+<!--8BDE81545C1A43EAAC4BA3C5ED754DC8-->  <STARTVERSION><![CDATA[3.0.24075]]></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	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE.xml	Wed Feb 11 09:31:54 2015 +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.24019]]></VERSION>
+<!--9BA0836A3CD74EE4AB48753A47211BCC-->  <VERSION><![CDATA[2.1.24075]]></VERSION>
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <DESCRIPTION><![CDATA[Provides the main application components for the openbravo user interface]]></DESCRIPTION>
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <HELP><![CDATA[Provides the main application components for the openbravo user interface. The main layout incorporates a navigation bar and a main view area.]]></HELP>
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <URL><![CDATA[http://forge.openbravo.com/projects/clientapplication]]></URL>
@@ -22,7 +22,7 @@
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <UPDATEINFO><![CDATA[Styling bugfixing]]></UPDATEINFO>
-<!--9BA0836A3CD74EE4AB48753A47211BCC-->  <VERSION_LABEL><![CDATA[PR14Q3.1]]></VERSION_LABEL>
+<!--9BA0836A3CD74EE4AB48753A47211BCC-->  <VERSION_LABEL><![CDATA[PR14Q3.6]]></VERSION_LABEL>
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--9BA0836A3CD74EE4AB48753A47211BCC-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--9BA0836A3CD74EE4AB48753A47211BCC--></AD_MODULE>
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Feb 11 09:31:54 2015 +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.24019]]></STARTVERSION>
+<!--15D7CE8D95D043189162DBABA54A1F61-->  <STARTVERSION><![CDATA[2.1.24075]]></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.24019]]></STARTVERSION>
+<!--60A170212F36499D83B8AD38D01F46B3-->  <STARTVERSION><![CDATA[2.1.24075]]></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.24019]]></STARTVERSION>
+<!--824D60CB352E4099B1D8C903CA139DAE-->  <STARTVERSION><![CDATA[3.0.24075]]></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.24019]]></STARTVERSION>
+<!--E8FD820AFE3D4FE08C02FC47769026AD-->  <STARTVERSION><![CDATA[8.1.24075]]></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/event/WindowPersonalizationEventHandler.java	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/event/WindowPersonalizationEventHandler.java	Wed Feb 11 09:31:54 2015 +0100
@@ -19,18 +19,25 @@
 
 package org.openbravo.client.application.event;
 
+import java.util.List;
+
 import javax.enterprise.event.Observes;
 
 import org.apache.log4j.Logger;
+import org.hibernate.criterion.Restrictions;
 import org.openbravo.base.exception.OBException;
 import org.openbravo.base.model.Entity;
 import org.openbravo.base.model.ModelProvider;
 import org.openbravo.client.application.UIPersonalization;
+import org.openbravo.client.kernel.event.EntityDeleteEvent;
 import org.openbravo.client.kernel.event.EntityPersistenceEventObserver;
 import org.openbravo.client.kernel.event.EntityUpdateEvent;
 import org.openbravo.dal.core.OBContext;
+import org.openbravo.dal.service.OBCriteria;
+import org.openbravo.dal.service.OBDal;
 import org.openbravo.database.ConnectionProvider;
 import org.openbravo.erpCommon.utility.Utility;
+import org.openbravo.model.ad.domain.Preference;
 import org.openbravo.model.ad.ui.Tab;
 import org.openbravo.model.ad.ui.Window;
 import org.openbravo.service.db.DalConnectionProvider;
@@ -46,8 +53,7 @@
     return entities;
   }
 
-  public void onUpdate(@Observes
-  EntityUpdateEvent event) {
+  public void onUpdate(@Observes EntityUpdateEvent event) {
     if (!isValidEvent(event)) {
       return;
     }
@@ -66,4 +72,49 @@
       throw new OBException(Utility.messageBD(conn, "OBUIAPP_TabFieldMandatory", language));
     }
   }
+
+  public void onDelete(@Observes EntityDeleteEvent event) {
+    if (!isValidEvent(event)) {
+      return;
+    }
+    final UIPersonalization uiPersonalization = (UIPersonalization) event.getTargetInstance();
+    deleteDefaultViewPreferences(uiPersonalization);
+  }
+
+  /**
+   * Given an UIPersonalization, deletes the OBUIAPP_DefaultSavedView preferences that reference it
+   */
+  private void deleteDefaultViewPreferences(UIPersonalization uiPersonalization) {
+    try {
+      List<Preference> preferenceList = this
+          .getDefaultViewPreferencesForUiPersonalization(uiPersonalization);
+      // don't do a client access check, the preference to delete might belong to another client
+      // (i.e. System)
+      OBContext.setAdminMode(false);
+      for (Preference preference : preferenceList) {
+        OBDal.getInstance().remove(preference);
+      }
+    } catch (Exception e) {
+      logger.error("Error while deleting a default view preference", e);
+    } finally {
+      OBContext.restorePreviousMode();
+    }
+  }
+
+  /**
+   * Given an UIPersonalization, returns the list of OBUIAPP_DefaultSavedView preferences that
+   * reference it
+   */
+  private List<Preference> getDefaultViewPreferencesForUiPersonalization(
+      UIPersonalization uiPersonalization) {
+    OBCriteria<Preference> preferenceCriteria = OBDal.getInstance()
+        .createCriteria(Preference.class);
+    // filter out the preferences that do not store the default view
+    preferenceCriteria.add(Restrictions
+        .eq(Preference.PROPERTY_PROPERTY, "OBUIAPP_DefaultSavedView"));
+    // filter out the preferences whose default view is not the one being deleted
+    preferenceCriteria
+        .add(Restrictions.eq(Preference.PROPERTY_SEARCHKEY, uiPersonalization.getId()));
+    return preferenceCriteria.list();
+  }
 }
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-date.js	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-date.js	Wed Feb 11 09:31:54 2015 +0100
@@ -52,7 +52,7 @@
 
     dateFormatUpper = this.dateFormat.toUpperCase();
     length = dateFormatUpper.length;
-    this.dateSeparator = this.dateFormat.toUpperCase().replace(/D/g, '').replace(/M/g, '').replace(/Y/g, '').substr(0, 1);
+    this.dateSeparator = OB.Utilities.Date.getDateSeparator(this.dateFormat);
 
     for (i = 0; i < length; i++) {
       if (this.isSeparator(dateFormatUpper, i)) {
@@ -224,7 +224,7 @@
   },
 
   isSeparator: function (str, position) {
-    return str.charAt(position) === '-' || str.charAt(position) === '\\' || str.charAt(position) === '/';
+    return str.charAt(position) === '-' || str.charAt(position) === '\\' || str.charAt(position) === '/' || str.charAt(position) === OB.Utilities.Date.getDateSeparator(OB.Format.date);
   },
 
   hasSeparator: function (str) {
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-fk-filter.js	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-fk-filter.js	Wed Feb 11 09:31:54 2015 +0100
@@ -244,7 +244,8 @@
 
     if (this.form.grid.sourceWidget.lazyFiltering) {
       // Fetch the criteria from the current values of the filter editor
-      gridCriteria = this.form.grid.getValues();
+      // Invoke the convertCriteria function to filter by the record selected in the parent tab if needed
+      gridCriteria = this.grid.sourceWidget.convertCriteria(this.form.grid.getValues());
     } else {
       gridCriteria = this.form.grid.sourceWidget.getCriteria();
     }
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-number.js	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-number.js	Wed Feb 11 09:31:54 2015 +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-2013 Openbravo SLU
+ * All portions are Copyright (C) 2011-2015 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -429,7 +429,7 @@
   },
 
   blur: function () {
-    var value, roundedValue, textRoundedValue;
+    var value, roundedValue, textRoundedValue, isFormula = false;
 
     // Make sure the number is rounded using the number of decimal digits specified in the number typeInstance
     if (isc.isA.String(this.getValue())) {
@@ -438,11 +438,15 @@
         value = OB.Utilities.Number.OBPlainToOBMasked(this.getValue(), this.typeInstance.maskNumeric, this.typeInstance.decSeparator, this.typeInstance.groupSeparator, OB.Format.defaultGroupingSize);
       } else {
         value = this.getValue();
+        isFormula = true;
       }
       this.setValue(OB.Utilities.Number.OBMaskedToJS(value, this.typeInstance.decSeparator, this.typeInstance.groupSeparator));
       if (this.form.setTextualValue) {
         this.form.setTextualValue(this.name, value, this.typeInstance);
       }
+    } else {
+      value = this.roundJsNumberUsingTypeInstance(this.getValue(), this.typeInstance);
+      this.setValue(value);
     }
 
     if (this.grid && this.grid.isEditing && this.grid.isEditing()) {
@@ -463,7 +467,15 @@
       this.validate();
 
       value = this.getValue();
-
+      if (isFormula) {
+        // the formula is evaluated in the validate function, so until then it is not possible to round it, do it now
+        value = this.roundJsNumberUsingTypeInstance(value, this.typeInstance);
+        if (this.form.setTextualValue) {
+          textRoundedValue = OB.Utilities.Number.JSToOBMasked(value, this.typeInstance.maskNumeric, this.typeInstance.decSeparator, this.typeInstance.groupSeparator, OB.Format.defaultGroupingSize);
+          this.form.setTextualValue(this.name, textRoundedValue, this.typeInstance);
+        }
+        this.setValue(value);
+      }
       // first check if the number is valid
       if (!isc.isA.String(value)) {
         // format the value to be displayed.
@@ -472,6 +484,11 @@
       }
     }
     return this.Super('blur', arguments);
+  },
+
+  roundJsNumberUsingTypeInstance: function (jsNumber, typeInstance) {
+    var roundedStringNumber = OB.Utilities.Number.JSToOBMasked(jsNumber, typeInstance.maskNumeric, typeInstance.decSeparator, typeInstance.groupSeparator);
+    return OB.Utilities.Number.OBMaskedToJS(roundedStringNumber, typeInstance.decSeparator, typeInstance.groupSeparator);
   }
 });
 
@@ -638,4 +655,4 @@
     }
     return value;
   }
-});
\ No newline at end of file
+});
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js	Wed Feb 11 09:31:54 2015 +0100
@@ -553,7 +553,13 @@
     var i, length, localResult, fields;
     if (!this.fieldsByFieldName) {
       localResult = {};
-      fields = this.getFields();
+      if (this.view && this.view.formFields) {
+        // standard windows don't load the fields till view form is opened, so let's
+        // use formFields in view which is always loaded
+        fields = this.view.formFields;
+      } else {
+        fields = this.getFields();
+      }
       length = fields.length;
       for (i = 0; i < fields.length; i++) {
         if (fields[i].name) {
@@ -1556,7 +1562,7 @@
     callback = function (resp, data, req) {
       var index1, index2, view = form.view,
           localRecord, status = resp.status,
-          sessionProperties, keepSelection, gridRefreshCallback, theGrid, theId, id = form.getValue('id');
+          sessionProperties, keepSelection, gridRefreshCallback, theGrid, theId, id;
 
       if (this.hasOwnProperty('previousExplicitOffline')) {
         isc.Offline.explicitOffline = this.previousExplicitOffline;
@@ -1565,6 +1571,7 @@
 
       // if no recordIndex then select explicitly
       if (recordIndex === -1) {
+        id = form.getValue('id');
         record = view.viewGrid.data.find('id', id);
         recordIndex = view.viewGrid.data.indexOf(record);
       }
@@ -1651,15 +1658,10 @@
         // remove any edit info in the grid
         view.viewGrid.discardEdits(recordIndex, null, false, isc.ListGrid.PROGRAMMATIC, true);
 
-        // Check if Id has changed 
-        if (id === form.getValue('id')) {
-          // Change some labels, set isNew as false
-          form.setNewState(false);
-        } else {
-          // New record, set isNew as true
-          form.setNewState(true);
-        }
-
+        // Change some labels:
+        //  * set isNew as false if we continue editing same record or we move to an existent one
+        //  * set isNew to true if autosaving record to start editing a new one
+        form.setNewState(form.isNewRecord());
 
         view.refreshParentRecord();
 
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-grid.js	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-grid.js	Wed Feb 11 09:31:54 2015 +0100
@@ -628,7 +628,9 @@
           if (!this._iconEnabled) {
             return;
           }
-          if (grid.filterHasChanged) {
+          if (grid.filterHasChanged || grid.filterClauseJustRemoved) {
+            // the filter clause can only be removed once
+            delete grid.filterClauseJustRemoved;
             // Do not change the sorting after receiving the data from the datasource
             grid._filteringAndSortingManually = true;
             grid.filterEditor.performFilter(true, true);
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js	Wed Feb 11 09:31:54 2015 +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-2014 Openbravo SLU
+ * All portions are Copyright (C) 2010-2015 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -1875,6 +1875,10 @@
 
     // note pass in criteria otherwise infinite looping!
     this.resetEmptyMessage(criteria);
+    //convert relative dates to absolute dates. Refer issue https://issues.openbravo.com/view.php?id=27679
+    if (this.dataSource) {
+      criteria = this.dataSource.convertRelativeDates(criteria);
+    }
     if (this.view.parentProperty && !this.isOpenDirectMode) {
       if (this.view.parentView.isShowingTree) {
         selectedValues = this.view.parentView.treeGrid.getSelectedRecords();
@@ -2870,6 +2874,9 @@
     if (record && record._newId) {
       record.id = record._newId;
       delete record._newId;
+      if (this.view && this.view.updateLastSelectedState) {
+        this.view.updateLastSelectedState();
+      }
     }
 
     form = this.getEditForm();
@@ -2897,7 +2904,9 @@
     this.view.standardWindow.autoSaveDone(this.view, true);
 
     // if nothing else got selected, select ourselves then
-    if (!this.getSelectedRecord() || (this.getSelectedRecord().id === record._originalId)) {
+    // if there is already a record selected, only force reselecting that record if the editCompletionEvent was 'programmatic', 
+    // otherwise ('enter', 'tab', etc) it is not needed, and doing it causes https://issues.openbravo.com/view.php?id=27957  
+    if (!this.getSelectedRecord() || (editCompletionEvent === 'programmatic' && this.getSelectedRecord().id === record._originalId)) {
       this.selectRecord(record);
       keepSelection = true;
       this.view.refreshChildViews(keepSelection);
@@ -3066,6 +3075,13 @@
     var newRow = nextEditCell && nextEditCell[0] !== rowNum;
     var enterKey = editCompletionEvent === 'enter';
 
+    // if event was triggered by pressing the enter key, do not continue if the current edit field is not the one focused when the enter key was pressed
+    // this happens for instance when a value is selected from a pick list by pressing enter. if that happens the value is selected, the focus is moved to the 
+    // next form item and the cellEditEnd function can be invoked for the form item that just got the focus
+    if (enterKey && editField.name !== this.getEditForm().lastKeyDownItem.name) {
+      return;
+    }
+
     // no newValue, compute it, this because in the super method there is a check
     // how many arguments are passed on, sometimes the newValue is not passed in
     // and then it must be recomputed, so if we then use the undefined newValue
@@ -3735,11 +3751,18 @@
         field = this.getFieldFromColumnName(prop);
         // This call to the FIC was done to retrieve the missing values
         // Do not try to overwrite the existing values
-        if (field && !this.getRecord(rowNum)[field.property]) {
+	if (field && !this.fieldIsVisible(field.property) && !this.getRecord(rowNum)[field.property]) {
           grid.processColumnValue(rowNum, prop, columnValues[prop]);
         }
       }
     }
+  },
+
+  fieldIsVisible: function (fieldName) {
+    // this.getFields returns the list of fields that are currently visible in the grid,
+    // as opposed to this.completeFields that contains the whole list of fields that can be shown in the grid
+    var visibleFields = this.getFields();
+    return visibleFields.containsProperty('name', fieldName);
   }
 });
 
@@ -3975,4 +3998,4 @@
     this.Super('showMember', arguments);
   }
 
-});
\ No newline at end of file
+});
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view-datasource.js	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view-datasource.js	Wed Feb 11 09:31:54 2015 +0100
@@ -157,6 +157,8 @@
     }
   },
 
+  // delete null values of columns that do not have a field
+  // this prevents setting to null the value of a column just because it was not returned by the datasource due to not having an active field
   deleteNulls: function (data) {
     var column;
     for (column in data) {
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js	Wed Feb 11 09:31:54 2015 +0100
@@ -264,17 +264,19 @@
 
     this.toolBar.updateButtonState(true, false, true);
 
-    // It will only enter if this is a lazy initialized tab
+    // Update the subtab visibility before the tabs are shown to the client
+    this.handleDefaultTreeView();
+    this.updateSubtabVisibility();
+  },
+
+  // updates some view properties based on its uiPattern
+  updateViewBasedOnUiPattern: function () {
     // this.standardWindow.getClass().uiPattern will only exists after setWindowSettings is executed
     if (this.standardWindow.getClass().uiPattern) {
       this.setReadOnly(this.standardWindow.getClass().uiPattern[this.tabId] === isc.OBStandardView.UI_PATTERN_READONLY);
       this.setSingleRecord(this.standardWindow.getClass().uiPattern[this.tabId] === isc.OBStandardView.UI_PATTERN_SINGLERECORD);
       this.setEditOrDeleteOnly(this.standardWindow.getClass().uiPattern[this.tabId] === isc.OBStandardView.UI_PATTERN_EDITORDELETEONLY);
     }
-
-    // Update the subtab visibility before the tabs are shown to the client
-    this.handleDefaultTreeView();
-    this.updateSubtabVisibility();
   },
 
   show: function () {
@@ -369,6 +371,8 @@
       if (!lazyFiltering) {
         if (!this.standardWindow.checkIfDefaultSavedView()) {
           this.viewGrid.fetchData(this.viewGrid.getCriteria());
+        } else {
+          this.dataLoadDelayedForDefaultSavedView = true;
         }
       }
       this.refreshContents = false;
@@ -893,6 +897,8 @@
     // build the structure of the children
     childView.buildStructure();
 
+    childView.updateViewBasedOnUiPattern();
+
     var childTabDef = {
       title: childView.tabTitle,
       pane: childView
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js	Wed Feb 11 09:31:54 2015 +0100
@@ -519,8 +519,8 @@
 
     // find the default view, the personalizations are
     // returned in order of prio, then do sort by name
-    if (this.getClass().personalization.views) {
-      views = this.getClass().personalization.views;
+    views = this.getClass().personalization.views;
+    if (views && isc.isA.Array(views) && views.length > 0) {
       length = views.length;
 
       this.getClass().personalization.views.sort(function (v1, v2) {
@@ -569,6 +569,13 @@
           }
         }
       }
+    } else {
+      if (this.view.dataLoadDelayedForDefaultSavedView) {
+        // it might happen that the load of the initial grid data was delayed because it had a 
+        // default saved view, but then the default saved view is not returned by the WindowSettingsActionHandler.
+        // in that case, detect it and load the grid now
+        this.view.viewGrid.fetchData(this.view.viewGrid.getCriteria());
+      }
     }
 
     // restore focus as the focusitem may have been hidden now
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-grid.js	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-grid.js	Wed Feb 11 09:31:54 2015 +0100
@@ -528,6 +528,10 @@
   },
 
   clearFilter: function () {
+    if (this.lazyFiltering && this.filterClause) {
+      // store that the filter has been removed to enable showing potential new records
+      this.filterClauseJustRemoved = true;
+    }
     this.filterClause = null;
     this._cleaningFilter = true;
     this.contentView.messageBar.hide();
@@ -829,6 +833,11 @@
     } else {
       this.Super('getMinFieldWidth', arguments);
     }
+  },
+
+  refreshGrid: function () {
+    // fetch the data with the current criteria and context info
+    this.filterData(this.getCriteria(), null, this.getContextInfo());
   }
 
 });
\ No newline at end of file
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities-date.js	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities-date.js	Wed Feb 11 09:31:54 2015 +0100
@@ -467,4 +467,13 @@
     newDate.setHours(newDate.getHours() + 1);
   }
   return newDate;
+};
+
+//** {{{ OB.Utilities.Date.getDateSeparator }}} **
+//
+// Returns the date separator
+OB.Utilities.Date.getDateSeparator = function (dateFormat) {
+  // obtains the date separator by selecting the first characters that is not 'D', 'M' or 'Y'
+  return dateFormat.toUpperCase().replace(/D/g, '').replace(/M/g, '').replace(/Y/g, '').substr(0, 1);
+
 };
\ No newline at end of file
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities-number.js	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities-number.js	Wed Feb 11 09:31:54 2015 +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-2014 Openbravo SLU
+ * All portions are Copyright (C) 2011-2015 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -447,18 +447,23 @@
     }
     //Create the final number
     number = '0.' + zeros + coeficient;
-  } else if (exponent.indexOf('+') !== -1) { // Case the number is bigger than 1
-    numberOfZeros = exponent.substring(1, exponent.length);
+  } else { // Case the number is bigger than 1
+    numberOfZeros = exponent.indexOf('+') !== -1 ? exponent.substring(1, exponent.length) : exponent;
     if (split) {
       numberOfZeros = numberOfZeros - split[1].length;
     }
 
-    //Create the string of zeros
-    for (i = 0; i < numberOfZeros; i++) {
-      zeros = zeros + '0';
+    if (numberOfZeros >= 0) {
+      //Need to concatenate zeros to the coefficient
+      for (i = 0; i < numberOfZeros; i++) {
+        zeros = zeros + '0';
+      }
+      //Create the final number
+      number = coeficient + zeros;
+    } else {
+      // final decimal number is not integer: add dot decimal separator in the correct position
+      number = coeficient.substr(0, coeficient.length + numberOfZeros) + '.' + coeficient.substr(coeficient.length + numberOfZeros);
     }
-    //Create the final number
-    number = coeficient + zeros;
   }
 
   return number;
--- a/modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE.xml	Wed Feb 11 09:31:54 2015 +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.24019]]></VERSION>
+<!--D393BE6F22BB44B7B728259B34FC795A-->  <VERSION><![CDATA[1.0.24075]]></VERSION>
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <DESCRIPTION><![CDATA[Provides the HTML Widget superclass that allows to create widget classes that embed the html code.]]></DESCRIPTION>
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <HELP><![CDATA[With this module you can define your own widget classes just setting up your own html code or the html code provided by third parties.]]></HELP>
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <URL><![CDATA[http://forge.openbravo.com/projects/htmlwidget]]></URL>
@@ -21,7 +21,7 @@
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <HASCHARTOFACCOUNTS><![CDATA[N]]></HASCHARTOFACCOUNTS>
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
-<!--D393BE6F22BB44B7B728259B34FC795A-->  <VERSION_LABEL><![CDATA[PR14Q3.1]]></VERSION_LABEL>
+<!--D393BE6F22BB44B7B728259B34FC795A-->  <VERSION_LABEL><![CDATA[PR14Q3.6]]></VERSION_LABEL>
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--D393BE6F22BB44B7B728259B34FC795A-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--D393BE6F22BB44B7B728259B34FC795A--></AD_MODULE>
--- a/modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.client.htmlwidget/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Feb 11 09:31:54 2015 +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.24019]]></STARTVERSION>
+<!--DCE798FBC5B648F7A3C81A6941720A57-->  <STARTVERSION><![CDATA[2.1.24075]]></STARTVERSION>
 <!--DCE798FBC5B648F7A3C81A6941720A57-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--DCE798FBC5B648F7A3C81A6941720A57-->  <DEPENDANT_MODULE_NAME><![CDATA[My Openbravo Tab]]></DEPENDANT_MODULE_NAME>
 <!--DCE798FBC5B648F7A3C81A6941720A57-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE.xml	Wed Feb 11 09:31:54 2015 +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.24019]]></VERSION>
+<!--4B828F4D03264080AA1D2057B13F613C-->  <VERSION><![CDATA[2.1.24075]]></VERSION>
 <!--4B828F4D03264080AA1D2057B13F613C-->  <DESCRIPTION><![CDATA[Provides framework functionality for the Openbravo User Interface]]></DESCRIPTION>
 <!--4B828F4D03264080AA1D2057B13F613C-->  <HELP><![CDATA[The user interface client kernel is a generation framework for generating client (browser) components used in Openbravo. Its components are mainly used by other modules to provide customizable and extendable user interfaces.]]></HELP>
 <!--4B828F4D03264080AA1D2057B13F613C-->  <URL><![CDATA[http://forge.openbravo.com/projects/openbravoclientkernel]]></URL>
@@ -22,7 +22,7 @@
 <!--4B828F4D03264080AA1D2057B13F613C-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--4B828F4D03264080AA1D2057B13F613C-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
 <!--4B828F4D03264080AA1D2057B13F613C-->  <UPDATEINFO><![CDATA[Bug fix for issue 15289]]></UPDATEINFO>
-<!--4B828F4D03264080AA1D2057B13F613C-->  <VERSION_LABEL><![CDATA[PR14Q3.1]]></VERSION_LABEL>
+<!--4B828F4D03264080AA1D2057B13F613C-->  <VERSION_LABEL><![CDATA[PR14Q3.6]]></VERSION_LABEL>
 <!--4B828F4D03264080AA1D2057B13F613C-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--4B828F4D03264080AA1D2057B13F613C-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--4B828F4D03264080AA1D2057B13F613C--></AD_MODULE>
--- a/modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Feb 11 09:31:54 2015 +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.24019]]></STARTVERSION>
+<!--26B041893E844A53AFA58BC326C4F0D7-->  <STARTVERSION><![CDATA[3.0.24075]]></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.24019]]></STARTVERSION>
+<!--3AB045DA35ED4CA58EF7EB5BF04CDE3F-->  <STARTVERSION><![CDATA[1.1.24075]]></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.24019]]></STARTVERSION>
+<!--D7BA4BB0844942C58DC46B9E23CF8E67-->  <STARTVERSION><![CDATA[2.0.24075]]></STARTVERSION>
 <!--D7BA4BB0844942C58DC46B9E23CF8E67-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--D7BA4BB0844942C58DC46B9E23CF8E67-->  <DEPENDANT_MODULE_NAME><![CDATA[JSON REST Webservice]]></DEPENDANT_MODULE_NAME>
 <!--D7BA4BB0844942C58DC46B9E23CF8E67-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE.xml	Wed Feb 11 09:31:54 2015 +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.24019]]></VERSION>
+<!--2758CD25B2704AF6BBAD10365FC82C06-->  <VERSION><![CDATA[2.1.24075]]></VERSION>
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <DESCRIPTION><![CDATA[Workspace & Widgets]]></DESCRIPTION>
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <HELP><![CDATA[Provides the infrastructure of workspace tab (formerly My Openbravo)]]></HELP>
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <URL><![CDATA[http://forge.openbravo.com/projects/myopenbravo]]></URL>
@@ -23,7 +23,7 @@
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <HASREFERENCEDATA><![CDATA[Y]]></HASREFERENCEDATA>
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <UPDATEINFO><![CDATA[Styling bugfixing]]></UPDATEINFO>
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <REFERENCEDATAINFO><![CDATA[Provides the infrastructure of workspace tab]]></REFERENCEDATAINFO>
-<!--2758CD25B2704AF6BBAD10365FC82C06-->  <VERSION_LABEL><![CDATA[PR14Q3.1]]></VERSION_LABEL>
+<!--2758CD25B2704AF6BBAD10365FC82C06-->  <VERSION_LABEL><![CDATA[PR14Q3.6]]></VERSION_LABEL>
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--2758CD25B2704AF6BBAD10365FC82C06-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--2758CD25B2704AF6BBAD10365FC82C06--></AD_MODULE>
--- a/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Feb 11 09:31:54 2015 +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.24019]]></STARTVERSION>
+<!--15F51F03882F444CAB6593B4566DC929-->  <STARTVERSION><![CDATA[2.1.24075]]></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.24019]]></STARTVERSION>
+<!--E71B28FC949D481D9F59C17D01E46EF9-->  <STARTVERSION><![CDATA[3.0.24075]]></STARTVERSION>
 <!--E71B28FC949D481D9F59C17D01E46EF9-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--E71B28FC949D481D9F59C17D01E46EF9-->  <DEPENDANT_MODULE_NAME><![CDATA[Core]]></DEPENDANT_MODULE_NAME>
 <!--E71B28FC949D481D9F59C17D01E46EF9-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MESSAGE.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MESSAGE.xml	Wed Feb 11 09:31:54 2015 +0100
@@ -6,7 +6,7 @@
 <!--18EE399F2AF54EA3BEB5086D4BF6D4B1-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--18EE399F2AF54EA3BEB5086D4BF6D4B1-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--18EE399F2AF54EA3BEB5086D4BF6D4B1-->  <VALUE><![CDATA[OBCQL_RowsNumber]]></VALUE>
-<!--18EE399F2AF54EA3BEB5086D4BF6D4B1-->  <MSGTEXT><![CDATA[Showing %0 of %1 rows]]></MSGTEXT>
+<!--18EE399F2AF54EA3BEB5086D4BF6D4B1-->  <MSGTEXT><![CDATA[Showing %0 of many rows]]></MSGTEXT>
 <!--18EE399F2AF54EA3BEB5086D4BF6D4B1-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
 <!--18EE399F2AF54EA3BEB5086D4BF6D4B1-->  <AD_MODULE_ID><![CDATA[0A060B2AF1974E8EAA8DB61388E9AECC]]></AD_MODULE_ID>
 <!--18EE399F2AF54EA3BEB5086D4BF6D4B1-->  <ISINCLUDEINI18N><![CDATA[N]]></ISINCLUDEINI18N>
--- a/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE.xml	Wed Feb 11 09:31:54 2015 +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.24019]]></VERSION>
+<!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <VERSION><![CDATA[1.0.24075]]></VERSION>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <DESCRIPTION><![CDATA[Provides the Query/List superclass widget that allows to create widget classes that prints a grid of data based on a query.]]></DESCRIPTION>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <HELP><![CDATA[With this module you can define your own widget classes that just with simple Application Dictionary shows a grid of data based on a HQL Query.]]></HELP>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <URL><![CDATA[http://forge.openbravo.com/projects/querylistwidget]]></URL>
@@ -21,7 +21,7 @@
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <HASCHARTOFACCOUNTS><![CDATA[N]]></HASCHARTOFACCOUNTS>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
-<!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <VERSION_LABEL><![CDATA[PR14Q3.1]]></VERSION_LABEL>
+<!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <VERSION_LABEL><![CDATA[PR14Q3.6]]></VERSION_LABEL>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--0A060B2AF1974E8EAA8DB61388E9AECC--></AD_MODULE>
--- a/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Feb 11 09:31:54 2015 +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.24019]]></STARTVERSION>
+<!--26558497C31140BFAB067BA4BC47D799-->  <STARTVERSION><![CDATA[2.1.24075]]></STARTVERSION>
 <!--26558497C31140BFAB067BA4BC47D799-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--26558497C31140BFAB067BA4BC47D799-->  <DEPENDANT_MODULE_NAME><![CDATA[My Openbravo Tab]]></DEPENDANT_MODULE_NAME>
 <!--26558497C31140BFAB067BA4BC47D799-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.client.querylist/web/org.openbravo.client.querylist/js/ob-querylist-widget.js	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.client.querylist/web/org.openbravo.client.querylist/js/ob-querylist-widget.js	Wed Feb 11 09:31:54 2015 +0100
@@ -182,19 +182,24 @@
   },
 
   setTotalRows: function (totalRows) {
+    // totalRows is the total number of rows retrieved from backend, in order to
+    // improve performance count of actual number of records is not performed, so
+    // we can only give a hint about having more items in case it is equal to the
+    // rows num parameter
     this.totalRows = totalRows;
     if (this.viewMode === 'maximized') {
-      this.setTitle(this.widgetTitle + " (" + this.totalRows + ")");
       this.showAllLabel.hide();
       return;
     }
-    if (this.showAllLabel.getMembers()[0]) {
-      this.showAllLabel.getMembers()[0].setContents(
-      OB.I18N.getLabel('OBCQL_RowsNumber', [this.parameters.RowsNumber, this.totalRows]));
-    }
-    if (this.parameters.showAll || this.totalRows <= this.parameters.RowsNumber) {
+
+    if (this.parameters.showAll || this.totalRows < this.parameters.RowsNumber) {
+      // if showing pagination or all the records, hide the label
       this.showAllLabel.hide();
     } else {
+      if (this.showAllLabel.getMembers()[0]) {
+        this.showAllLabel.getMembers()[0].setContents(
+        OB.I18N.getLabel('OBCQL_RowsNumber', [this.parameters.RowsNumber]));
+      }
       this.showAllLabel.show();
     }
     this.setWidgetHeight();
@@ -220,6 +225,9 @@
   canAutoFitFields: false,
   showGridSummary: true,
 
+  // prevent multiple requests for 1st page
+  drawAllMaxCells: 0,
+
   summaryRowProperties: {
     showEmptyMessage: false
   },
@@ -288,6 +296,9 @@
     params.viewMode = this.widget.viewMode;
     params.showAll = this.widget.parameters.showAll;
     params.UTCOffsetMiliseconds = OB.Utilities.Date.getUTCOffsetInMiliseconds();
+
+    // prevent the count operation
+    params[isc.OBViewGrid.NO_COUNT_PARAMETER] = 'true';
     return params;
   },
 
@@ -337,10 +348,8 @@
       requestProperties.params.showAll = true;
       // sometimes we get here before the datasource
       // is set
-      if (this.dataSource) {
-        this.dataSource.fetchData(criteria, function (dsResponse, data, dsRequest) {
-          dsResponse.clientContext.grid.widget.setTotalRows(dsResponse.totalRows);
-        }, requestProperties);
+      if (dsResponse) {
+        this.widget.setTotalRows(dsResponse.totalRows);
       }
     } else {
       this.widget.setTotalRows(dsResponse.totalRows);
--- a/modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE.xml	Wed Feb 11 09:31:54 2015 +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.24019]]></VERSION>
+<!--FF8080812D842086012D844F3CC0003E-->  <VERSION><![CDATA[0.0.24075]]></VERSION>
 <!--FF8080812D842086012D844F3CC0003E-->  <DESCRIPTION><![CDATA[Collection of Workspace Widgets]]></DESCRIPTION>
 <!--FF8080812D842086012D844F3CC0003E-->  <HELP><![CDATA[Collection of Workspace Widgets]]></HELP>
 <!--FF8080812D842086012D844F3CC0003E-->  <URL><![CDATA[http://forge.openbravo.com/projects/widgetscollection]]></URL>
@@ -22,7 +22,7 @@
 <!--FF8080812D842086012D844F3CC0003E-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--FF8080812D842086012D844F3CC0003E-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
 <!--FF8080812D842086012D844F3CC0003E-->  <UPDATEINFO><![CDATA[Added Currency Converter. Added Google Docs]]></UPDATEINFO>
-<!--FF8080812D842086012D844F3CC0003E-->  <VERSION_LABEL><![CDATA[PR14Q3.1]]></VERSION_LABEL>
+<!--FF8080812D842086012D844F3CC0003E-->  <VERSION_LABEL><![CDATA[PR14Q3.6]]></VERSION_LABEL>
 <!--FF8080812D842086012D844F3CC0003E-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--FF8080812D842086012D844F3CC0003E-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--FF8080812D842086012D844F3CC0003E--></AD_MODULE>
--- a/modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.client.widgets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Feb 11 09:31:54 2015 +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.24019]]></STARTVERSION>
+<!--FF8080812D842086012D845002070046-->  <STARTVERSION><![CDATA[2.1.24075]]></STARTVERSION>
 <!--FF8080812D842086012D845002070046-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--FF8080812D842086012D845002070046-->  <DEPENDANT_MODULE_NAME><![CDATA[Workspace & Widgets]]></DEPENDANT_MODULE_NAME>
 <!--FF8080812D842086012D845002070046-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE.xml	Wed Feb 11 09:31:54 2015 +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.24019]]></VERSION>
+<!--2A5EE903D7974AC298C0504FBC4501A7-->  <VERSION><![CDATA[3.0.24075]]></VERSION>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <DESCRIPTION><![CDATA[Payment Report]]></DESCRIPTION>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <URL><![CDATA[http://forge.openbravo.com/projects/paymentreport]]></URL>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <TYPE><![CDATA[M]]></TYPE>
@@ -22,7 +22,7 @@
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <HASCHARTOFACCOUNTS><![CDATA[N]]></HASCHARTOFACCOUNTS>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
-<!--2A5EE903D7974AC298C0504FBC4501A7-->  <VERSION_LABEL><![CDATA[PR14Q3.1]]></VERSION_LABEL>
+<!--2A5EE903D7974AC298C0504FBC4501A7-->  <VERSION_LABEL><![CDATA[PR14Q3.6]]></VERSION_LABEL>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--2A5EE903D7974AC298C0504FBC4501A7-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--2A5EE903D7974AC298C0504FBC4501A7--></AD_MODULE>
--- a/modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Feb 11 09:31:54 2015 +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.24019]]></STARTVERSION>
+<!--A3B449C4D5FE4D688CC58236FE33B802-->  <STARTVERSION><![CDATA[3.0.24075]]></STARTVERSION>
 <!--A3B449C4D5FE4D688CC58236FE33B802-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--A3B449C4D5FE4D688CC58236FE33B802-->  <DEPENDANT_MODULE_NAME><![CDATA[Advanced Payables and Receivables Mngmt]]></DEPENDANT_MODULE_NAME>
 <!--A3B449C4D5FE4D688CC58236FE33B802-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE.xml	Wed Feb 11 09:31:54 2015 +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.24019]]></VERSION>
+<!--3A3A943684D64DEF9EC39F588A656848-->  <VERSION><![CDATA[1.1.24075]]></VERSION>
 <!--3A3A943684D64DEF9EC39F588A656848-->  <DESCRIPTION><![CDATA[Report displaying sales orders not shipped.]]></DESCRIPTION>
 <!--3A3A943684D64DEF9EC39F588A656848-->  <URL><![CDATA[http://forge.openbravo.com/projects/ordersawaitingdlivery]]></URL>
 <!--3A3A943684D64DEF9EC39F588A656848-->  <TYPE><![CDATA[M]]></TYPE>
@@ -19,7 +19,7 @@
 <!--3A3A943684D64DEF9EC39F588A656848-->  <HASCHARTOFACCOUNTS><![CDATA[N]]></HASCHARTOFACCOUNTS>
 <!--3A3A943684D64DEF9EC39F588A656848-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--3A3A943684D64DEF9EC39F588A656848-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
-<!--3A3A943684D64DEF9EC39F588A656848-->  <VERSION_LABEL><![CDATA[PR14Q3.1]]></VERSION_LABEL>
+<!--3A3A943684D64DEF9EC39F588A656848-->  <VERSION_LABEL><![CDATA[PR14Q3.6]]></VERSION_LABEL>
 <!--3A3A943684D64DEF9EC39F588A656848-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--3A3A943684D64DEF9EC39F588A656848-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--3A3A943684D64DEF9EC39F588A656848--></AD_MODULE>
--- a/modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.reports.ordersawaitingdelivery/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Feb 11 09:31:54 2015 +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.24019]]></STARTVERSION>
+<!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <STARTVERSION><![CDATA[3.0.24075]]></STARTVERSION>
 <!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <DEPENDANT_MODULE_NAME><![CDATA[core]]></DEPENDANT_MODULE_NAME>
 <!--64060E9EE9EC408BBFFD0CC2DE25C86F-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE.xml	Wed Feb 11 09:31:54 2015 +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.24019]]></VERSION>
+<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <VERSION><![CDATA[2.1.24075]]></VERSION>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <DESCRIPTION><![CDATA[Provides data source CRUD functionality using JSON as the data format]]></DESCRIPTION>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <HELP><![CDATA[This module implements the datasource concept. Datasources play a central role in Smartclient applications. The datasource module automatically creates a datasource for each Openbravo entity. In addition custom data source implementations can be defined.]]></HELP>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <URL><![CDATA[http://forge.openbravo.com/projects/datasourceservice]]></URL>
@@ -22,7 +22,7 @@
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <UPDATEINFO><![CDATA[Bug fixing & new development for 3.0]]></UPDATEINFO>
-<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <VERSION_LABEL><![CDATA[PR14Q3.1]]></VERSION_LABEL>
+<!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <VERSION_LABEL><![CDATA[PR14Q3.6]]></VERSION_LABEL>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--A44B9BA75C354D8FB2E3F7D6EB6BFDC4--></AD_MODULE>
--- a/modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Feb 11 09:31:54 2015 +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.24019]]></STARTVERSION>
+<!--0BA071C783CC4984AC9C03BB7CAA87C7-->  <STARTVERSION><![CDATA[1.1.24075]]></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.24019]]></STARTVERSION>
+<!--3E531F0CD0A54130996F5AF3B6A2D01B-->  <STARTVERSION><![CDATA[2.0.24075]]></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.24019]]></STARTVERSION>
+<!--4FCE95802A854F7E8623AFF7C33D13EE-->  <STARTVERSION><![CDATA[3.0.24075]]></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.24019]]></STARTVERSION>
+<!--54AF8B39C55E4E7496902893ECD82786-->  <STARTVERSION><![CDATA[2.1.24075]]></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.24019]]></STARTVERSION>
+<!--D03C56D8A4E14F45A5466350E05C631F-->  <STARTVERSION><![CDATA[8.1.24075]]></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.integration.google/src-db/database/sourcedata/AD_MODULE.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE.xml	Wed Feb 11 09:31:54 2015 +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.24019]]></VERSION>
+<!--FF8080813129ADA401312CA1222A0005-->  <VERSION><![CDATA[0.1.24075]]></VERSION>
 <!--FF8080813129ADA401312CA1222A0005-->  <DESCRIPTION><![CDATA[Integration with Google APIs]]></DESCRIPTION>
 <!--FF8080813129ADA401312CA1222A0005-->  <TYPE><![CDATA[M]]></TYPE>
 <!--FF8080813129ADA401312CA1222A0005-->  <LICENSE><![CDATA[Licensed under the Openbravo Public License Version 1.1.
@@ -18,7 +18,7 @@
 <!--FF8080813129ADA401312CA1222A0005-->  <HASCHARTOFACCOUNTS><![CDATA[N]]></HASCHARTOFACCOUNTS>
 <!--FF8080813129ADA401312CA1222A0005-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--FF8080813129ADA401312CA1222A0005-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
-<!--FF8080813129ADA401312CA1222A0005-->  <VERSION_LABEL><![CDATA[PR14Q3.1]]></VERSION_LABEL>
+<!--FF8080813129ADA401312CA1222A0005-->  <VERSION_LABEL><![CDATA[PR14Q3.6]]></VERSION_LABEL>
 <!--FF8080813129ADA401312CA1222A0005-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--FF8080813129ADA401312CA1222A0005-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--FF8080813129ADA401312CA1222A0005--></AD_MODULE>
--- a/modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.service.integration.google/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Feb 11 09:31:54 2015 +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.24019]]></STARTVERSION>
+<!--FF8080813141B198013141BA0F7D0012-->  <STARTVERSION><![CDATA[0.1.24075]]></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.24019]]></STARTVERSION>
+<!--FF8080813151AEE1013151C4ACE6001B-->  <STARTVERSION><![CDATA[2.1.24075]]></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	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE.xml	Wed Feb 11 09:31:54 2015 +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.24019]]></VERSION>
+<!--FF8080813141B198013141B86DD70003-->  <VERSION><![CDATA[0.1.24075]]></VERSION>
 <!--FF8080813141B198013141B86DD70003-->  <DESCRIPTION><![CDATA[OpenID Service Integration]]></DESCRIPTION>
 <!--FF8080813141B198013141B86DD70003-->  <TYPE><![CDATA[M]]></TYPE>
 <!--FF8080813141B198013141B86DD70003-->  <LICENSE><![CDATA[Licensed under the Openbravo Public License Version 1.1.
@@ -19,7 +19,7 @@
 <!--FF8080813141B198013141B86DD70003-->  <HASCHARTOFACCOUNTS><![CDATA[N]]></HASCHARTOFACCOUNTS>
 <!--FF8080813141B198013141B86DD70003-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--FF8080813141B198013141B86DD70003-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
-<!--FF8080813141B198013141B86DD70003-->  <VERSION_LABEL><![CDATA[PR14Q3.1]]></VERSION_LABEL>
+<!--FF8080813141B198013141B86DD70003-->  <VERSION_LABEL><![CDATA[PR14Q3.6]]></VERSION_LABEL>
 <!--FF8080813141B198013141B86DD70003-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--FF8080813141B198013141B86DD70003-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--FF8080813141B198013141B86DD70003--></AD_MODULE>
--- a/modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.service.integration.openid/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Feb 11 09:31:54 2015 +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.24019]]></STARTVERSION>
+<!--FF8080813141B198013141B8B21B0006-->  <STARTVERSION><![CDATA[3.0.24075]]></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	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.service.json/src-db/database/sourcedata/AD_MODULE.xml	Wed Feb 11 09:31:54 2015 +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.24019]]></VERSION>
+<!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <VERSION><![CDATA[2.0.24075]]></VERSION>
 <!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <DESCRIPTION><![CDATA[Provides a JSON REST webservice for CRUD service requests]]></DESCRIPTION>
 <!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <HELP><![CDATA[Provides a JSON REST webservice for CRUD service requests. Both the servlet implementation (receiving HTTP REST requests in JSON) as the backend processing are provided.]]></HELP>
 <!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <URL><![CDATA[http://forge.openbravo.com/projects/openbravojsonrest]]></URL>
@@ -22,7 +22,7 @@
 <!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
 <!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <UPDATEINFO><![CDATA[Bug fixing & new development for 3.0]]></UPDATEINFO>
-<!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <VERSION_LABEL><![CDATA[PR14Q3.1]]></VERSION_LABEL>
+<!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <VERSION_LABEL><![CDATA[PR14Q3.6]]></VERSION_LABEL>
 <!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--F8D1B3ECB3474E8DA5C216473C840DF1-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--F8D1B3ECB3474E8DA5C216473C840DF1--></AD_MODULE>
--- a/modules/org.openbravo.service.json/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.service.json/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Feb 11 09:31:54 2015 +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.24019]]></STARTVERSION>
+<!--9E3E7B42DB16405FB794496D309D7044-->  <STARTVERSION><![CDATA[3.0.24075]]></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	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.service.json/src/org/openbravo/service/json/AdvancedQueryBuilder.java	Wed Feb 11 09:31:54 2015 +0100
@@ -54,7 +54,9 @@
 import org.openbravo.model.ad.datamodel.Table;
 import org.openbravo.model.ad.domain.Reference;
 import org.openbravo.model.ad.domain.ReferencedTable;
+import org.openbravo.model.ad.system.Client;
 import org.openbravo.model.ad.ui.Tab;
+import org.openbravo.model.common.enterprise.Organization;
 import org.openbravo.service.db.DalConnectionProvider;
 
 /**
@@ -211,9 +213,27 @@
 
     if (subEntity != null) {
       // if there's subentity, process it as a subquery with "exists"
-      String subEntityClientOrg = " and e.organization.id "
+
+      String orgPath;
+      if (subEntity.getMappingClass().isAssignableFrom(Organization.class)) {
+        // special case subentity is Organization, so no extra path required to get it
+        orgPath = "e";
+      } else {
+        orgPath = "e.organization";
+      }
+
+      String subEntityClientOrg = " and " + orgPath + ".id "
           + createInClause(OBContext.getOBContext().getReadableOrganizations());
-      subEntityClientOrg += " and e.client.id "
+
+      String clientPath;
+      if (subEntity.getMappingClass().isAssignableFrom(Client.class)) {
+        // special case subentity is Client, so no extra path required to get it
+        clientPath = "e";
+      } else {
+        clientPath = "e.client";
+      }
+
+      subEntityClientOrg += " and " + clientPath + ".id "
           + createInClause(OBContext.getOBContext().getReadableClients());
 
       AdvancedQueryBuilder subEntityQueryBuilder = subDataEntityQueryService.getQueryBuilder();
--- a/modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java	Wed Feb 11 09:31:54 2015 +0100
@@ -238,9 +238,14 @@
     final DataEntityQueryService queryService = createSetQueryService(parameters, false);
     queryService.setEntityName(entityName);
 
+    String selectedProperties = parameters.get(JsonConstants.SELECTEDPROPERTIES_PARAMETER);
+
     final DataToJsonConverter toJsonConverter = OBProvider.getInstance().get(
         DataToJsonConverter.class);
     toJsonConverter.setAdditionalProperties(JsonUtils.getAdditionalProperties(parameters));
+    // Convert to Json only the properties specified in the request. If no properties are specified,
+    // all of them will be converted to Json
+    toJsonConverter.setSelectedProperties(selectedProperties);
 
     final ScrollableResults scrollableResults = queryService.scroll();
     try {
--- a/modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODULE.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODULE.xml	Wed Feb 11 09:31:54 2015 +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.24019]]></VERSION>
+<!--5EB4F15C80684ACA904756BDC12ADBE5-->  <VERSION><![CDATA[2.1.24075]]></VERSION>
 <!--5EB4F15C80684ACA904756BDC12ADBE5-->  <DESCRIPTION><![CDATA[Provides a selector with a suggestion box and popup grid window]]></DESCRIPTION>
 <!--5EB4F15C80684ACA904756BDC12ADBE5-->  <HELP><![CDATA[The Openbravo selector provides new selector functionality which is used inside of existing Openbravo forms. The selector is mainly used for supporting foreign key references in the user interface. The selector combines both suggestion box behavior with a popup grid.]]></HELP>
 <!--5EB4F15C80684ACA904756BDC12ADBE5-->  <URL><![CDATA[http://forge.openbravo.com/projects/selector]]></URL>
@@ -22,7 +22,7 @@
 <!--5EB4F15C80684ACA904756BDC12ADBE5-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--5EB4F15C80684ACA904756BDC12ADBE5-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
 <!--5EB4F15C80684ACA904756BDC12ADBE5-->  <UPDATEINFO><![CDATA[Bug fixing & new development for 3.0]]></UPDATEINFO>
-<!--5EB4F15C80684ACA904756BDC12ADBE5-->  <VERSION_LABEL><![CDATA[PR14Q3.1]]></VERSION_LABEL>
+<!--5EB4F15C80684ACA904756BDC12ADBE5-->  <VERSION_LABEL><![CDATA[PR14Q3.6]]></VERSION_LABEL>
 <!--5EB4F15C80684ACA904756BDC12ADBE5-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--5EB4F15C80684ACA904756BDC12ADBE5-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--5EB4F15C80684ACA904756BDC12ADBE5--></AD_MODULE>
--- a/modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Feb 11 09:31:54 2015 +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.24019]]></STARTVERSION>
+<!--38825CAED43941D38CA0C78DB04FCFA0-->  <STARTVERSION><![CDATA[8.1.24075]]></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.24019]]></STARTVERSION>
+<!--6DDE7B1A70174242AF82B5022FB89279-->  <STARTVERSION><![CDATA[2.1.24075]]></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.24019]]></STARTVERSION>
+<!--94F9CD2CB5EF4467A67475C786C984A7-->  <STARTVERSION><![CDATA[2.1.24075]]></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.24019]]></STARTVERSION>
+<!--BCCB5A08EC0446DE8BCE191C6BC607A4-->  <STARTVERSION><![CDATA[1.1.24075]]></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.24019]]></STARTVERSION>
+<!--C8DAC574B88649D08C9468521B343F12-->  <STARTVERSION><![CDATA[3.0.24075]]></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.24019]]></STARTVERSION>
+<!--F14EB17946BE4724A46F80CB1A47EC70-->  <STARTVERSION><![CDATA[2.1.24075]]></STARTVERSION>
 <!--F14EB17946BE4724A46F80CB1A47EC70-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--F14EB17946BE4724A46F80CB1A47EC70-->  <DEPENDANT_MODULE_NAME><![CDATA[JSON Datasource]]></DEPENDANT_MODULE_NAME>
 <!--F14EB17946BE4724A46F80CB1A47EC70-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/OBUISEL_SELECTOR.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.userinterface.selector/src-db/database/sourcedata/OBUISEL_SELECTOR.xml	Wed Feb 11 09:31:54 2015 +0100
@@ -14,7 +14,7 @@
 <!--387D9FFC48A74054835C5DF6E6FD08F7-->  <VALUEFIELD_ID><![CDATA[DD28F69792084E7F8EBBF2FA94F52A5F]]></VALUEFIELD_ID>
 <!--387D9FFC48A74054835C5DF6E6FD08F7-->  <DISPLAYFIELD_ID><![CDATA[DD28F69792084E7F8EBBF2FA94F52A5F]]></DISPLAYFIELD_ID>
 <!--387D9FFC48A74054835C5DF6E6FD08F7-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--387D9FFC48A74054835C5DF6E6FD08F7-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--387D9FFC48A74054835C5DF6E6FD08F7-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--387D9FFC48A74054835C5DF6E6FD08F7-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--387D9FFC48A74054835C5DF6E6FD08F7--></OBUISEL_SELECTOR>
 
@@ -30,7 +30,7 @@
 <!--E4F389D409DF4EC3B371B69C8A124DA7-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--E4F389D409DF4EC3B371B69C8A124DA7-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--E4F389D409DF4EC3B371B69C8A124DA7-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--E4F389D409DF4EC3B371B69C8A124DA7-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--E4F389D409DF4EC3B371B69C8A124DA7-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--E4F389D409DF4EC3B371B69C8A124DA7-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--E4F389D409DF4EC3B371B69C8A124DA7--></OBUISEL_SELECTOR>
 
@@ -46,7 +46,7 @@
 <!--F959A77A1E494215A8154F12EF91FE74-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--F959A77A1E494215A8154F12EF91FE74-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--F959A77A1E494215A8154F12EF91FE74-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--F959A77A1E494215A8154F12EF91FE74-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--F959A77A1E494215A8154F12EF91FE74-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--F959A77A1E494215A8154F12EF91FE74-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--F959A77A1E494215A8154F12EF91FE74--></OBUISEL_SELECTOR>
 
--- a/modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-widget.js	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-widget.js	Wed Feb 11 09:31:54 2015 +0100
@@ -64,6 +64,7 @@
     // ** {{{ selectorFieldTextBoxStyle }}} **
     // Selector input css classname
     selectorFieldTextBoxStyle: 'selectItemText',
+    pendingTextBoxStyle: null,
 
     // ** {{{ selectorFieldTextBoxStyleRequired }}} **
     // Selector input css classname
@@ -646,6 +647,7 @@
       validateOnChange: true,
       completeOnTab: true,
       valueMap: initialValueMap,
+      addUnknownValues: false,
       icons: [{
         selector: this,
         showFocused: true,
@@ -805,6 +807,8 @@
       this.selectorField.textBoxStyle = isc.OBSelectorWidget.styling.selectorFieldTextBoxStyle;
     }
 
+    this.selectorField.pendingTextBoxStyle = isc.OBSelectorWidget.styling.pendingTextBoxStyle;
+
     this.selectorField.setValue(this.openbravoField.value);
     this.initialValue = this.selectorField.getValue();
 
--- a/modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE.xml	Wed Feb 11 09:31:54 2015 +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.24019]]></VERSION>
+<!--96998CBC42744B3DBEE28AC8095C9335-->  <VERSION><![CDATA[2.0.24075]]></VERSION>
 <!--96998CBC42744B3DBEE28AC8095C9335-->  <DESCRIPTION><![CDATA[Skin module to proper visualization of classic windows inside the MDI interface]]></DESCRIPTION>
 <!--96998CBC42744B3DBEE28AC8095C9335-->  <HELP><![CDATA[With this skin module the classic windows styles will display in a way more coherent with the new 3.00 styles]]></HELP>
 <!--96998CBC42744B3DBEE28AC8095C9335-->  <URL><![CDATA[www.openbravo.com]]></URL>
@@ -23,7 +23,7 @@
 <!--96998CBC42744B3DBEE28AC8095C9335-->  <HASCHARTOFACCOUNTS><![CDATA[N]]></HASCHARTOFACCOUNTS>
 <!--96998CBC42744B3DBEE28AC8095C9335-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--96998CBC42744B3DBEE28AC8095C9335-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
-<!--96998CBC42744B3DBEE28AC8095C9335-->  <VERSION_LABEL><![CDATA[PR14Q3.1]]></VERSION_LABEL>
+<!--96998CBC42744B3DBEE28AC8095C9335-->  <VERSION_LABEL><![CDATA[PR14Q3.6]]></VERSION_LABEL>
 <!--96998CBC42744B3DBEE28AC8095C9335-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--96998CBC42744B3DBEE28AC8095C9335-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--96998CBC42744B3DBEE28AC8095C9335--></AD_MODULE>
--- a/modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.userinterface.skin.250to300Comp/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Feb 11 09:31:54 2015 +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.24019]]></STARTVERSION>
+<!--39BF75AD9AB3453698BF5DE29E727AA9-->  <STARTVERSION><![CDATA[3.0.24075]]></STARTVERSION>
 <!--39BF75AD9AB3453698BF5DE29E727AA9-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--39BF75AD9AB3453698BF5DE29E727AA9-->  <DEPENDANT_MODULE_NAME><![CDATA[core]]></DEPENDANT_MODULE_NAME>
 <!--39BF75AD9AB3453698BF5DE29E727AA9-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.userinterface.smartclient/src-db/database/sourcedata/AD_MODULE.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.userinterface.smartclient/src-db/database/sourcedata/AD_MODULE.xml	Wed Feb 11 09:31:54 2015 +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.24019]]></VERSION>
+<!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <VERSION><![CDATA[8.1.24075]]></VERSION>
 <!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <DESCRIPTION><![CDATA[SmartClient libraries for use within Openbravo]]></DESCRIPTION>
 <!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <HELP><![CDATA[This module contains the SmartClient libraries for usage by other modules. It also contains some simple test pages to validate that SmartClient is working correctly. Also contains generic Openbravo SmartClient components]]></HELP>
 <!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <URL><![CDATA[http://forge.openbravo.com/projects/obsmartclient]]></URL>
@@ -23,7 +23,7 @@
 <!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
 <!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <UPDATEINFO><![CDATA[Bug fixing & new development for 3.0
 Updated to new SmartClient 8.3d 26-May-2012]]></UPDATEINFO>
-<!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <VERSION_LABEL><![CDATA[PR14Q3.1]]></VERSION_LABEL>
+<!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <VERSION_LABEL><![CDATA[PR14Q3.6]]></VERSION_LABEL>
 <!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--EC356CEE3D46416CA1EBEEB9AB82EDB9-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--EC356CEE3D46416CA1EBEEB9AB82EDB9--></AD_MODULE>
--- a/modules/org.openbravo.userinterface.smartclient/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.userinterface.smartclient/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Feb 11 09:31:54 2015 +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.24019]]></STARTVERSION>
+<!--086331E18477496B8AC74D2CFEBD1307-->  <STARTVERSION><![CDATA[3.0.24075]]></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.24019]]></STARTVERSION>
+<!--DC5D4EF450244482BD2B458DAA496333-->  <STARTVERSION><![CDATA[2.1.24075]]></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.24019]]></STARTVERSION>
+<!--F2AF15C0AF5540E393D96BE506E20648-->  <STARTVERSION><![CDATA[1.1.24075]]></STARTVERSION>
 <!--F2AF15C0AF5540E393D96BE506E20648-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--F2AF15C0AF5540E393D96BE506E20648-->  <DEPENDANT_MODULE_NAME><![CDATA[JBoss Weld]]></DEPENDANT_MODULE_NAME>
 <!--F2AF15C0AF5540E393D96BE506E20648-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js	Wed Feb 11 09:31:54 2015 +0100
@@ -520,15 +520,12 @@
     return this.Super('useDisabledEventMask', arguments);
   },
 
-  // handles a corner case where the event of the previous field is called for the current field,
-  // refer issue https://issues.openbravo.com/view.php?id=26817. In this case, the event is not triggered.
-  handleKeyPress: function (event, eventInfo) {
-    var key = isc.EH.lastEvent.keyName;
-    if (key === 'Enter' && event.itemInfo && event.itemInfo.item && event.itemInfo.item.name && event.itemInfo.item.name !== this.name) {
-      return true;
-    } else {
-      return this.Super('handleKeyPress', arguments);
-    }
+  // store the item that was focused when the key is pressed
+  // this information is then used in the OBViewGrid.cellEditEnd function. See issue https://issues.openbravo.com/view.php?id=27730
+  _original_handleKeyDown: isc.TextItem.getPrototype().handleKeyDown,
+  handleKeyDown: function (event, eventInfo) {
+    this.form.lastKeyDownItem = this;
+    return this._original_handleKeyDown(event, eventInfo);
   }
 });
 
@@ -891,4 +888,4 @@
 delete isc.DataSource.getSearchOperators().equals.wildCard;
 delete isc.DataSource.getSearchOperators().iEquals.wildCard;
 delete isc.DataSource.getSearchOperators().notEqual.wildCard;
-delete isc.DataSource.getSearchOperators().iNotEqual.wildCard;
\ No newline at end of file
+delete isc.DataSource.getSearchOperators().iNotEqual.wildCard;
--- a/modules/org.openbravo.v3.datasets/src-db/database/sourcedata/AD_MODULE.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.v3.datasets/src-db/database/sourcedata/AD_MODULE.xml	Wed Feb 11 09:31:54 2015 +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.24019]]></VERSION>
+<!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <VERSION><![CDATA[3.0.24075]]></VERSION>
 <!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <DESCRIPTION><![CDATA[Pre-configured collection of standard ERP roles]]></DESCRIPTION>
 <!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <HELP><![CDATA[This dataset contains the following roles with their access to corresponding Openbravo entities - windows, reports, actions.
 * Employee - Any person of the enterprise
@@ -28,7 +28,7 @@
 <!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <HASREFERENCEDATA><![CDATA[Y]]></HASREFERENCEDATA>
 <!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <REFERENCEDATAINFO><![CDATA[Pre-configured collection of standard ERP roles]]></REFERENCEDATAINFO>
-<!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <VERSION_LABEL><![CDATA[PR14Q3.1]]></VERSION_LABEL>
+<!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <VERSION_LABEL><![CDATA[PR14Q3.6]]></VERSION_LABEL>
 <!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--883B5872CA0548F9AF2BBBE7D2DDFA61-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--883B5872CA0548F9AF2BBBE7D2DDFA61--></AD_MODULE>
--- a/modules/org.openbravo.v3.datasets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.v3.datasets/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Feb 11 09:31:54 2015 +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.24019]]></STARTVERSION>
+<!--148A000EE9A04A3CA653B1296A00B8E6-->  <STARTVERSION><![CDATA[3.0.24075]]></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.24019]]></STARTVERSION>
+<!--30F966407A6F4E15965821BAEE34D25B-->  <STARTVERSION><![CDATA[3.0.24075]]></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.24019]]></STARTVERSION>
+<!--F93CE30003B24F8F8886510B0065EECC-->  <STARTVERSION><![CDATA[1.1.24075]]></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	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.v3.framework/src-db/database/sourcedata/AD_MODULE.xml	Wed Feb 11 09:31:54 2015 +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.24019]]></VERSION>
+<!--7E48CDD73B7E493A8BED4F7253E7C989-->  <VERSION><![CDATA[2.1.24075]]></VERSION>
 <!--7E48CDD73B7E493A8BED4F7253E7C989-->  <DESCRIPTION><![CDATA[Openbravo 3.0 Framework]]></DESCRIPTION>
 <!--7E48CDD73B7E493A8BED4F7253E7C989-->  <HELP><![CDATA[Contains all the components required to run the Openbravo 3.0 framework]]></HELP>
 <!--7E48CDD73B7E493A8BED4F7253E7C989-->  <URL><![CDATA[http://forge.openbravo.com/projects/openbravov30framework]]></URL>
@@ -24,7 +24,7 @@
 <!--7E48CDD73B7E493A8BED4F7253E7C989-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--7E48CDD73B7E493A8BED4F7253E7C989-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
 <!--7E48CDD73B7E493A8BED4F7253E7C989-->  <UPDATEINFO><![CDATA[minor bugfix release to include latest client.application 2.0.1, client.myob 2.0.2 and client.kernel 2.0.1]]></UPDATEINFO>
-<!--7E48CDD73B7E493A8BED4F7253E7C989-->  <VERSION_LABEL><![CDATA[PR14Q3.1]]></VERSION_LABEL>
+<!--7E48CDD73B7E493A8BED4F7253E7C989-->  <VERSION_LABEL><![CDATA[PR14Q3.6]]></VERSION_LABEL>
 <!--7E48CDD73B7E493A8BED4F7253E7C989-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--7E48CDD73B7E493A8BED4F7253E7C989-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--7E48CDD73B7E493A8BED4F7253E7C989--></AD_MODULE>
--- a/modules/org.openbravo.v3.framework/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.v3.framework/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Feb 11 09:31:54 2015 +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.24019]]></STARTVERSION>
+<!--01E1BCCEC9114DE0960538DF34E30E6F-->  <STARTVERSION><![CDATA[2.1.24075]]></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.24019]]></STARTVERSION>
+<!--025B181F63CA47B48A920F6983242390-->  <STARTVERSION><![CDATA[3.0.24075]]></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.24019]]></STARTVERSION>
+<!--054B4FEAF919478AA3FF27098A46D1D6-->  <STARTVERSION><![CDATA[2.1.24075]]></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.24019]]></STARTVERSION>
+<!--1FA6BAA6DC3A4434A6E62A0D1319A9D7-->  <STARTVERSION><![CDATA[1.0.24075]]></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.24019]]></STARTVERSION>
+<!--224754C3EF674C93B0D468F47BAAB824-->  <STARTVERSION><![CDATA[2.1.24075]]></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.24019]]></STARTVERSION>
+<!--5B72D24032DD4879A950194139D961B6-->  <STARTVERSION><![CDATA[2.1.24075]]></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.24019]]></STARTVERSION>
+<!--8730CA6A4224439D82E0DD31B3806E36-->  <STARTVERSION><![CDATA[1.0.24075]]></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.24019]]></STARTVERSION>
+<!--98C47FF058F8413B8A2B26036061446E-->  <STARTVERSION><![CDATA[8.1.24075]]></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.24019]]></STARTVERSION>
+<!--A6D7BA917B3B4DEABD7CA1BA00B01E8A-->  <STARTVERSION><![CDATA[2.0.24075]]></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.24019]]></STARTVERSION>
+<!--A9CB99330AF34944877F889DD8A0AB3C-->  <STARTVERSION><![CDATA[2.1.24075]]></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.24019]]></STARTVERSION>
+<!--E72A053A403C4A98A189C105B850ADB0-->  <STARTVERSION><![CDATA[1.1.24075]]></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.24019]]></STARTVERSION>
+<!--F62443FC17DA4C0E84FBCA9F2E5B68C0-->  <STARTVERSION><![CDATA[2.0.24075]]></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	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.v3/src-db/database/sourcedata/AD_MODULE.xml	Wed Feb 11 09:31:54 2015 +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.24019]]></VERSION>
+<!--0138E7A89B5E4DC3932462252801FFBC-->  <VERSION><![CDATA[3.0.24075]]></VERSION>
 <!--0138E7A89B5E4DC3932462252801FFBC-->  <DESCRIPTION><![CDATA[Openbravo 3.0 distribution template]]></DESCRIPTION>
 <!--0138E7A89B5E4DC3932462252801FFBC-->  <HELP><![CDATA[Openbravo 3.0 is a collection (distribution) of modules. This template is a container of all the modules and configuration changes that compose Openbravo 3.0.]]></HELP>
 <!--0138E7A89B5E4DC3932462252801FFBC-->  <URL><![CDATA[http://forge.openbravo.com/projects/vthree]]></URL>
@@ -20,7 +20,7 @@
 <!--0138E7A89B5E4DC3932462252801FFBC-->  <HASCHARTOFACCOUNTS><![CDATA[N]]></HASCHARTOFACCOUNTS>
 <!--0138E7A89B5E4DC3932462252801FFBC-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--0138E7A89B5E4DC3932462252801FFBC-->  <HASREFERENCEDATA><![CDATA[N]]></HASREFERENCEDATA>
-<!--0138E7A89B5E4DC3932462252801FFBC-->  <VERSION_LABEL><![CDATA[PR14Q3.1]]></VERSION_LABEL>
+<!--0138E7A89B5E4DC3932462252801FFBC-->  <VERSION_LABEL><![CDATA[PR14Q3.6]]></VERSION_LABEL>
 <!--0138E7A89B5E4DC3932462252801FFBC-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--0138E7A89B5E4DC3932462252801FFBC-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--0138E7A89B5E4DC3932462252801FFBC--></AD_MODULE>
--- a/modules/org.openbravo.v3/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/modules/org.openbravo.v3/src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml	Wed Feb 11 09:31:54 2015 +0100
@@ -7,7 +7,7 @@
 <!--4D11E3A70650475381139522373CD191-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--4D11E3A70650475381139522373CD191-->  <AD_MODULE_ID><![CDATA[0138E7A89B5E4DC3932462252801FFBC]]></AD_MODULE_ID>
 <!--4D11E3A70650475381139522373CD191-->  <AD_DEPENDENT_MODULE_ID><![CDATA[7E48CDD73B7E493A8BED4F7253E7C989]]></AD_DEPENDENT_MODULE_ID>
-<!--4D11E3A70650475381139522373CD191-->  <STARTVERSION><![CDATA[2.1.24019]]></STARTVERSION>
+<!--4D11E3A70650475381139522373CD191-->  <STARTVERSION><![CDATA[2.1.24075]]></STARTVERSION>
 <!--4D11E3A70650475381139522373CD191-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--4D11E3A70650475381139522373CD191-->  <DEPENDANT_MODULE_NAME><![CDATA[Openbravo 3.0 Framework]]></DEPENDANT_MODULE_NAME>
 <!--4D11E3A70650475381139522373CD191-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -21,7 +21,7 @@
 <!--52CE523C40634C47A99C6EBBD9C3125C-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--52CE523C40634C47A99C6EBBD9C3125C-->  <AD_MODULE_ID><![CDATA[0138E7A89B5E4DC3932462252801FFBC]]></AD_MODULE_ID>
 <!--52CE523C40634C47A99C6EBBD9C3125C-->  <AD_DEPENDENT_MODULE_ID><![CDATA[2A5EE903D7974AC298C0504FBC4501A7]]></AD_DEPENDENT_MODULE_ID>
-<!--52CE523C40634C47A99C6EBBD9C3125C-->  <STARTVERSION><![CDATA[3.0.24019]]></STARTVERSION>
+<!--52CE523C40634C47A99C6EBBD9C3125C-->  <STARTVERSION><![CDATA[3.0.24075]]></STARTVERSION>
 <!--52CE523C40634C47A99C6EBBD9C3125C-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--52CE523C40634C47A99C6EBBD9C3125C-->  <DEPENDANT_MODULE_NAME><![CDATA[Payment Report]]></DEPENDANT_MODULE_NAME>
 <!--52CE523C40634C47A99C6EBBD9C3125C-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -35,7 +35,7 @@
 <!--60834727BB114764ACEF019F40A34562-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--60834727BB114764ACEF019F40A34562-->  <AD_MODULE_ID><![CDATA[0138E7A89B5E4DC3932462252801FFBC]]></AD_MODULE_ID>
 <!--60834727BB114764ACEF019F40A34562-->  <AD_DEPENDENT_MODULE_ID><![CDATA[3A3A943684D64DEF9EC39F588A656848]]></AD_DEPENDENT_MODULE_ID>
-<!--60834727BB114764ACEF019F40A34562-->  <STARTVERSION><![CDATA[1.1.24019]]></STARTVERSION>
+<!--60834727BB114764ACEF019F40A34562-->  <STARTVERSION><![CDATA[1.1.24075]]></STARTVERSION>
 <!--60834727BB114764ACEF019F40A34562-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--60834727BB114764ACEF019F40A34562-->  <DEPENDANT_MODULE_NAME><![CDATA[Orders Awaiting Delivery]]></DEPENDANT_MODULE_NAME>
 <!--60834727BB114764ACEF019F40A34562-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -49,7 +49,7 @@
 <!--8418885E97D643138B6D907671351E3D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--8418885E97D643138B6D907671351E3D-->  <AD_MODULE_ID><![CDATA[0138E7A89B5E4DC3932462252801FFBC]]></AD_MODULE_ID>
 <!--8418885E97D643138B6D907671351E3D-->  <AD_DEPENDENT_MODULE_ID><![CDATA[883B5872CA0548F9AF2BBBE7D2DDFA61]]></AD_DEPENDENT_MODULE_ID>
-<!--8418885E97D643138B6D907671351E3D-->  <STARTVERSION><![CDATA[3.0.24019]]></STARTVERSION>
+<!--8418885E97D643138B6D907671351E3D-->  <STARTVERSION><![CDATA[3.0.24075]]></STARTVERSION>
 <!--8418885E97D643138B6D907671351E3D-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--8418885E97D643138B6D907671351E3D-->  <DEPENDANT_MODULE_NAME><![CDATA[Standard Roles]]></DEPENDANT_MODULE_NAME>
 <!--8418885E97D643138B6D907671351E3D-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -63,7 +63,7 @@
 <!--A32F3279B3374FC0A6CFEA2368BB7053-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--A32F3279B3374FC0A6CFEA2368BB7053-->  <AD_MODULE_ID><![CDATA[0138E7A89B5E4DC3932462252801FFBC]]></AD_MODULE_ID>
 <!--A32F3279B3374FC0A6CFEA2368BB7053-->  <AD_DEPENDENT_MODULE_ID><![CDATA[0]]></AD_DEPENDENT_MODULE_ID>
-<!--A32F3279B3374FC0A6CFEA2368BB7053-->  <STARTVERSION><![CDATA[3.0.24019]]></STARTVERSION>
+<!--A32F3279B3374FC0A6CFEA2368BB7053-->  <STARTVERSION><![CDATA[3.0.24075]]></STARTVERSION>
 <!--A32F3279B3374FC0A6CFEA2368BB7053-->  <ISINCLUDED><![CDATA[N]]></ISINCLUDED>
 <!--A32F3279B3374FC0A6CFEA2368BB7053-->  <DEPENDANT_MODULE_NAME><![CDATA[Core]]></DEPENDANT_MODULE_NAME>
 <!--A32F3279B3374FC0A6CFEA2368BB7053-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MINOR]]></DEPENDENCY_ENFORCEMENT>
@@ -77,7 +77,7 @@
 <!--ED06CE9F2AFD4092871D9E9494AF42DD-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--ED06CE9F2AFD4092871D9E9494AF42DD-->  <AD_MODULE_ID><![CDATA[0138E7A89B5E4DC3932462252801FFBC]]></AD_MODULE_ID>
 <!--ED06CE9F2AFD4092871D9E9494AF42DD-->  <AD_DEPENDENT_MODULE_ID><![CDATA[A918E3331C404B889D69AA9BFAFB23AC]]></AD_DEPENDENT_MODULE_ID>
-<!--ED06CE9F2AFD4092871D9E9494AF42DD-->  <STARTVERSION><![CDATA[3.0.24019]]></STARTVERSION>
+<!--ED06CE9F2AFD4092871D9E9494AF42DD-->  <STARTVERSION><![CDATA[3.0.24075]]></STARTVERSION>
 <!--ED06CE9F2AFD4092871D9E9494AF42DD-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--ED06CE9F2AFD4092871D9E9494AF42DD-->  <DEPENDANT_MODULE_NAME><![CDATA[Advanced Payables and Receivables Mngmt]]></DEPENDANT_MODULE_NAME>
 <!--ED06CE9F2AFD4092871D9E9494AF42DD-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -91,7 +91,7 @@
 <!--FF8080813189932B013189B45B59003A-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF8080813189932B013189B45B59003A-->  <AD_MODULE_ID><![CDATA[0138E7A89B5E4DC3932462252801FFBC]]></AD_MODULE_ID>
 <!--FF8080813189932B013189B45B59003A-->  <AD_DEPENDENT_MODULE_ID><![CDATA[FF8080813141B198013141B86DD70003]]></AD_DEPENDENT_MODULE_ID>
-<!--FF8080813189932B013189B45B59003A-->  <STARTVERSION><![CDATA[0.1.24019]]></STARTVERSION>
+<!--FF8080813189932B013189B45B59003A-->  <STARTVERSION><![CDATA[0.1.24075]]></STARTVERSION>
 <!--FF8080813189932B013189B45B59003A-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--FF8080813189932B013189B45B59003A-->  <DEPENDANT_MODULE_NAME><![CDATA[OpenID Service Integration]]></DEPENDANT_MODULE_NAME>
 <!--FF8080813189932B013189B45B59003A-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -105,7 +105,7 @@
 <!--FF8080813189932B013189B4C00F003D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF8080813189932B013189B4C00F003D-->  <AD_MODULE_ID><![CDATA[0138E7A89B5E4DC3932462252801FFBC]]></AD_MODULE_ID>
 <!--FF8080813189932B013189B4C00F003D-->  <AD_DEPENDENT_MODULE_ID><![CDATA[FF8080813129ADA401312CA1222A0005]]></AD_DEPENDENT_MODULE_ID>
-<!--FF8080813189932B013189B4C00F003D-->  <STARTVERSION><![CDATA[0.1.24019]]></STARTVERSION>
+<!--FF8080813189932B013189B4C00F003D-->  <STARTVERSION><![CDATA[0.1.24075]]></STARTVERSION>
 <!--FF8080813189932B013189B4C00F003D-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--FF8080813189932B013189B4C00F003D-->  <DEPENDANT_MODULE_NAME><![CDATA[Integration with Google APIs]]></DEPENDANT_MODULE_NAME>
 <!--FF8080813189932B013189B4C00F003D-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
@@ -119,7 +119,7 @@
 <!--FF8081812E2F6F3C012E2F750109001C-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--FF8081812E2F6F3C012E2F750109001C-->  <AD_MODULE_ID><![CDATA[0138E7A89B5E4DC3932462252801FFBC]]></AD_MODULE_ID>
 <!--FF8081812E2F6F3C012E2F750109001C-->  <AD_DEPENDENT_MODULE_ID><![CDATA[FF8080812D842086012D844F3CC0003E]]></AD_DEPENDENT_MODULE_ID>
-<!--FF8081812E2F6F3C012E2F750109001C-->  <STARTVERSION><![CDATA[0.0.24019]]></STARTVERSION>
+<!--FF8081812E2F6F3C012E2F750109001C-->  <STARTVERSION><![CDATA[0.0.24075]]></STARTVERSION>
 <!--FF8081812E2F6F3C012E2F750109001C-->  <ISINCLUDED><![CDATA[Y]]></ISINCLUDED>
 <!--FF8081812E2F6F3C012E2F750109001C-->  <DEPENDANT_MODULE_NAME><![CDATA[Widgets Collection]]></DEPENDANT_MODULE_NAME>
 <!--FF8081812E2F6F3C012E2F750109001C-->  <DEPENDENCY_ENFORCEMENT><![CDATA[MAJOR]]></DEPENDENCY_ENFORCEMENT>
--- a/src-core/src/org/openbravo/utils/FormatUtilities.java	Mon Oct 20 16:16:57 2014 +0200
+++ b/src-core/src/org/openbravo/utils/FormatUtilities.java	Wed Feb 11 09:31:54 2015 +0100
@@ -46,6 +46,10 @@
   }
 
   public static String replaceJS(String strIni, boolean isUnderQuotes) {
+    if (strIni == null) {
+      // nothing to return if the provided string is null
+      return null;
+    }
     return Replace
         .replace(
             Replace.replace(Replace.replace(
--- a/src-db/database/model/functions/C_INVOICE_POST.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/src-db/database/model/functions/C_INVOICE_POST.xml	Wed Feb 11 09:31:54 2015 +0100
@@ -173,7 +173,8 @@
 
   v_iscashvat C_Invoice.IsCashVat%TYPE;
   v_invoiceline_qtysum NUMBER;
-    
+  v_PriceList_ID varchar2(32);
+   
 BEGIN
   IF (p_PInstance_ID IS NOT NULL) THEN
     --  Update AD_PInstance
@@ -249,26 +250,33 @@
    * Read Invoice
    */
   v_ResultStr:='ReadingInvoice';
-  SELECT i.Processing, i.Processed, i.DocAction, i.DocStatus,
+   SELECT i.Processing, i.Processed, i.DocAction, i.DocStatus,
       i.C_DocType_ID, i.C_DocTypeTarget_ID,
       i.PaymentRule, i.C_PaymentTerm_ID, i.DateAcct, i.DateInvoiced,
       i.AD_Client_ID, i.AD_Org_ID, i.UpdatedBy, i.DocumentNo,
       i.C_Order_ID, i.IsSOTrx, i.C_BPartner_ID, i.AD_User_ID,
       i.C_Currency_ID, i.POReference, i.Posted,
-      i.c_Project_Id, i.C_WithHolding_ID, dt.isreturn,
-      pl.istaxincluded, i.IsCashVat
+      i.c_Project_Id, i.C_WithHolding_ID, i.IsCashVat, i.M_PriceList_ID
   INTO v_Processing, v_Processed, v_DocAction, v_DocStatus,
       v_DocType_ID, v_DocTypeTarget_ID,
       v_PaymentRule, v_PaymentTerm, v_DateAcct, v_DateInvoiced,
       v_Client_ID, v_Org_ID, v_UpdatedBy, v_DocumentNo,
       v_Order_ID, v_IsSOTrx, v_BPartner_ID, v_BPartner_User_ID,
       v_Currency_ID, v_POReference, v_Posted,
-      v_C_Project_Id, cWithHoldID, v_isreturndoctype,
-      v_istaxincluded, v_iscashvat
+      v_C_Project_Id, cWithHoldID, v_iscashvat, v_PriceList_ID
   FROM C_INVOICE i
-        JOIN c_doctype dt ON i.c_doctypetarget_id = dt.c_doctype_id
-        JOIN m_pricelist pl ON i.m_pricelist_id = pl.m_pricelist_id
   WHERE i.C_Invoice_ID=v_Record_ID FOR UPDATE;
+
+  SELECT dt.isreturn  
+  INTO  v_isreturndoctype    
+  FROM  c_doctype dt  
+  WHERE dt.c_doctype_id= v_DocTypeTarget_ID;
+
+  SELECT pl.istaxincluded
+  INTO   v_istaxincluded
+  FROM   m_pricelist pl 
+  WHERE pl.m_pricelist_id= v_PriceList_ID;
+  
   DBMS_OUTPUT.PUT_LINE('Invoice_ID=' || v_Record_ID ||', DocAction=' || v_DocAction || ', DocStatus=' || v_DocStatus || ', DocType_ID=' || v_DocType_ID || ', DocTypeTarget_ID=' || v_DocTypeTarget_ID) ;
   /**
    * Invoice Voided, Closed, or Reversed - No Action
--- a/src-db/database/model/functions/C_ORDER_POST1.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/src-db/database/model/functions/C_ORDER_POST1.xml	Wed Feb 11 09:31:54 2015 +0100
@@ -187,16 +187,20 @@
       C_DocType_ID, C_DocTypeTarget_ID, c_order.AD_Client_ID,
       c_order.AD_Org_ID, c_order.UpdatedBy, M_Warehouse_ID, TRUNC(DateOrdered),
       Issotrx, c_Bpartner_Id, c_order.c_currency_id, C_PROJECT_ID,
-      C_BPartner_ID, c_order.M_PriceList_ID, invoicerule, m_pricelist.istaxincluded,
-      c_order.IsCashVat
+      C_BPartner_ID, M_PriceList_ID, invoicerule, c_order.IsCashVat
     INTO v_IsProcessing, v_IsProcessed, v_DocAction, v_DocStatus,
       v_DocType_ID, v_DocTypeTarget_ID, v_Client_ID,
       v_Org_ID, v_UpdatedBy, v_M_Warehouse_ID, v_Date,
       v_isSoTrx, v_c_Bpartner_Id, v_c_currency_id, v_C_PROJECT_ID,
-      v_CBPartner_ID, v_PriceList_ID, v_invoicerule, v_istaxincluded,
-      v_iscashvat
-    FROM C_ORDER JOIN m_pricelist ON c_order.m_pricelist_id = m_pricelist.m_pricelist_id
-    WHERE C_Order_ID=v_Record_ID  FOR UPDATE;
+      v_CBPartner_ID, v_PriceList_ID, v_invoicerule, v_iscashvat
+    FROM C_ORDER
+    WHERE C_Order_ID=v_Record_ID  FOR UPDATE  ;
+
+    SELECT m_pricelist.istaxincluded
+    INTO v_istaxincluded
+    FROM m_pricelist 
+    WHERE m_pricelist_id= v_PriceList_ID;
+    
     -- Get current DocSubTypeSO
     SELECT DocSubTypeSO
       INTO v_DocSubTypeSO
@@ -472,7 +476,7 @@
              WHERE l.C_Order_ID=v_Record_ID  -- Reserve Products (not: services, null products)
                AND l.M_Product_ID=p.M_Product_ID
                AND p.IsStocked='Y'
-               AND p.ProductType='I'  FOR UPDATE
+               AND p.ProductType='I' 
              )
             LOOP
             -- Qty corrected for SO/PO
@@ -1072,8 +1076,7 @@
                 AND p.IsStocked='Y' AND p.ProductType='I'
                 -- Target Level = 0 if DirectShip='Y' or Binding='N'
                 AND (CASE l.DirectShip WHEN 'Y' THEN 0 ELSE (CASE v_IsBinding WHEN 'N' THEN 0 ELSE l.QtyOrdered END)END)
-                -l.QtyReserved-l.QtyDelivered <> 0
-              FOR UPDATE)
+                -l.QtyReserved-l.QtyDelivered <> 0)
           LOOP
           
             -- Qty corrected for SO/PO
--- a/src-db/database/model/functions/M_INOUT_POST.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/src-db/database/model/functions/M_INOUT_POST.xml	Wed Feb 11 09:31:54 2015 +0100
@@ -113,6 +113,9 @@
     v_qtysumorders NUMBER;
     v_released  NUMBER;
 
+    v_IsQtyVariable M_Product.IsQuantityVariable%TYPE;
+    v_IsReversedDoc CHAR(1);
+
   BEGIN
   
     IF(p_PInstance_ID IS NOT NULL) THEN
@@ -221,33 +224,44 @@
              RAISE_APPLICATION_ERROR(-20000, '@Inline@ '||v_Message_Qty||' '||'@ProductNotNullAndMovementQtyZero@') ;
           END IF;
 	     End ;
-      if(v_isreturndoctype = 'N' AND v_isSoTrx = 'Y' and v_DocAction<>'RC') then
+      SELECT CASE WHEN COALESCE(instr(M_INOUT.Description,'*R*:'),0) = 0 THEN 'N' ELSE 'Y' END
+            INTO v_IsReversedDoc
+            FROM M_INOUT
+            WHERE M_INOUT.M_INOUT_id = v_Record_ID;
+      -- Skip MovementQtyCheck when it is reversed document
+      if(v_isreturndoctype = 'N' AND v_isSoTrx = 'Y' and v_DocAction<>'RC' AND v_IsReversedDoc='N') then
         v_message := null;
         for Cur_OrderLine in (
-          select c_orderline_id, line
+          select c_orderline_id, line, m_product_id
           from m_inoutline
           where m_inout_id = v_Record_ID
           and c_orderline_id is not null
           order by line
         ) loop
-          select COALESCE(sum(movementqty), 0)
+          select COALESCE(sum(ABS(movementqty)), 0)
           into v_qty
           from m_inoutline
           where m_inout_id = v_Record_ID
           and c_orderline_id = Cur_OrderLine.c_orderline_id;
 
-          select qtyordered, (coalesce(qtydelivered, 0) + v_qty)
+          select ABS(qtyordered), (coalesce(ABS(qtydelivered), 0) + v_qty)
           into v_QuantityOrder, v_qty
           from c_orderline
           where c_orderline_id = Cur_OrderLine.c_orderline_id;
 
-          if(v_QuantityOrder < v_qty) then
-            if v_message is null THEN
-              v_message := Cur_OrderLine.line;
-            ELSE
-              v_message := v_message || ', ' || Cur_OrderLine.line;
-            END IF;
-          end if;
+          SELECT IsQuantityVariable INTO v_IsQtyVariable
+          FROM M_Product
+          WHERE M_Product_ID = Cur_OrderLine.M_Product_ID;
+
+          IF(v_IsQtyVariable='N') THEN
+            if(v_QuantityOrder < v_qty) then
+              if v_message is null THEN
+                v_message := Cur_OrderLine.line;
+              ELSE
+                v_message := v_message || ', ' || Cur_OrderLine.line;
+              END IF;
+            end if;
+          END IF;
         end loop;
         if v_message is not null then
           RAISE_APPLICATION_ERROR(-20000, '@MovementQtyCheck@'||' '||'@Inlines@'||' '||v_message);
--- a/src-db/database/sourcedata/AD_FIELD.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/src-db/database/sourcedata/AD_FIELD.xml	Wed Feb 11 09:31:54 2015 +0100
@@ -176511,7 +176511,7 @@
 <!--052E2B6A5FB444A0A8FFA12A7F5AE7D2-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--052E2B6A5FB444A0A8FFA12A7F5AE7D2-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--052E2B6A5FB444A0A8FFA12A7F5AE7D2-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
-<!--052E2B6A5FB444A0A8FFA12A7F5AE7D2-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--052E2B6A5FB444A0A8FFA12A7F5AE7D2-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
 <!--052E2B6A5FB444A0A8FFA12A7F5AE7D2-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
 <!--052E2B6A5FB444A0A8FFA12A7F5AE7D2-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--052E2B6A5FB444A0A8FFA12A7F5AE7D2-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
@@ -269381,7 +269381,7 @@
 <!--D165311612564E8CAC703D261108CD0B-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--D165311612564E8CAC703D261108CD0B-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--D165311612564E8CAC703D261108CD0B-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
-<!--D165311612564E8CAC703D261108CD0B-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--D165311612564E8CAC703D261108CD0B-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
 <!--D165311612564E8CAC703D261108CD0B-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
 <!--D165311612564E8CAC703D261108CD0B-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--D165311612564E8CAC703D261108CD0B-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
@@ -282997,6 +282997,7 @@
 <!--F78B253B664E4CB3B0E47A6E4E134201-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
 <!--F78B253B664E4CB3B0E47A6E4E134201-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
 <!--F78B253B664E4CB3B0E47A6E4E134201-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--F78B253B664E4CB3B0E47A6E4E134201-->  <EM_OBUIAPP_VALIDATOR><![CDATA[OB.Reservation.QuantityValidate]]></EM_OBUIAPP_VALIDATOR>
 <!--F78B253B664E4CB3B0E47A6E4E134201-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--F78B253B664E4CB3B0E47A6E4E134201--></AD_FIELD>
 
--- a/src-db/database/sourcedata/AD_MODULE.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/src-db/database/sourcedata/AD_MODULE.xml	Wed Feb 11 09:31:54 2015 +0100
@@ -6,7 +6,7 @@
 <!--0-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--0-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--0-->  <NAME><![CDATA[Core]]></NAME>
-<!--0-->  <VERSION><![CDATA[3.0.24019]]></VERSION>
+<!--0-->  <VERSION><![CDATA[3.0.24075]]></VERSION>
 <!--0-->  <DESCRIPTION><![CDATA[Core module is the base one]]></DESCRIPTION>
 <!--0-->  <HELP><![CDATA[Core module is the base one, all developments in core are included as part of the standard Openbravo ERP.]]></HELP>
 <!--0-->  <URL><![CDATA[www.openbravo.com]]></URL>
@@ -22,7 +22,7 @@
 <!--0-->  <ISTRANSLATIONMODULE><![CDATA[N]]></ISTRANSLATIONMODULE>
 <!--0-->  <HASREFERENCEDATA><![CDATA[Y]]></HASREFERENCEDATA>
 <!--0-->  <REFERENCEDATAINFO><![CDATA[Standard document types for orders, invoices, etc. and settings]]></REFERENCEDATAINFO>
-<!--0-->  <VERSION_LABEL><![CDATA[PR14Q3.1]]></VERSION_LABEL>
+<!--0-->  <VERSION_LABEL><![CDATA[PR14Q3.6]]></VERSION_LABEL>
 <!--0-->  <ISCOMMERCIAL><![CDATA[N]]></ISCOMMERCIAL>
 <!--0-->  <ISTRIALALLOWED><![CDATA[N]]></ISTRIALALLOWED>
 <!--0--></AD_MODULE>
--- a/src-db/database/sourcedata/AD_TAB.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/src-db/database/sourcedata/AD_TAB.xml	Wed Feb 11 09:31:54 2015 +0100
@@ -10974,6 +10974,7 @@
 <!--800212-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--800212-->  <UIPATTERN><![CDATA[STD]]></UIPATTERN>
 <!--800212-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
+<!--800212-->  <AD_TABLE_TREE_ID><![CDATA[9D548EFC27864320A3E8E4C62CD6D28D]]></AD_TABLE_TREE_ID>
 <!--800212-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
 <!--800212-->  <ISREADONLYTREE><![CDATA[N]]></ISREADONLYTREE>
 <!--800212-->  <ISSHOWTREENODEICONS><![CDATA[Y]]></ISSHOWTREENODEICONS>
--- a/src-db/database/sourcedata/AD_TABLE.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/src-db/database/sourcedata/AD_TABLE.xml	Wed Feb 11 09:31:54 2015 +0100
@@ -7344,8 +7344,9 @@
 <!--800178-->  <ISDEFAULTACCT><![CDATA[N]]></ISDEFAULTACCT>
 <!--800178-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--800178-->  <AD_PACKAGE_ID><![CDATA[5A3ED54AB1E14B84E040007F01006125]]></AD_PACKAGE_ID>
+<!--800178-->  <TREETYPE><![CDATA[AR]]></TREETYPE>
 <!--800178-->  <DATAORIGINTYPE><![CDATA[Table]]></DATAORIGINTYPE>
-<!--800178-->  <ISTREE><![CDATA[N]]></ISTREE>
+<!--800178-->  <ISTREE><![CDATA[Y]]></ISTREE>
 <!--800178--></AD_TABLE>
 
 <!--800179--><AD_TABLE>
@@ -8310,9 +8311,8 @@
 <!--800223-->  <ISDEFAULTACCT><![CDATA[N]]></ISDEFAULTACCT>
 <!--800223-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--800223-->  <AD_PACKAGE_ID><![CDATA[5A3ED54AB1E14B84E040007F01006125]]></AD_PACKAGE_ID>
-<!--800223-->  <TREETYPE><![CDATA[AR]]></TREETYPE>
 <!--800223-->  <DATAORIGINTYPE><![CDATA[Table]]></DATAORIGINTYPE>
-<!--800223-->  <ISTREE><![CDATA[Y]]></ISTREE>
+<!--800223-->  <ISTREE><![CDATA[N]]></ISTREE>
 <!--800223--></AD_TABLE>
 
 <!--800224--><AD_TABLE>
--- a/src-db/database/sourcedata/AD_TABLE_TREE.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/src-db/database/sourcedata/AD_TABLE_TREE.xml	Wed Feb 11 09:31:54 2015 +0100
@@ -152,6 +152,25 @@
 <!--9C0304E9DC464C7495AAAC88958E1297-->  <NODEDELETIONPOLICY><![CDATA[RCN]]></NODEDELETIONPOLICY>
 <!--9C0304E9DC464C7495AAAC88958E1297--></AD_TABLE_TREE>
 
+<!--9D548EFC27864320A3E8E4C62CD6D28D--><AD_TABLE_TREE>
+<!--9D548EFC27864320A3E8E4C62CD6D28D-->  <AD_TABLE_TREE_ID><![CDATA[9D548EFC27864320A3E8E4C62CD6D28D]]></AD_TABLE_TREE_ID>
+<!--9D548EFC27864320A3E8E4C62CD6D28D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--9D548EFC27864320A3E8E4C62CD6D28D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--9D548EFC27864320A3E8E4C62CD6D28D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--9D548EFC27864320A3E8E4C62CD6D28D-->  <AD_TABLE_ID><![CDATA[800178]]></AD_TABLE_ID>
+<!--9D548EFC27864320A3E8E4C62CD6D28D-->  <NODEIDCOLUMN><![CDATA[802991]]></NODEIDCOLUMN>
+<!--9D548EFC27864320A3E8E4C62CD6D28D-->  <HASMULTIPARENTNODES><![CDATA[N]]></HASMULTIPARENTNODES>
+<!--9D548EFC27864320A3E8E4C62CD6D28D-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--9D548EFC27864320A3E8E4C62CD6D28D-->  <APPLYWHERECLAUSETOCHILDNODES><![CDATA[Y]]></APPLYWHERECLAUSETOCHILDNODES>
+<!--9D548EFC27864320A3E8E4C62CD6D28D-->  <NAME><![CDATA[Accounting report]]></NAME>
+<!--9D548EFC27864320A3E8E4C62CD6D28D-->  <ISPARENTSELECTIONALLOWED><![CDATA[Y]]></ISPARENTSELECTIONALLOWED>
+<!--9D548EFC27864320A3E8E4C62CD6D28D-->  <ISORDERED><![CDATA[N]]></ISORDERED>
+<!--9D548EFC27864320A3E8E4C62CD6D28D-->  <TREESTRUCTURE><![CDATA[ADTree]]></TREESTRUCTURE>
+<!--9D548EFC27864320A3E8E4C62CD6D28D-->  <ISHANDLENODESMANUALLY><![CDATA[Y]]></ISHANDLENODESMANUALLY>
+<!--9D548EFC27864320A3E8E4C62CD6D28D-->  <ISMAINTREE><![CDATA[Y]]></ISMAINTREE>
+<!--9D548EFC27864320A3E8E4C62CD6D28D-->  <NODEDELETIONPOLICY><![CDATA[RCN]]></NODEDELETIONPOLICY>
+<!--9D548EFC27864320A3E8E4C62CD6D28D--></AD_TABLE_TREE>
+
 <!--9F30DDEA05FC45C9B7CDA2A128ADE374--><AD_TABLE_TREE>
 <!--9F30DDEA05FC45C9B7CDA2A128ADE374-->  <AD_TABLE_TREE_ID><![CDATA[9F30DDEA05FC45C9B7CDA2A128ADE374]]></AD_TABLE_TREE_ID>
 <!--9F30DDEA05FC45C9B7CDA2A128ADE374-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -285,25 +304,6 @@
 <!--D298DD9EB4514BF8ABBDA4D88A591AFF-->  <NODEDELETIONPOLICY><![CDATA[RCN]]></NODEDELETIONPOLICY>
 <!--D298DD9EB4514BF8ABBDA4D88A591AFF--></AD_TABLE_TREE>
 
-<!--D45388802D4F41719DEACD336FA2B88F--><AD_TABLE_TREE>
-<!--D45388802D4F41719DEACD336FA2B88F-->  <AD_TABLE_TREE_ID><![CDATA[D45388802D4F41719DEACD336FA2B88F]]></AD_TABLE_TREE_ID>
-<!--D45388802D4F41719DEACD336FA2B88F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--D45388802D4F41719DEACD336FA2B88F-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--D45388802D4F41719DEACD336FA2B88F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--D45388802D4F41719DEACD336FA2B88F-->  <AD_TABLE_ID><![CDATA[800223]]></AD_TABLE_ID>
-<!--D45388802D4F41719DEACD336FA2B88F-->  <NODEIDCOLUMN><![CDATA[803760]]></NODEIDCOLUMN>
-<!--D45388802D4F41719DEACD336FA2B88F-->  <HASMULTIPARENTNODES><![CDATA[N]]></HASMULTIPARENTNODES>
-<!--D45388802D4F41719DEACD336FA2B88F-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--D45388802D4F41719DEACD336FA2B88F-->  <APPLYWHERECLAUSETOCHILDNODES><![CDATA[Y]]></APPLYWHERECLAUSETOCHILDNODES>
-<!--D45388802D4F41719DEACD336FA2B88F-->  <NAME><![CDATA[Accounting report]]></NAME>
-<!--D45388802D4F41719DEACD336FA2B88F-->  <ISPARENTSELECTIONALLOWED><![CDATA[Y]]></ISPARENTSELECTIONALLOWED>
-<!--D45388802D4F41719DEACD336FA2B88F-->  <ISORDERED><![CDATA[Y]]></ISORDERED>
-<!--D45388802D4F41719DEACD336FA2B88F-->  <TREESTRUCTURE><![CDATA[ADTree]]></TREESTRUCTURE>
-<!--D45388802D4F41719DEACD336FA2B88F-->  <ISHANDLENODESMANUALLY><![CDATA[Y]]></ISHANDLENODESMANUALLY>
-<!--D45388802D4F41719DEACD336FA2B88F-->  <ISMAINTREE><![CDATA[Y]]></ISMAINTREE>
-<!--D45388802D4F41719DEACD336FA2B88F-->  <NODEDELETIONPOLICY><![CDATA[RCN]]></NODEDELETIONPOLICY>
-<!--D45388802D4F41719DEACD336FA2B88F--></AD_TABLE_TREE>
-
 <!--E52D2F7D418F41CCAE199ABE56CE282F--><AD_TABLE_TREE>
 <!--E52D2F7D418F41CCAE199ABE56CE282F-->  <AD_TABLE_TREE_ID><![CDATA[E52D2F7D418F41CCAE199ABE56CE282F]]></AD_TABLE_TREE_ID>
 <!--E52D2F7D418F41CCAE199ABE56CE282F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/OBUISEL_SELECTOR.xml	Mon Oct 20 16:16:57 2014 +0200
+++ b/src-db/database/sourcedata/OBUISEL_SELECTOR.xml	Wed Feb 11 09:31:54 2015 +0100
@@ -48,7 +48,7 @@
 <!--0E1E9236E2FE471FB946F8DA2803C537-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--0E1E9236E2FE471FB946F8DA2803C537-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--0E1E9236E2FE471FB946F8DA2803C537-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--0E1E9236E2FE471FB946F8DA2803C537-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--0E1E9236E2FE471FB946F8DA2803C537-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--0E1E9236E2FE471FB946F8DA2803C537-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--0E1E9236E2FE471FB946F8DA2803C537--></OBUISEL_SELECTOR>
 
@@ -64,7 +64,7 @@
 <!--1E14C66616444E0DA8D5C5321EC9F61B-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--1E14C66616444E0DA8D5C5321EC9F61B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--1E14C66616444E0DA8D5C5321EC9F61B-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--1E14C66616444E0DA8D5C5321EC9F61B-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--1E14C66616444E0DA8D5C5321EC9F61B-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--1E14C66616444E0DA8D5C5321EC9F61B-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--1E14C66616444E0DA8D5C5321EC9F61B--></OBUISEL_SELECTOR>
 
@@ -81,7 +81,7 @@
 <!--1F051395F1CC4A40ADFE5C440EBCAA7F-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--1F051395F1CC4A40ADFE5C440EBCAA7F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--1F051395F1CC4A40ADFE5C440EBCAA7F-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--1F051395F1CC4A40ADFE5C440EBCAA7F-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--1F051395F1CC4A40ADFE5C440EBCAA7F-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--1F051395F1CC4A40ADFE5C440EBCAA7F-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--1F051395F1CC4A40ADFE5C440EBCAA7F--></OBUISEL_SELECTOR>
 
@@ -96,7 +96,7 @@
 <!--1F1889DC41AD41D596A046091B4EFA81-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--1F1889DC41AD41D596A046091B4EFA81-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--1F1889DC41AD41D596A046091B4EFA81-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--1F1889DC41AD41D596A046091B4EFA81-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--1F1889DC41AD41D596A046091B4EFA81-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--1F1889DC41AD41D596A046091B4EFA81-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--1F1889DC41AD41D596A046091B4EFA81--></OBUISEL_SELECTOR>
 
@@ -140,12 +140,12 @@
 <!--2E64F551C7C4470C80C29DBA24B34A5F-->  <AD_REFERENCE_ID><![CDATA[800060]]></AD_REFERENCE_ID>
 <!--2E64F551C7C4470C80C29DBA24B34A5F-->  <AD_TABLE_ID><![CDATA[FF8080812DFFA1CF012DFFB889F40016]]></AD_TABLE_ID>
 <!--2E64F551C7C4470C80C29DBA24B34A5F-->  <WHERECLAUSE><![CDATA[e.active='Y' and (AD_ISORGINCLUDED(e.orgwarehouse, @AD_Org_Id@, @AD_Client_Id@)<>-1 or (AD_ISORGINCLUDED( @AD_Org_Id@, e.orgwarehouse, @AD_Client_Id@)<>-1)) AND e.productPrice.priceListVersion.active='Y']]></WHERECLAUSE>
-<!--2E64F551C7C4470C80C29DBA24B34A5F-->  <FILTER_EXPRESSION><![CDATA[if (OB.getParameters().get('inpcCurrencyId')){ " e.productPrice.priceListVersion.priceList.salesPriceList = " + OB.isSalesTransaction()  + " AND e.productPrice.priceListVersion.priceList.currency.id = '" + OB.getParameters().get('inpcCurrencyId') + "'" }]]></FILTER_EXPRESSION>
+<!--2E64F551C7C4470C80C29DBA24B34A5F-->  <FILTER_EXPRESSION><![CDATA[if (OB.getParameters().get('inpcCurrencyId') && OB.getWindowId() == '207') { " e.productPrice.priceListVersion.priceList.currency.id = '" + OB.getParameters().get('inpcCurrencyId') + "'" } else if (OB.getParameters().get('inpcCurrencyId')) { " e.productPrice.priceListVersion.priceList.salesPriceList = " + OB.isSalesTransaction()  + " AND e.productPrice.priceListVersion.priceList.currency.id = '" + OB.getParameters().get('inpcCurrencyId') + "'" }]]></FILTER_EXPRESSION>
 <!--2E64F551C7C4470C80C29DBA24B34A5F-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--2E64F551C7C4470C80C29DBA24B34A5F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--2E64F551C7C4470C80C29DBA24B34A5F-->  <VALUEFIELD_ID><![CDATA[2CB91FE062B541ACB00D82AC69858446]]></VALUEFIELD_ID>
 <!--2E64F551C7C4470C80C29DBA24B34A5F-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--2E64F551C7C4470C80C29DBA24B34A5F-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--2E64F551C7C4470C80C29DBA24B34A5F-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--2E64F551C7C4470C80C29DBA24B34A5F-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--2E64F551C7C4470C80C29DBA24B34A5F--></OBUISEL_SELECTOR>
 
@@ -161,7 +161,7 @@
 <!--32CFC9EB6DD04FACA7452C20C39116F0-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--32CFC9EB6DD04FACA7452C20C39116F0-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--32CFC9EB6DD04FACA7452C20C39116F0-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--32CFC9EB6DD04FACA7452C20C39116F0-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--32CFC9EB6DD04FACA7452C20C39116F0-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--32CFC9EB6DD04FACA7452C20C39116F0-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--32CFC9EB6DD04FACA7452C20C39116F0--></OBUISEL_SELECTOR>
 
@@ -176,7 +176,7 @@
 <!--3E9E206575F94F579BAE65C1C929E3E0-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--3E9E206575F94F579BAE65C1C929E3E0-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--3E9E206575F94F579BAE65C1C929E3E0-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--3E9E206575F94F579BAE65C1C929E3E0-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--3E9E206575F94F579BAE65C1C929E3E0-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--3E9E206575F94F579BAE65C1C929E3E0-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--3E9E206575F94F579BAE65C1C929E3E0--></OBUISEL_SELECTOR>
 
@@ -193,7 +193,7 @@
 <!--3F43145FED1B4EC08A4797BFCB4F1C6D-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--3F43145FED1B4EC08A4797BFCB4F1C6D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--3F43145FED1B4EC08A4797BFCB4F1C6D-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--3F43145FED1B4EC08A4797BFCB4F1C6D-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--3F43145FED1B4EC08A4797BFCB4F1C6D-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--3F43145FED1B4EC08A4797BFCB4F1C6D-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--3F43145FED1B4EC08A4797BFCB4F1C6D--></OBUISEL_SELECTOR>
 
@@ -210,7 +210,7 @@
 <!--4028E61131FB4B1B0131FB5307F1000C-->  <VALUEFIELD_ID><![CDATA[4028E61131FB4B1B0131FB5711430042]]></VALUEFIELD_ID>
 <!--4028E61131FB4B1B0131FB5307F1000C-->  <DISPLAYFIELD_ID><![CDATA[4028E61131FB4B1B0131FB5625760036]]></DISPLAYFIELD_ID>
 <!--4028E61131FB4B1B0131FB5307F1000C-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--4028E61131FB4B1B0131FB5307F1000C-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--4028E61131FB4B1B0131FB5307F1000C-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--4028E61131FB4B1B0131FB5307F1000C-->  <HQL><![CDATA[SELECT distinct bp.name as name,bp.id as bpid, bp.searchKey as value,
    bp.creditLimit - bp.creditUsed as creditAvailable, bp.creditUsed as creditUsed,
    COALESCE(contact.name, usercontact.name) as contactname, COALESCE(contact.id, usercontact.id) as contactid,
@@ -239,7 +239,7 @@
 <!--45825E189BCB47B497709849EBF61AA7-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--45825E189BCB47B497709849EBF61AA7-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--45825E189BCB47B497709849EBF61AA7-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--45825E189BCB47B497709849EBF61AA7-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--45825E189BCB47B497709849EBF61AA7-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--45825E189BCB47B497709849EBF61AA7-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--45825E189BCB47B497709849EBF61AA7--></OBUISEL_SELECTOR>
 
@@ -257,7 +257,7 @@
 <!--4C8BC3E8E56441F4B8C98C684A0C9212-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--4C8BC3E8E56441F4B8C98C684A0C9212-->  <VALUEFIELD_ID><![CDATA[D5CD42F686A14DFA949052B99900D679]]></VALUEFIELD_ID>
 <!--4C8BC3E8E56441F4B8C98C684A0C9212-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--4C8BC3E8E56441F4B8C98C684A0C9212-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--4C8BC3E8E56441F4B8C98C684A0C9212-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--4C8BC3E8E56441F4B8C98C684A0C9212-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--4C8BC3E8E56441F4B8C98C684A0C9212--></OBUISEL_SELECTOR>
 
@@ -275,7 +275,7 @@
 <!--518C9A856274423AB19490CA145AE139-->  <VALUEFIELD_ID><![CDATA[D313500687424563ABC3782E70F2F73B]]></VALUEFIELD_ID>
 <!--518C9A856274423AB19490CA145AE139-->  <DISPLAYFIELD_ID><![CDATA[BD59EB3C7F684361B4408CACE67910E9]]></DISPLAYFIELD_ID>
 <!--518C9A856274423AB19490CA145AE139-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--518C9A856274423AB19490CA145AE139-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--518C9A856274423AB19490CA145AE139-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--518C9A856274423AB19490CA145AE139-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--518C9A856274423AB19490CA145AE139--></OBUISEL_SELECTOR>
 
@@ -309,7 +309,7 @@
 <!--632F319DE1564495B3B5D710127DA6DC-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--632F319DE1564495B3B5D710127DA6DC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--632F319DE1564495B3B5D710127DA6DC-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--632F319DE1564495B3B5D710127DA6DC-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--632F319DE1564495B3B5D710127DA6DC-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--632F319DE1564495B3B5D710127DA6DC-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--632F319DE1564495B3B5D710127DA6DC--></OBUISEL_SELECTOR>
 
@@ -324,7 +324,7 @@
 <!--720AAD2B1552455582E5D15103F59923-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--720AAD2B1552455582E5D15103F59923-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--720AAD2B1552455582E5D15103F59923-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--720AAD2B1552455582E5D15103F59923-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--720AAD2B1552455582E5D15103F59923-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--720AAD2B1552455582E5D15103F59923-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--720AAD2B1552455582E5D15103F59923--></OBUISEL_SELECTOR>
 
@@ -343,7 +343,7 @@
 <!--7809A075DD5C40A598FA80D7BEE70BCE-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--7809A075DD5C40A598FA80D7BEE70BCE-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--7809A075DD5C40A598FA80D7BEE70BCE-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--7809A075DD5C40A598FA80D7BEE70BCE-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--7809A075DD5C40A598FA80D7BEE70BCE-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--7809A075DD5C40A598FA80D7BEE70BCE-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--7809A075DD5C40A598FA80D7BEE70BCE--></OBUISEL_SELECTOR>
 
@@ -360,7 +360,7 @@
 <!--7B07F521E4804C89B7956E584989CC16-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--7B07F521E4804C89B7956E584989CC16-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--7B07F521E4804C89B7956E584989CC16-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--7B07F521E4804C89B7956E584989CC16-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--7B07F521E4804C89B7956E584989CC16-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--7B07F521E4804C89B7956E584989CC16-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--7B07F521E4804C89B7956E584989CC16--></OBUISEL_SELECTOR>
 
@@ -395,7 +395,7 @@
 <!--862F54CB1B074513BD791C6789F4AA42-->  <VALUEFIELD_ID><![CDATA[B103893820FC4080809A97FABD49D8AF]]></VALUEFIELD_ID>
 <!--862F54CB1B074513BD791C6789F4AA42-->  <DISPLAYFIELD_ID><![CDATA[9835921A3AA54B8D8D0126B3696F8354]]></DISPLAYFIELD_ID>
 <!--862F54CB1B074513BD791C6789F4AA42-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--862F54CB1B074513BD791C6789F4AA42-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--862F54CB1B074513BD791C6789F4AA42-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--862F54CB1B074513BD791C6789F4AA42-->  <HQL><![CDATA[SELECT bp.name as name,bp.id as bpid, bp.searchKey as value,
    bp.creditLimit - bp.creditUsed as creditAvailable, bp.creditUsed as creditUsed,
    bp.customer as customer, bp.vendor as vendor, 
@@ -419,7 +419,7 @@
 <!--9F883550D23F4DB18B3FD9DE9E03999B-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--9F883550D23F4DB18B3FD9DE9E03999B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--9F883550D23F4DB18B3FD9DE9E03999B-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--9F883550D23F4DB18B3FD9DE9E03999B-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--9F883550D23F4DB18B3FD9DE9E03999B-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--9F883550D23F4DB18B3FD9DE9E03999B-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--9F883550D23F4DB18B3FD9DE9E03999B--></OBUISEL_SELECTOR>
 
@@ -452,7 +452,7 @@
 <!--A35B6EC33A2243018915908AEB1B3F5E-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--A35B6EC33A2243018915908AEB1B3F5E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--A35B6EC33A2243018915908AEB1B3F5E-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--A35B6EC33A2243018915908AEB1B3F5E-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--A35B6EC33A2243018915908AEB1B3F5E-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--A35B6EC33A2243018915908AEB1B3F5E-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--A35B6EC33A2243018915908AEB1B3F5E--></OBUISEL_SELECTOR>
 
@@ -468,7 +468,7 @@
 <!--A48B1462EE7F4C109F06564E0B4677A8-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--A48B1462EE7F4C109F06564E0B4677A8-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--A48B1462EE7F4C109F06564E0B4677A8-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--A48B1462EE7F4C109F06564E0B4677A8-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--A48B1462EE7F4C109F06564E0B4677A8-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--A48B1462EE7F4C109F06564E0B4677A8-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--A48B1462EE7F4C109F06564E0B4677A8--></OBUISEL_SELECTOR>
 
@@ -483,7 +483,7 @@
 <!--B2D8976FFFDB45428C3A9F0CDA7AD5C0-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--B2D8976FFFDB45428C3A9F0CDA7AD5C0-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--B2D8976FFFDB45428C3A9F0CDA7AD5C0-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--B2D8976FFFDB45428C3A9F0CDA7AD5C0-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--B2D8976FFFDB45428C3A9F0CDA7AD5C0-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--B2D8976FFFDB45428C3A9F0CDA7AD5C0-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--B2D8976FFFDB45428C3A9F0CDA7AD5C0--></OBUISEL_SELECTOR>
 
@@ -553,7 +553,7 @@
 <!--B9E2C11BDA924BF8ADF019BA15A11153-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--B9E2C11BDA924BF8ADF019BA15A11153-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--B9E2C11BDA924BF8ADF019BA15A11153-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--B9E2C11BDA924BF8ADF019BA15A11153-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--B9E2C11BDA924BF8ADF019BA15A11153-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--B9E2C11BDA924BF8ADF019BA15A11153-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--B9E2C11BDA924BF8ADF019BA15A11153--></OBUISEL_SELECTOR>
 
@@ -605,7 +605,7 @@
 <!--D47A3616483E46C18A09794B9B276B37-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--D47A3616483E46C18A09794B9B276B37-->  <VALUEFIELD_ID><![CDATA[2CB91FE062B541ACB00D82AC69858446]]></VALUEFIELD_ID>
 <!--D47A3616483E46C18A09794B9B276B37-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--D47A3616483E46C18A09794B9B276B37-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--D47A3616483E46C18A09794B9B276B37-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--D47A3616483E46C18A09794B9B276B37-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--D47A3616483E46C18A09794B9B276B37--></OBUISEL_SELECTOR>
 
@@ -620,7 +620,7 @@
 <!--D4F428CFB0FD42A6998BF377BA4212AB-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--D4F428CFB0FD42A6998BF377BA4212AB-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--D4F428CFB0FD42A6998BF377BA4212AB-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--D4F428CFB0FD42A6998BF377BA4212AB-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--D4F428CFB0FD42A6998BF377BA4212AB-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--D4F428CFB0FD42A6998BF377BA4212AB-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--D4F428CFB0FD42A6998BF377BA4212AB--></OBUISEL_SELECTOR>
 
@@ -666,7 +666,7 @@
 <!--DE9CFEFB6F49404995BE8B0FBF3F7F9E-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--DE9CFEFB6F49404995BE8B0FBF3F7F9E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--DE9CFEFB6F49404995BE8B0FBF3F7F9E-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--DE9CFEFB6F49404995BE8B0FBF3F7F9E-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--DE9CFEFB6F49404995BE8B0FBF3F7F9E-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--DE9CFEFB6F49404995BE8B0FBF3F7F9E-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--DE9CFEFB6F49404995BE8B0FBF3F7F9E--></OBUISEL_SELECTOR>
 
@@ -697,7 +697,7 @@
 <!--E1F081829D324B20B7214E7018B589C4-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--E1F081829D324B20B7214E7018B589C4-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--E1F081829D324B20B7214E7018B589C4-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--E1F081829D324B20B7214E7018B589C4-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--E1F081829D324B20B7214E7018B589C4-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--E1F081829D324B20B7214E7018B589C4-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--E1F081829D324B20B7214E7018B589C4--></OBUISEL_SELECTOR>
 
@@ -715,7 +715,7 @@
 <!--E65052A724B3451CA643A0CC355CEA40-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--E65052A724B3451CA643A0CC355CEA40-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--E65052A724B3451CA643A0CC355CEA40-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--E65052A724B3451CA643A0CC355CEA40-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--E65052A724B3451CA643A0CC355CEA40-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--E65052A724B3451CA643A0CC355CEA40-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--E65052A724B3451CA643A0CC355CEA40--></OBUISEL_SELECTOR>
 
@@ -733,7 +733,7 @@
 <!--EB3C41F0973A4EDA91E475833792A6D4-->  <VALUEFIELD_ID><![CDATA[EDADAD64A1634FDEA50343CE1AAAF1FB]]></VALUEFIELD_ID>
 <!--EB3C41F0973A4EDA91E475833792A6D4-->  <DISPLAYFIELD_ID><![CDATA[797E2E6C7A6D4A349491B85A1C1ACB7D]]></DISPLAYFIELD_ID>
 <!--EB3C41F0973A4EDA91E475833792A6D4-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--EB3C41F0973A4EDA91E475833792A6D4-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--EB3C41F0973A4EDA91E475833792A6D4-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--EB3C41F0973A4EDA91E475833792A6D4-->  <HQL><![CDATA[select e.searchKey as searchKey, e.id as id, plv as priceListVersion, plv.name as priceListVersionName, c.id as currency, pp.priceLimit as priceLimit, e.name as productName, e.uOM as uOM, pp.standardPrice as standardPrice, pp.listPrice as netListPrice, pl.salesPriceList as salesPriceList, e.characteristicDescription as chDescription, gp.name as genericProduct
 from PricingProductPrice pp
 join pp.product e
@@ -791,7 +791,7 @@
 <!--F132874BE0954A9B8C1301BE20704730-->  <VALUEFIELD_ID><![CDATA[38075EEC36C24E3CAB44D1B33D2CE637]]></VALUEFIELD_ID>
 <!--F132874BE0954A9B8C1301BE20704730-->  <DISPLAYFIELD_ID><![CDATA[7CA7330BA4864D2FB1FED44CDB88A622]]></DISPLAYFIELD_ID>
 <!--F132874BE0954A9B8C1301BE20704730-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[substring]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--F132874BE0954A9B8C1301BE20704730-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--F132874BE0954A9B8C1301BE20704730-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--F132874BE0954A9B8C1301BE20704730-->  <HQL><![CDATA[SELECT distinct bp.name as name,bp.id as bpid, bp.searchKey as value,
    bp.creditLimit - bp.creditUsed as creditAvailable, bp.creditUsed as creditUsed,
    COALESCE(contact.name, usercontact.name) as contactname, COALESCE(contact.id, usercontact.id) as contactid,
@@ -820,7 +820,7 @@
 <!--F26A0C81FAD3456D8FC8656DB7B4A001-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
 <!--F26A0C81FAD3456D8FC8656DB7B4A001-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--F26A0C81FAD3456D8FC8656DB7B4A001-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
-<!--F26A0C81FAD3456D8FC8656DB7B4A001-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--F26A0C81FAD3456D8FC8656DB7B4A001-->  <POPUPTEXTMATCHSTYLE><![CDATA[substring]]></POPUPTEXTMATCHSTYLE>
 <!--F26A0C81FAD3456D8FC8656DB7B4A001-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--F26A0C81FAD3456D8FC8656DB7B4A001--></OBUISEL_SELECTOR>
 
Binary file src-util/modulescript/build/classes/org/openbravo/modulescript/UpdateADTrees.class has changed
Binary file src-util/modulescript/build/classes/org/openbravo/modulescript/UpdateADTreesData.class has changed
Binary file src-util/modulescript/build/classes/org/openbravo/modulescript/UpdatePaymentPlan.class has changed
Binary file src-util/modulescript/build/classes/org/openbravo/modulescript/UpdatePaymentPlanData.class has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-util/modulescript/build/javasqlc/src/org/openbravo/modulescript/UpdatePaymentPlanData.java	Wed Feb 11 09:31:54 2015 +0100
@@ -0,0 +1,307 @@
+//Sqlc generated V1.O00-1
+package org.openbravo.modulescript;
+
+import java.sql.*;
+
+import org.apache.log4j.Logger;
+
+import javax.servlet.ServletException;
+
+import org.openbravo.data.FieldProvider;
+import org.openbravo.database.ConnectionProvider;
+import org.openbravo.data.UtilSql;
+import java.util.*;
+
+class UpdatePaymentPlanData implements FieldProvider {
+static Logger log4j = Logger.getLogger(UpdatePaymentPlanData.class);
+  private String InitRecordNumber="0";
+  public String finpaymentscheduleid;
+  public String paidamt;
+  public String rownum;
+
+  public String getInitRecordNumber() {
+    return InitRecordNumber;
+  }
+
+  public String getField(String fieldName) {
+    if (fieldName.equalsIgnoreCase("FINPAYMENTSCHEDULEID"))
+      return finpaymentscheduleid;
+    else if (fieldName.equalsIgnoreCase("PAIDAMT"))
+      return paidamt;
+    else if (fieldName.equals("rownum"))
+      return rownum;
+   else {
+     log4j.debug("Field does not exist: " + fieldName);
+     return null;
+   }
+ }
+
+  public static UpdatePaymentPlanData[] dummy(ConnectionProvider connectionProvider)    throws ServletException {
+    return dummy(connectionProvider, 0, 0);
+  }
+
+  public static UpdatePaymentPlanData[] dummy(ConnectionProvider connectionProvider, int firstRegister, int numberRegisters)    throws ServletException {
+    String strSql = "";
+    strSql = strSql + 
+      "      SELECT '' AS finpaymentscheduleid, '' AS paidamt FROM DUAL";
+
+    ResultSet result;
+    Vector<java.lang.Object> vector = new Vector<java.lang.Object>(0);
+    PreparedStatement st = null;
+
+    try {
+    st = connectionProvider.getPreparedStatement(strSql);
+
+      result = st.executeQuery();
+      long countRecord = 0;
+      long countRecordSkip = 1;
+      boolean continueResult = true;
+      while(countRecordSkip < firstRegister && continueResult) {
+        continueResult = result.next();
+        countRecordSkip++;
+      }
+      while(continueResult && result.next()) {
+        countRecord++;
+        UpdatePaymentPlanData objectUpdatePaymentPlanData = new UpdatePaymentPlanData();
+        objectUpdatePaymentPlanData.finpaymentscheduleid = UtilSql.getValue(result, "FINPAYMENTSCHEDULEID");
+        objectUpdatePaymentPlanData.paidamt = UtilSql.getValue(result, "PAIDAMT");
+        objectUpdatePaymentPlanData.rownum = Long.toString(countRecord);
+        objectUpdatePaymentPlanData.InitRecordNumber = Integer.toString(firstRegister);
+        vector.addElement(objectUpdatePaymentPlanData);
+        if (countRecord >= numberRegisters && numberRegisters != 0) {
+          continueResult = false;
+        }
+      }
+      result.close();
+    } catch(SQLException e){
+      log4j.error("SQL error in query: " + strSql + "Exception:"+ e);
+      throw new ServletException("@CODE=" + Integer.toString(e.getErrorCode()) + "@" + e.getMessage());
+    } catch(Exception ex){
+      log4j.error("Exception in query: " + strSql + "Exception:"+ ex);
+      throw new ServletException("@CODE=@" + ex.getMessage());
+    } finally {
+      try {
+        connectionProvider.releasePreparedStatement(st);
+      } catch(Exception ignore){
+        ignore.printStackTrace();
+      }
+    }
+    UpdatePaymentPlanData objectUpdatePaymentPlanData[] = new UpdatePaymentPlanData[vector.size()];
+    vector.copyInto(objectUpdatePaymentPlanData);
+    return(objectUpdatePaymentPlanData);
+  }
+
+  public static String selectAmount(ConnectionProvider connectionProvider, String finpaymentscheduleid)    throws ServletException {
+    String strSql = "";
+    strSql = strSql + 
+      "      SELECT SUM(psd.amount) AS paidamt" +
+      "      FROM fin_payment p" +
+      "      LEFT JOIN fin_financial_account fa ON p.fin_financial_account_id = fa.fin_financial_account_id, fin_payment_detail pd" +
+      "      JOIN fin_payment_scheduledetail psd ON pd.fin_payment_detail_id = psd.fin_payment_detail_id" +
+      "      LEFT JOIN fin_payment_schedule psi ON psd.fin_payment_schedule_invoice = psi.fin_payment_schedule_id" +
+      "      LEFT JOIN c_invoice i ON psi.c_invoice_id = i.c_invoice_id" +
+      "      LEFT JOIN fin_payment_schedule pso ON psd.fin_payment_schedule_order = pso.fin_payment_schedule_id" +
+      "      LEFT JOIN c_order o ON pso.c_order_id = o.c_order_id" +
+      "      LEFT JOIN c_glitem gli ON pd.c_glitem_id = gli.c_glitem_id" +
+      "      WHERE p.fin_payment_id = pd.fin_payment_id" +
+      "      AND pso.fin_payment_schedule_id = ?";
+
+    ResultSet result;
+    String strReturn = null;
+    PreparedStatement st = null;
+
+    int iParameter = 0;
+    try {
+    st = connectionProvider.getPreparedStatement(strSql);
+      iParameter++; UtilSql.setValue(st, iParameter, 12, null, finpaymentscheduleid);
+
+      result = st.executeQuery();
+      if(result.next()) {
+        strReturn = UtilSql.getValue(result, "PAIDAMT");
+      }
+      result.close();
+    } catch(SQLException e){
+      log4j.error("SQL error in query: " + strSql + "Exception:"+ e);
+      throw new ServletException("@CODE=" + Integer.toString(e.getErrorCode()) + "@" + e.getMessage());
+    } catch(Exception ex){
+      log4j.error("Exception in query: " + strSql + "Exception:"+ ex);
+      throw new ServletException("@CODE=@" + ex.getMessage());
+    } finally {
+      try {
+        connectionProvider.releasePreparedStatement(st);
+      } catch(Exception ignore){
+        ignore.printStackTrace();
+      }
+    }
+    return(strReturn);
+  }
+
+  public static UpdatePaymentPlanData[] select(ConnectionProvider connectionProvider)    throws ServletException {
+    return select(connectionProvider, 0, 0);
+  }
+
+  public static UpdatePaymentPlanData[] select(ConnectionProvider connectionProvider, int firstRegister, int numberRegisters)    throws ServletException {
+    String strSql = "";
+    strSql = strSql + 
+      "      SELECT fin.fin_payment_schedule_id AS finpaymentscheduleid" +
+      "      FROM fin_payment_schedule fin" +
+      "      WHERE paidamt <> (SELECT SUM(psd.amount)" +
+      "                           FROM fin_payment p" +
+      "                           LEFT JOIN fin_financial_account fa ON p.fin_financial_account_id = fa.fin_financial_account_id, fin_payment_detail pd" +
+      "                           JOIN fin_payment_scheduledetail psd ON pd.fin_payment_detail_id = psd.fin_payment_detail_id" +
+      "                           LEFT JOIN fin_payment_schedule psi ON psd.fin_payment_schedule_invoice = psi.fin_payment_schedule_id" +
+      "                           LEFT JOIN c_invoice i ON psi.c_invoice_id = i.c_invoice_id" +
+      "                           LEFT JOIN fin_payment_schedule pso ON psd.fin_payment_schedule_order = pso.fin_payment_schedule_id" +
+      "                           LEFT JOIN c_order o ON pso.c_order_id = o.c_order_id" +
+      "                           LEFT JOIN c_glitem gli ON pd.c_glitem_id = gli.c_glitem_id" +
+      "                          WHERE p.fin_payment_id = pd.fin_payment_id" +
+      "                          and pso.fin_payment_schedule_id = fin.fin_payment_schedule_id)";
+
+    ResultSet result;
+    Vector<java.lang.Object> vector = new Vector<java.lang.Object>(0);
+    PreparedStatement st = null;
+
+    try {
+    st = connectionProvider.getPreparedStatement(strSql);
+
+      result = st.executeQuery();
+      long countRecord = 0;
+      long countRecordSkip = 1;
+      boolean continueResult = true;
+      while(countRecordSkip < firstRegister && continueResult) {
+        continueResult = result.next();
+        countRecordSkip++;
+      }
+      while(continueResult && result.next()) {
+        countRecord++;
+        UpdatePaymentPlanData objectUpdatePaymentPlanData = new UpdatePaymentPlanData();
+        objectUpdatePaymentPlanData.finpaymentscheduleid = UtilSql.getValue(result, "FINPAYMENTSCHEDULEID");
+        objectUpdatePaymentPlanData.rownum = Long.toString(countRecord);
+        objectUpdatePaymentPlanData.InitRecordNumber = Integer.toString(firstRegister);
+        vector.addElement(objectUpdatePaymentPlanData);
+        if (countRecord >= numberRegisters && numberRegisters != 0) {
+          continueResult = false;
+        }
+      }
+      result.close();
+    } catch(SQLException e){
+      log4j.error("SQL error in query: " + strSql + "Exception:"+ e);
+      throw new ServletException("@CODE=" + Integer.toString(e.getErrorCode()) + "@" + e.getMessage());
+    } catch(Exception ex){
+      log4j.error("Exception in query: " + strSql + "Exception:"+ ex);
+      throw new ServletException("@CODE=@" + ex.getMessage());
+    } finally {
+      try {
+        connectionProvider.releasePreparedStatement(st);
+      } catch(Exception ignore){
+        ignore.printStackTrace();
+      }
+    }
+    UpdatePaymentPlanData objectUpdatePaymentPlanData[] = new UpdatePaymentPlanData[vector.size()];
+    vector.copyInto(objectUpdatePaymentPlanData);
+    return(objectUpdatePaymentPlanData);
+  }
+
+  public static int update(ConnectionProvider connectionProvider, String totalAmount, String finpaymentscheduleid)    throws ServletException {
+    String strSql = "";
+    strSql = strSql + 
+      "      UPDATE fin_payment_schedule fin" +
+      "      SET outstandingamt = amount - TO_NUMBER(?)," +
+      "      paidamt = TO_NUMBER(?)" +
+      "      WHERE fin.fin_payment_schedule_id = ?";
+
+    int updateCount = 0;
+    PreparedStatement st = null;
+
+    int iParameter = 0;
+    try {
+    st = connectionProvider.getPreparedStatement(strSql);
+      iParameter++; UtilSql.setValue(st, iParameter, 12, null, totalAmount);
+      iParameter++; UtilSql.setValue(st, iParameter, 12, null, totalAmount);
+      iParameter++; UtilSql.setValue(st, iParameter, 12, null, finpaymentscheduleid);
+
+      updateCount = st.executeUpdate();
+    } catch(SQLException e){
+      log4j.error("SQL error in query: " + strSql + "Exception:"+ e);
+      throw new ServletException("@CODE=" + Integer.toString(e.getErrorCode()) + "@" + e.getMessage());
+    } catch(Exception ex){
+      log4j.error("Exception in query: " + strSql + "Exception:"+ ex);
+      throw new ServletException("@CODE=@" + ex.getMessage());
+    } finally {
+      try {
+        connectionProvider.releasePreparedStatement(st);
+      } catch(Exception ignore){
+        ignore.printStackTrace();
+      }
+    }
+    return(updateCount);
+  }
+
+  public static boolean isExecuted(ConnectionProvider connectionProvider)    throws ServletException {
+    String strSql = "";
+    strSql = strSql + 
+      "        SELECT count(*) as exist" +
+      "        FROM DUAL" +
+      "        WHERE EXISTS (SELECT 1 FROM ad_preference" +
+      "                      WHERE attribute = 'PaymentPlanUpdated')";
+
+    ResultSet result;
+    boolean boolReturn = false;
+    PreparedStatement st = null;
+
+    try {
+    st = connectionProvider.getPreparedStatement(strSql);
+
+      result = st.executeQuery();
+      if(result.next()) {
+        boolReturn = !UtilSql.getValue(result, "EXIST").equals("0");
+      }
+      result.close();
+    } catch(SQLException e){
+      log4j.error("SQL error in query: " + strSql + "Exception:"+ e);
+      throw new ServletException("@CODE=" + Integer.toString(e.getErrorCode()) + "@" + e.getMessage());
+    } catch(Exception ex){
+      log4j.error("Exception in query: " + strSql + "Exception:"+ ex);
+      throw new ServletException("@CODE=@" + ex.getMessage());
+    } finally {
+      try {
+        connectionProvider.releasePreparedStatement(st);
+      } catch(Exception ignore){
+        ignore.printStackTrace();
+      }
+    }
+    return(boolReturn);
+  }
+
+  public static int createPreference(ConnectionProvider connectionProvider)    throws ServletException {
+    String strSql = "";
+    strSql = strSql + 
+      "           INSERT INTO ad_preference (" +
+      "           ad_preference_id, ad_client_id, ad_org_id, isactive," +
+      "           createdby, created, updatedby, updated,attribute" +
+      "           ) VALUES (" +
+      "           get_uuid(), '0', '0', 'Y', '0', NOW(), '0', NOW(),'PaymentPlanUpdated')";
+
+    int updateCount = 0;
+    PreparedStatement st = null;
+
+    try {
+    st = connectionProvider.getPreparedStatement(strSql);
+
+      updateCount = st.executeUpdate();
+    } catch(SQLException e){
+      log4j.error("SQL error in query: " + strSql + "Exception:"+ e);
+      throw new ServletException("@CODE=" + Integer.toString(e.getErrorCode()) + "@" + e.getMessage());
+    } catch(Exception ex){
+      log4j.error("Exception in query: " + strSql + "Exception:"+ ex);
+      throw new ServletException("@CODE=@" + ex.getMessage());
+    } finally {
+      try {
+        connectionProvider.releasePreparedStatement(st);
+      } catch(Exception ignore){
+        ignore.printStackTrace();
+      }
+    }
+    return(updateCount);
+  }
+}
--- a/src-util/modulescript/src/org/openbravo/modulescript/UpdateADTrees.java	Mon Oct 20 16:16:57 2014 +0200
+++ b/src-util/modulescript/src/org/openbravo/modulescript/UpdateADTrees.java	Wed Feb 11 09:31:54 2015 +0100
@@ -35,6 +35,10 @@
       ConnectionProvider cp = getConnectionProvider();
       // Fills in the ad_table_id column of the existing ad_tree table, using the treetype property to patch each ad_tree with its corresponding ad_table
       UpdateADTreesData.update(cp);
+      // See issue https://issues.openbravo.com/view.php?id=27918
+      UpdateADTreesData.fixAccountingReportSetup(cp);
+      // Manually set to null the TreeType column of the FinancialMgmtAccountingReport table. Needs to be done manually to prevent a constraint exception that happens because of this design defect https://issues.openbravo.com/view.php?id=12577
+      UpdateADTreesData.deleteTreeTypeFromFinancialMgmtAccountingReport(cp);
     } catch (Exception e) {
       handleError(e);
     }
--- a/src-util/modulescript/src/org/openbravo/modulescript/UpdateADTrees_Data.xsql	Mon Oct 20 16:16:57 2014 +0200
+++ b/src-util/modulescript/src/org/openbravo/modulescript/UpdateADTrees_Data.xsql	Wed Feb 11 09:31:54 2015 +0100
@@ -35,4 +35,20 @@
       ]]>
     </Sql>
   </SqlMethod>
+  <SqlMethod name="fixAccountingReportSetup" type="preparedStatement" return="rowcount">
+    <SqlMethodComment></SqlMethodComment>
+    <Sql>
+      <![CDATA[
+        update ad_tree set ad_table_id = '800178' where treetype = 'AR' and ad_table_id = '800223'
+      ]]>
+    </Sql>
+  </SqlMethod>  
+  <SqlMethod name="deleteTreeTypeFromFinancialMgmtAccountingReport" type="preparedStatement" return="rowcount">
+    <SqlMethodComment></SqlMethodComment>
+    <Sql>
+      <![CDATA[
+        update ad_table set treetype = null where ad_table_id = '800223'
+      ]]>
+    </Sql>
+  </SqlMethod>    
 </SqlClass>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-util/modulescript/src/org/openbravo/modulescript/UpdatePaymentPlan.java	Wed Feb 11 09:31:54 2015 +0100
@@ -0,0 +1,44 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2014 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ *************************************************************************
+ */
+package org.openbravo.modulescript;
+
+import java.sql.PreparedStatement;
+
+import org.openbravo.database.ConnectionProvider;
+import org.openbravo.modulescript.ModuleScript;
+
+public class UpdatePaymentPlan extends ModuleScript {
+
+  public void execute() {
+    try {
+      ConnectionProvider cp = getConnectionProvider();
+      boolean isExecuted = UpdatePaymentPlanData.isExecuted(cp);
+      if (!isExecuted) {
+        UpdatePaymentPlanData[] paymentSchedule = UpdatePaymentPlanData.select(cp);
+        for (UpdatePaymentPlanData ps : paymentSchedule) {
+          String amount = UpdatePaymentPlanData.selectAmount(cp, ps.finpaymentscheduleid);
+          UpdatePaymentPlanData.update(cp, amount, ps.finpaymentscheduleid);
+        }
+        UpdatePaymentPlanData.createPreference(cp);
+      }
+    } catch (Exception e) {
+      handleError(e);
+    }
+  }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-util/modulescript/src/org/openbravo/modulescript/UpdatePaymentPlan_data.xsql	Wed Feb 11 09:31:54 2015 +0100
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License.
+ * The Original Code is Openbravo ERP.
+ * The Initial Developer of the Original Code is Openbravo SLU
+ * All portions are Copyright (C) 2014 Openbravo SLU
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+-->
+<SqlClass name="UpdatePaymentPlanData" package="org.openbravo.modulescript">
+   <SqlClassComment></SqlClassComment>
+   <SqlMethod name="dummy" type="preparedStatement" return="multiple">
+    <SqlMethodComment></SqlMethodComment>
+    <Sql>
+      <![CDATA[
+      SELECT '' AS finpaymentscheduleid, '' AS paidamt FROM DUAL
+      ]]>
+    </Sql>
+    <Field name="rownum" value="count"/>
+  </SqlMethod>
+  <SqlMethod name="selectAmount" type="preparedStatement" return="string">
+    <SqlMethodComment></SqlMethodComment>
+    <Sql>
+      <![CDATA[
+      SELECT SUM(psd.amount) AS paidamt
+      FROM fin_payment p
+      LEFT JOIN fin_financial_account fa ON p.fin_financial_account_id = fa.fin_financial_account_id, fin_payment_detail pd
+      JOIN fin_payment_scheduledetail psd ON pd.fin_payment_detail_id = psd.fin_payment_detail_id
+      LEFT JOIN fin_payment_schedule psi ON psd.fin_payment_schedule_invoice = psi.fin_payment_schedule_id
+      LEFT JOIN c_invoice i ON psi.c_invoice_id = i.c_invoice_id
+      LEFT JOIN fin_payment_schedule pso ON psd.fin_payment_schedule_order = pso.fin_payment_schedule_id
+      LEFT JOIN c_order o ON pso.c_order_id = o.c_order_id
+      LEFT JOIN c_glitem gli ON pd.c_glitem_id = gli.c_glitem_id
+      WHERE p.fin_payment_id = pd.fin_payment_id
+      AND pso.fin_payment_schedule_id = ?
+      ]]>
+    </Sql>
+    <Field name="rownum" value="count"/>
+    <Parameter name="finpaymentscheduleid"/>
+  </SqlMethod>
+  <SqlMethod name="select" type="preparedStatement" return="multiple">
+    <SqlMethodComment></SqlMethodComment>
+    <Sql>
+      <![CDATA[
+      SELECT fin.fin_payment_schedule_id AS finpaymentscheduleid
+      FROM fin_payment_schedule fin
+      WHERE paidamt <> (SELECT SUM(psd.amount)
+                           FROM fin_payment p
+                           LEFT JOIN fin_financial_account fa ON p.fin_financial_account_id = fa.fin_financial_account_id, fin_payment_detail pd
+                           JOIN fin_payment_scheduledetail psd ON pd.fin_payment_detail_id = psd.fin_payment_detail_id
+                           LEFT JOIN fin_payment_schedule psi ON psd.fin_payment_schedule_invoice = psi.fin_payment_schedule_id
+                           LEFT JOIN c_invoice i ON psi.c_invoice_id = i.c_invoice_id
+                           LEFT JOIN fin_payment_schedule pso ON psd.fin_payment_schedule_order = pso.fin_payment_schedule_id
+                           LEFT JOIN c_order o ON pso.c_order_id = o.c_order_id
+                           LEFT JOIN c_glitem gli ON pd.c_glitem_id = gli.c_glitem_id
+                          WHERE p.fin_payment_id = pd.fin_payment_id
+                          and pso.fin_payment_schedule_id = fin.fin_payment_schedule_id)
+      ]]>
+    </Sql>
+    <Field name="rownum" value="count"/>
+  </SqlMethod>
+  <SqlMethod name="update" type="preparedStatement" return="rowCount">
+    <SqlMethodComment></SqlMethodComment>
+    <Sql>
+      <![CDATA[
+      UPDATE fin_payment_schedule fin
+      SET outstandingamt = amount - TO_NUMBER(?),
+      paidamt = TO_NUMBER(?)
+      WHERE fin.fin_payment_schedule_id = ?
+      ]]>
+    </Sql>
+    <Parameter name="totalAmount"/>
+    <Parameter name="totalAmount"/>
+    <Parameter name="finpaymentscheduleid"/>
+  </SqlMethod>
+  <SqlMethod name="isExecuted" type="preparedStatement" return="boolean">
+    <SqlMethodComment></SqlMethodComment>
+    <Sql>
+      <![CDATA[
+        SELECT count(*) as exist
+        FROM DUAL
+        WHERE EXISTS (SELECT 1 FROM ad_preference
+                      WHERE attribute = 'PaymentPlanUpdated')
+      ]]>
+    </Sql>
+  </SqlMethod>
+   <SqlMethod name="createPreference" type="preparedStatement" return="rowcount">
+      <SqlMethodComment></SqlMethodComment>
+       <Sql> 
+       <![CDATA[ 
+           INSERT INTO ad_preference (
+           ad_preference_id, ad_client_id, ad_org_id, isactive,
+           createdby, created, updatedby, updated,attribute
+           ) VALUES (
+           get_uuid(), '0', '0', 'Y', '0', NOW(), '0', NOW(),'PaymentPlanUpdated')
+         ]]>
+        </Sql>
+   </SqlMethod>
+</SqlClass>
\ No newline at end of file
--- a/src/org/openbravo/common/actionhandler/ManageReservationActionHandler.java	Mon Oct 20 16:16:57 2014 +0200
+++ b/src/org/openbravo/common/actionhandler/ManageReservationActionHandler.java	Wed Feb 11 09:31:54 2015 +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) 2013 Openbravo SLU 
+ * All portions are Copyright (C) 2013-2014 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -186,8 +186,11 @@
     if (idList.size() > 0) {
       for (String id : idList) {
         ReservationStock resStock = OBDal.getInstance().get(ReservationStock.class, id);
-        reservation.getMaterialMgmtReservationStockList().remove(resStock);
-        OBDal.getInstance().remove(resStock);
+        if(resStock.getReleased() == null
+            || resStock.getReleased().compareTo(BigDecimal.ZERO) == 0) {
+          reservation.getMaterialMgmtReservationStockList().remove(resStock);
+          OBDal.getInstance().remove(resStock);
+        }
       }
       OBDal.getInstance().save(reservation);
       OBDal.getInstance().flush();
--- a/src/org/openbravo/common/datasource/StockReservationPickAndEditDataSource.java	Mon Oct 20 16:16:57 2014 +0200
+++ b/src/org/openbravo/common/datasource/StockReservationPickAndEditDataSource.java	Wed Feb 11 09:31:54 2015 +0100
@@ -557,6 +557,10 @@
     if (filterCriteria.get("released") != null) {
       releasedFilterCriteria = filterCriteria.get("released");
     }
+    Boolean allocatedCriteria = null;
+    if (filterCriteria.get("allocated") != null) {
+      allocatedCriteria = "true".equals(filterCriteria.get("allocated"));
+    }
 
     if (ol != null && !"".equals(ol)) {
       reservation = ReservationUtils.getReservationFromOrder(OBDal.getInstance().get(
@@ -574,14 +578,18 @@
     try {
       result.addAll(getSelectedLines(reservation));
       if (orderLinesFiltered == null || orderLinesFiltered.size() == 0) {
-        result.addAll(getStorageDetail(reservation, organizations, warehousesFiltered,
-            locatorsFiltered, attributesFiltered, availableQtyFilterCriteria,
-            reservedinothersFilterCriteria, releasedFilterCriteria, selectedIds));
+        result
+            .addAll(getStorageDetail(reservation, organizations, warehousesFiltered,
+                locatorsFiltered, attributesFiltered, availableQtyFilterCriteria,
+                reservedinothersFilterCriteria, releasedFilterCriteria, allocatedCriteria,
+                selectedIds));
       }
       if (locatorsFiltered == null || locatorsFiltered.size() == 0) {
-        result.addAll(getPurchaseOrderLines(reservation, organizations, warehousesFiltered,
-            attributesFiltered, orderLinesFiltered, availableQtyFilterCriteria,
-            reservedinothersFilterCriteria, releasedFilterCriteria, selectedIds));
+        result
+            .addAll(getPurchaseOrderLines(reservation, organizations, warehousesFiltered,
+                attributesFiltered, orderLinesFiltered, availableQtyFilterCriteria,
+                reservedinothersFilterCriteria, releasedFilterCriteria, allocatedCriteria,
+                selectedIds));
       }
     } finally {
       OBContext.restorePreviousMode();
@@ -830,7 +838,7 @@
       Set<String> organizations, List<Warehouse> warehousesFiltered,
       List<AttributeSetInstance> attributeSetInstancesFiltered, List<OrderLine> orderLinesFiltered,
       String availableQtyFilterCriteria, String reservedinothersFilterCriteria,
-      String releasedFilterCriteria, ArrayList<String> selectedIds) {
+      String releasedFilterCriteria, Boolean allocatedCriteria, ArrayList<String> selectedIds) {
     List<Map<String, Object>> result = new ArrayList<Map<String, Object>>();
     final StringBuilder hqlString = new StringBuilder();
     hqlString.append("select ol from OrderLine as ol ");
@@ -889,80 +897,55 @@
     }
     for (Object o : query.list()) {
       Map<String, Object> myMap = new HashMap<String, Object>();
-      StorageDetail sd = (StorageDetail) o;
-      if (selectedIds.size() > 0) {
-        for (int i = 0; i < selectedIds.size(); i++) {
-          if (!sd.getId().equals(selectedIds.get(i))) {
+      OrderLine orderLine = (OrderLine) o;
+      myMap.put("id", orderLine.getId());
+      myMap.put("obSelected", false);
+      myMap.put("reservationStock", null);
+      myMap.put("reservationStock$_identifier", "");
+      myMap.put("storageBin$_identifier", "");
+      myMap.put("storageBin", "");
+      myMap.put("warehouse", (orderLine.getSalesOrder().getWarehouse() != null) ? orderLine
+          .getSalesOrder().getWarehouse().getId() : null);
+      myMap.put("warehouse$_identifier",
+          (orderLine.getSalesOrder().getWarehouse() != null) ? orderLine.getSalesOrder()
+              .getWarehouse().getIdentifier() : "");
+      myMap.put("attributeSetValue", orderLine.getAttributeSetValue() != null ? orderLine
+          .getAttributeSetValue().getId() : null);
+      myMap.put("attributeSetValue$_identifier",
+          orderLine.getAttributeSetValue() != null ? orderLine.getAttributeSetValue()
+              .getIdentifier() : "");
+      myMap.put("purchaseOrderLine", orderLine.getId());
+      myMap.put("purchaseOrderLine$_identifier", orderLine.getIdentifier());
+      // Check Filter Criterias
 
-            // Check Filter Criterias
-            if (availableQtyFilterCriteria != null && !"".equals(availableQtyFilterCriteria)
-                && !isInScope("availableQty", availableQtyFilterCriteria, sd.getQuantityOnHand())) {
-              continue;
-            }
-            BigDecimal reservedinothers = getQtyReserved(reservation, reservation.getProduct(),
-                sd.getAttributeSetValue(), sd.getStorageBin());
+      if (availableQtyFilterCriteria != null && !"".equals(availableQtyFilterCriteria)
+          && !isInScope("availableQty", availableQtyFilterCriteria, orderLine.getOrderedQuantity())) {
+        continue;
+      }
+      BigDecimal reservedinothers = getQtyReserved(reservation, orderLine);
+      if (reservedinothersFilterCriteria != null && !"".equals(reservedinothersFilterCriteria)
+          && !isInScope("reservedinothers", reservedinothersFilterCriteria, reservedinothers)) {
+        continue;
+      }
+      if (releasedFilterCriteria != null && !"".equals(releasedFilterCriteria)
+          && !isInScope("released", releasedFilterCriteria, BigDecimal.ZERO)) {
+        continue;
+      }
+      if (allocatedCriteria == Boolean.TRUE) {
+        // Purchase Order Lines are inserted with allocated FALSE by default. So filtering by
+        // allocated = true results in filtering out all.
+        continue;
+      }
 
-            if (reservedinothersFilterCriteria != null
-                && !"".equals(reservedinothersFilterCriteria)
-                && !isInScope("reservedinothers", reservedinothersFilterCriteria, reservedinothers)) {
-              continue;
-            }
-            if (releasedFilterCriteria != null && !"".equals(releasedFilterCriteria)
-                && !isInScope("released", releasedFilterCriteria, BigDecimal.ZERO)) {
-              continue;
-            }
-            result = tomap(sd, false, result, reservedinothers, reservation);
-          }
-        }
-      } else {
-
-        OrderLine orderLine = (OrderLine) o;
-        myMap.put("id", orderLine.getId());
-        myMap.put("obSelected", false);
-        myMap.put("reservationStock", null);
-        myMap.put("reservationStock$_identifier", "");
-        myMap.put("storageBin$_identifier", "");
-        myMap.put("storageBin", "");
-        myMap.put("warehouse", (orderLine.getSalesOrder().getWarehouse() != null) ? orderLine
-            .getSalesOrder().getWarehouse().getId() : null);
-        myMap.put("warehouse$_identifier",
-            (orderLine.getSalesOrder().getWarehouse() != null) ? orderLine.getSalesOrder()
-                .getWarehouse().getIdentifier() : "");
-        myMap.put("attributeSetValue", orderLine.getAttributeSetValue() != null ? orderLine
-            .getAttributeSetValue().getId() : null);
-        myMap.put("attributeSetValue$_identifier",
-            orderLine.getAttributeSetValue() != null ? orderLine.getAttributeSetValue()
-                .getIdentifier() : "");
-        myMap.put("purchaseOrderLine", orderLine.getId());
-        myMap.put("purchaseOrderLine$_identifier", orderLine.getIdentifier());
-        // Check Filter Criterias
-
-        if (availableQtyFilterCriteria != null
-            && !"".equals(availableQtyFilterCriteria)
-            && !isInScope("availableQty", availableQtyFilterCriteria,
-                orderLine.getOrderedQuantity())) {
-          continue;
-        }
-        BigDecimal reservedinothers = getQtyReserved(reservation, orderLine);
-        if (reservedinothersFilterCriteria != null && !"".equals(reservedinothersFilterCriteria)
-            && !isInScope("reservedinothers", reservedinothersFilterCriteria, reservedinothers)) {
-          continue;
-        }
-        if (releasedFilterCriteria != null && !"".equals(releasedFilterCriteria)
-            && !isInScope("released", releasedFilterCriteria, BigDecimal.ZERO)) {
-          continue;
-        }
-        myMap.put("availableQty",
-            orderLine.getOrderedQuantity().subtract(getDeliveredQuantity(orderLine)));
-        myMap.put("reservedinothers", reservedinothers);
-        myMap.put("quantity", BigDecimal.ZERO);
-        myMap.put("reservationQuantity", reservation.getQuantity());
-        myMap.put("released", BigDecimal.ZERO);
-        myMap.put("allocated", false);
-        result.add(myMap);
-      }
+      myMap.put("availableQty",
+          orderLine.getOrderedQuantity().subtract(getDeliveredQuantity(orderLine)));
+      myMap.put("reservedinothers", reservedinothers);
+      myMap.put("quantity", BigDecimal.ZERO);
+      myMap.put("reservationQuantity", reservation.getQuantity());
+      myMap.put("released", BigDecimal.ZERO);
+      myMap.put("allocated", false);
+      result.add(myMap);
     }
-
     return result;
   }
 
@@ -970,7 +953,7 @@
       Set<String> organizations, List<Warehouse> warehousesFiltered,
       List<Locator> locatorsFiltered, List<AttributeSetInstance> attributeSetInstancesFiltered,
       String availableQtyFilterCriteria, String reservedinothersFilterCriteria,
-      String releasedFilterCriteria, ArrayList<String> selectedIds) {
+      String releasedFilterCriteria, Boolean allocatedCriteria, ArrayList<String> selectedIds) {
     List<Map<String, Object>> result = new ArrayList<Map<String, Object>>();
     final StringBuilder hqlString = new StringBuilder();
     hqlString.append("select sd from MaterialMgmtStorageDetail as sd ");
@@ -1072,6 +1055,11 @@
                 && !isInScope("released", releasedFilterCriteria, BigDecimal.ZERO)) {
               continue;
             }
+            if (allocatedCriteria == Boolean.TRUE) {
+              // Storage Details are inserted with allocated FALSE by default. So filterin by
+              // allocated = true results in filtering out all.
+              continue;
+            }
             result = tomap(sd, false, result, reservedinothers, reservation);
           }
         }
@@ -1092,6 +1080,11 @@
             && !isInScope("released", releasedFilterCriteria, BigDecimal.ZERO)) {
           continue;
         }
+        if (allocatedCriteria == Boolean.TRUE) {
+          // Storage Details are inserted with allocated FALSE by default. So filterin by
+          // allocated = true results in filtering out all.
+          continue;
+        }
         result = tomap(sd, false, result, reservedinothers, reservation);
       }
     }
--- a/src/org/openbravo/dal/security/OrganizationStructureProvider.java	Mon Oct 20 16:16:57 2014 +0200
+++ b/src/org/openbravo/dal/security/OrganizationStructureProvider.java	Wed Feb 11 09:31:54 2015 +0100
@@ -67,7 +67,7 @@
     initialize();
   }
 
-  private void initialize() {
+  private synchronized void initialize() {
     if (isInitialized) {
       return;
     }
--- a/src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java	Mon Oct 20 16:16:57 2014 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java	Wed Feb 11 09:31:54 2015 +0100
@@ -387,7 +387,7 @@
                   .getInvoice()
                   : null);
           docLine.setDoubtFulDebtAmount(new BigDecimal(data[i].getField("DoubtFulDebtAmount")));
-          docLine.setInvoiceTaxCashVAT_V(strPaymentId);
+          docLine.setInvoiceTaxCashVAT_V(paymentDetail_ID);
         }
         docLine.setIsPrepayment(data[i].getField("isprepayment"));
         docLine.setCGlItemId(data[i].getField("cGlItemId"));
--- a/src/org/openbravo/erpCommon/ad_forms/DocFINPayment.java	Mon Oct 20 16:16:57 2014 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/DocFINPayment.java	Wed Feb 11 09:31:54 2015 +0100
@@ -301,7 +301,7 @@
                 .getFINPaymentScheduleDetailList().get(0).getInvoicePaymentSchedule().getInvoice()
                 : null);
         docLine.m_Record_Id2 = data[i].getField("recordId2");
-        docLine.setInvoiceTaxCashVAT_V(detail.getFinPayment().getId());
+        docLine.setInvoiceTaxCashVAT_V(Line_ID);
         list.add(docLine);
       } finally {
         OBContext.restorePreviousMode();
--- a/src/org/openbravo/erpCommon/ad_forms/DocFINReconciliation.java	Mon Oct 20 16:16:57 2014 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/DocFINReconciliation.java	Wed Feb 11 09:31:54 2015 +0100
@@ -697,7 +697,7 @@
         // Cambiar line to reflect BPs
         FIN_PaymentDetail paymentDetail = OBDal.getInstance().get(FIN_PaymentDetail.class,
             finPaymentDetailID);
-        detail.setInvoiceTaxCashVAT_V(paymentDetail.getFinPayment().getId());
+        detail.setInvoiceTaxCashVAT_V(finPaymentDetailID);
         fact = createFactPaymentDetails(detail, paymentDetail, as, conn, fact, Fact_Acct_Group_ID,
             Fact_Acct_Group_ID2);
       }
--- a/src/org/openbravo/erpCommon/ad_forms/DocInventory.java	Mon Oct 20 16:16:57 2014 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/DocInventory.java	Wed Feb 11 09:31:54 2015 +0100
@@ -180,7 +180,8 @@
     int countInvLinesWithTrnCostZero = 0;
     for (int i = 0; i < p_lines.length; i++) {
       DocLine_Material line = (DocLine_Material) p_lines[i];
-      if (line.transaction.getTransactionCost().compareTo(ZERO) == 0) {
+      if (line.transaction.getTransactionCost() != null
+          && line.transaction.getTransactionCost().compareTo(ZERO) == 0) {
         countInvLinesWithTrnCostZero++;
       }
     }
--- a/src/org/openbravo/erpCommon/ad_forms/DocLineCashVATReady_PaymentTransactionReconciliation.java	Mon Oct 20 16:16:57 2014 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/DocLineCashVATReady_PaymentTransactionReconciliation.java	Wed Feb 11 09:31:54 2015 +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) 2013 Openbravo SLU
+ * All portions are Copyright (C) 2013-2014 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -50,19 +50,20 @@
     this.invoiceTaxCashVAT_V = invoiceTaxCashVAT_V;
   }
 
-  public void setInvoiceTaxCashVAT_V(String finPaymentID) {
-    if (StringUtils.isBlank(finPaymentID)) {
+  public void setInvoiceTaxCashVAT_V(String finPaymentDetailID) {
+    if (StringUtils.isBlank(finPaymentDetailID)) {
       this.invoiceTaxCashVAT_V = new ArrayList<InvoiceTaxCashVAT_V>();
     } else {
       try {
         OBContext.setAdminMode(true);
         final StringBuffer hql = new StringBuffer();
         hql.append(" as itcv ");
-        hql.append(" where itcv." + InvoiceTaxCashVAT_V.PROPERTY_PAYMENT + ".id = :finPaymentID ");
+        hql.append(" where itcv." + InvoiceTaxCashVAT_V.PROPERTY_PAYMENTDETAILS
+            + ".id = :finPaymentDetailID ");
         hql.append(" and itcv." + InvoiceTaxCashVAT_V.PROPERTY_CANCELED + " = false");
         OBQuery<InvoiceTaxCashVAT_V> obq = OBDal.getInstance().createQuery(
             InvoiceTaxCashVAT_V.class, hql.toString());
-        obq.setNamedParameter("finPaymentID", finPaymentID);
+        obq.setNamedParameter("finPaymentDetailID", finPaymentDetailID);
         obq.setFilterOnReadableClients(false);
         obq.setFilterOnReadableOrganization(false);
 
--- a/src/org/openbravo/erpCommon/ad_forms/DocProduction.java	Mon Oct 20 16:16:57 2014 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/DocProduction.java	Wed Feb 11 09:31:54 2015 +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) 2008-2014 Openbravo SLU
+ * All portions are Copyright (C) 2008-2015 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -169,7 +169,7 @@
     int countProductionlinesWithTrnCostZero = 0;
     for (int i = 0; i < p_lines.length; i++) {
       DocLine_Material line = (DocLine_Material) p_lines[i];
-      if (line.transaction.getTransactionCost() != null
+      if (line.transaction != null && line.transaction.getTransactionCost() != null
           && line.transaction.getTransactionCost().compareTo(ZERO) == 0) {
         countProductionlinesWithTrnCostZero++;
       }
--- a/src/org/openbravo/erpCommon/utility/SystemInfo.java	Mon Oct 20 16:16:57 2014 +0200
+++ b/src/org/openbravo/erpCommon/utility/SystemInfo.java	Wed Feb 11 09:31:54 2015 +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) 2008-2011 Openbravo SLU 
+ * All portions are Copyright (C) 2008-2014 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -299,9 +299,16 @@
     validateConnection(conn);
     String strSystemIdentifier = SystemInfoData.selectSystemIdentifier(conn);
     if (strSystemIdentifier == null || strSystemIdentifier.equals("")) {
-      strSystemIdentifier = UUID.randomUUID().toString();
+      if (systemIdentifier != null) {
+        // system identifier was previously calculated but it was not persisted in DB, let's update
+        // it again
+        strSystemIdentifier = systemIdentifier;
+      } else {
+        strSystemIdentifier = UUID.randomUUID().toString();
+      }
       SystemInfoData.updateSystemIdentifier(conn, strSystemIdentifier);
     }
+    systemIdentifier = strSystemIdentifier;
     return strSystemIdentifier;
   }
 
--- a/src/org/openbravo/event/BusinessPartnerEventHandler.java	Mon Oct 20 16:16:57 2014 +0200
+++ b/src/org/openbravo/event/BusinessPartnerEventHandler.java	Wed Feb 11 09:31:54 2015 +0100
@@ -25,6 +25,7 @@
 import org.openbravo.base.model.ModelProvider;
 import org.openbravo.base.model.Property;
 import org.openbravo.client.kernel.event.EntityNewEvent;
+import org.openbravo.client.kernel.event.EntityPersistenceEvent;
 import org.openbravo.client.kernel.event.EntityPersistenceEventObserver;
 import org.openbravo.client.kernel.event.EntityUpdateEvent;
 import org.openbravo.model.common.businesspartner.BusinessPartner;
@@ -39,15 +40,7 @@
     return entities;
   }
 
-  public void onSave(@Observes
-  EntityNewEvent event) {
-    if (!isValidEvent(event)) {
-      return;
-    }
-  }
-
-  public void onUpdate(@Observes
-  EntityUpdateEvent event) {
+  public void onSave(@Observes EntityNewEvent event) {
     if (!isValidEvent(event)) {
       return;
     }
@@ -55,7 +48,15 @@
     setUpdateCurrency(event, bp);
   }
 
-  private void setUpdateCurrency(EntityUpdateEvent event, BusinessPartner bp) {
+  public void onUpdate(@Observes EntityUpdateEvent event) {
+    if (!isValidEvent(event)) {
+      return;
+    }
+    final BusinessPartner bp = (BusinessPartner) event.getTargetInstance();
+    setUpdateCurrency(event, bp);
+  }
+
+  private void setUpdateCurrency(EntityPersistenceEvent event, BusinessPartner bp) {
     if (bp.getCurrency() == null
         && (bp.getPriceList() != null || bp.getPurchasePricelist() != null)) {