Fixes issue 35636: Business partner selector get stuck in create lines from
authorMark <markmm82@gmail.com>
Sun, 16 Apr 2017 13:16:12 -0400
changeset 31979 e833242c1051
parent 31978 a49574c6de23
child 31980 a157881ce096
Fixes issue 35636: Business partner selector get stuck in create lines from
invoice in hgvol environment

In high volume environment, when the Business Partner selector is opened from Create
lines from process in the Invoice window, it takes too long to load results and as
consequence the browser was stocked.

To improve the performance in this selector, was changed the BusinessPartner_data.xsql
methods to use UPPER instead of C_IGNORE_ACCENT function, this way it uses the index
created in issue 35210 and improves of performance it introduces.
src/org/openbravo/erpCommon/info/BusinessPartner_data.xsql
--- a/src/org/openbravo/erpCommon/info/BusinessPartner_data.xsql	Mon Apr 24 18:41:02 2017 +0200
+++ b/src/org/openbravo/erpCommon/info/BusinessPartner_data.xsql	Sun Apr 16 13:16:12 2017 -0400
@@ -12,7 +12,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2010 Openbravo SLU 
+ * All portions are Copyright (C) 2001-2017 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -54,7 +54,7 @@
         <Parameter name="adUserClient" type="replace" optional="true" after="bp.AD_Client_ID IN (" text="'1'"/>
         <Parameter name="adUserOrg" type="replace" optional="true" after="bp.AD_Org_ID IN (" text="'1'"/>
         <Parameter name="key" ignoreValue="%" optional="true" after="AND bp.IsActive='Y'"><![CDATA[AND UPPER(bp.Value) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="name" ignoreValue="%" optional="true" after="AND bp.IsActive='Y'"><![CDATA[AND C_IGNORE_ACCENT(bp.Name) LIKE C_IGNORE_ACCENT(?) ]]></Parameter>
+        <Parameter name="name" ignoreValue="%" optional="true" after="AND bp.IsActive='Y'"><![CDATA[AND UPPER(bp.Name) LIKE UPPER(?) ]]></Parameter>
         <Parameter name="contact" ignoreValue="%" optional="true" after="AND bp.IsActive='Y'"><![CDATA[AND UPPER(u.name) LIKE UPPER(?) ]]></Parameter>
         <Parameter name="codigoPostal" ignoreValue="%" optional="true" after="AND bp.IsActive='Y'"><![CDATA[AND UPPER(l.Postal) LIKE UPPER(?) ]]></Parameter>
         <Parameter name="provincia" ignoreValue="%" optional="true" after="AND bp.IsActive='Y'"><![CDATA[AND UPPER(r.NAME) LIKE UPPER(?)]]></Parameter>
@@ -91,7 +91,7 @@
         <Parameter name="adUserClient" type="replace" optional="true" after="bp.AD_Client_ID IN (" text="'1'"/>
         <Parameter name="adUserOrg" type="replace" optional="true" after="bp.AD_Org_ID IN (" text="'1'"/>
         <Parameter name="key" ignoreValue="%" optional="true" after="AND bp.IsActive='Y'"><![CDATA[AND UPPER(bp.Value) LIKE UPPER(?) ]]></Parameter>
-        <Parameter name="name" ignoreValue="%" optional="true" after="AND bp.IsActive='Y'"><![CDATA[AND C_IGNORE_ACCENT(bp.Name) LIKE C_IGNORE_ACCENT(?) ]]></Parameter>
+        <Parameter name="name" ignoreValue="%" optional="true" after="AND bp.IsActive='Y'"><![CDATA[AND UPPER(bp.Name) LIKE UPPER(?) ]]></Parameter>
         <Parameter name="contact" ignoreValue="%" optional="true" after="AND bp.IsActive='Y'"><![CDATA[AND UPPER(u.name) LIKE UPPER(?) ]]></Parameter>
         <Parameter name="codigoPostal" ignoreValue="%" optional="true" after="AND bp.IsActive='Y'"><![CDATA[AND UPPER(l.Postal) LIKE UPPER(?) ]]></Parameter>
         <Parameter name="provincia" ignoreValue="%" optional="true" after="AND bp.IsActive='Y'"><![CDATA[AND UPPER(r.NAME) LIKE UPPER(?)]]></Parameter>