IDEMPIERE-380 Search columns can't be used as identifier

This commit is contained in:
Carlos Ruiz 2012-08-09 11:15:04 -05:00
parent 572ed48efe
commit e23d6c8286
1 changed files with 11 additions and 11 deletions

View File

@ -718,6 +718,17 @@ public class MLookupFactory
{
displayColumn.append(DB.TO_CHAR(columnSQL, ldc.DisplayType, language.getAD_Language()));
}
// Table
else if ((ldc.DisplayType == DisplayType.Table || ldc.DisplayType == DisplayType.Search) && ldc.AD_Reference_ID != 0)
{
String embeddedSQL;
if (ldc.IsVirtual)
embeddedSQL = getLookup_TableEmbed (language, ldc.ColumnSQL, TableName, ldc.AD_Reference_ID);
else
embeddedSQL = getLookup_TableEmbed (language, ldc.ColumnName, TableName, ldc.AD_Reference_ID);
if (embeddedSQL != null)
displayColumn.append("(").append(embeddedSQL).append(")");
}
// TableDir
else if ((ldc.DisplayType == DisplayType.TableDir || ldc.DisplayType == DisplayType.Search)
&& ldc.ColumnName.endsWith("_ID"))
@ -730,17 +741,6 @@ public class MLookupFactory
if (embeddedSQL != null)
displayColumn.append("(").append(embeddedSQL).append(")");
}
// Table
else if (ldc.DisplayType == DisplayType.Table && ldc.AD_Reference_ID != 0)
{
String embeddedSQL;
if (ldc.IsVirtual)
embeddedSQL = getLookup_TableEmbed (language, ldc.ColumnSQL, TableName, ldc.AD_Reference_ID);
else
embeddedSQL = getLookup_TableEmbed (language, ldc.ColumnName, TableName, ldc.AD_Reference_ID);
if (embeddedSQL != null)
displayColumn.append("(").append(embeddedSQL).append(")");
}
// number
else if (DisplayType.isNumeric(ldc.DisplayType))
{