IDEMPIERE-5709 - Fixed SQLFind columns not working (#1822)

This commit is contained in:
Diego Ruiz 2023-05-05 18:13:19 +02:00 committed by GitHub
parent 0553878431
commit a8882677a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 5 deletions

View File

@ -2253,7 +2253,7 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
if (field == null || field.isVirtualUIColumn()) if (field == null || field.isVirtualUIColumn())
continue; continue;
isProductCategoryField = isProductCategoryField(field.getColumnName()); isProductCategoryField = isProductCategoryField(field.getColumnName());
ColumnSQL = field.getColumnSQL(false); ColumnSQL = field.getSearchColumnSQL() != null ? field.getSearchColumnSQL() : field.getColumnSQL(false);
if (table.getSelectedItem() != null && !table.getSelectedItem().getValue().equals(m_AD_Tab_UU)) if (table.getSelectedItem() != null && !table.getSelectedItem().getValue().equals(m_AD_Tab_UU))
{ {
if (!isCompositeExists) { if (!isCompositeExists) {
@ -2640,7 +2640,7 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
GridField field = getTargetMField(ColumnName); GridField field = getTargetMField(ColumnName);
boolean isProductCategoryField = isProductCategoryField(field.getColumnName()); boolean isProductCategoryField = isProductCategoryField(field.getColumnName());
StringBuilder ColumnSQL = new StringBuilder(field.getSearchColumnSQL()); StringBuilder ColumnSQL = field.getSearchColumnSQL() != null ? new StringBuilder(field.getSearchColumnSQL()) : new StringBuilder(field.getColumnSQL(false));
// add encryption here if the field is encrypted. // add encryption here if the field is encrypted.
if (field.isEncrypted()) { if (field.isEncrypted()) {
@ -2661,8 +2661,6 @@ public class FindWindow extends Window implements EventListener<Event>, ValueCha
continue; continue;
} }
isProductCategoryField = isProductCategoryField(field.getColumnName());
ColumnSQL = new StringBuilder(field.getColumnSQL(false));
// //
// Be more permissive for String columns // Be more permissive for String columns
if (isSearchLike(field)) if (isSearchLike(field))