IDEMPIERE-1070 Problem with Report in window Menu , tab traslation . Use language in Spanish

This commit is contained in:
Carlos Ruiz 2013-06-19 18:33:28 -05:00
parent 8996d0bf60
commit 6b7e171196
1 changed files with 13 additions and 4 deletions

View File

@ -772,7 +772,14 @@ public class MLookupFactory
return lInfo; return lInfo;
} // getLookup_TableDir } // getLookup_TableDir
private static StringBuilder getDisplayColumn(Language language, String TableName, ArrayList<LookupDisplayColumn> list) { private static StringBuilder getDisplayColumn(Language language,
String tableName, ArrayList<LookupDisplayColumn> list) {
return getDisplayColumn(language, tableName, list, null);
}
private static StringBuilder getDisplayColumn(Language language,
String TableName, ArrayList<LookupDisplayColumn> list,
String baseTable) {
StringBuilder displayColumn = new StringBuilder(); StringBuilder displayColumn = new StringBuilder();
int size = list.size(); int size = list.size();
// Get Display Column // Get Display Column
@ -787,7 +794,8 @@ public class MLookupFactory
displayColumn.append("NVL("); displayColumn.append("NVL(");
// translated // translated
if (ldc.IsTranslated && !Env.isBaseLanguage(language, TableName) && !ldc.IsVirtual) if (ldc.IsTranslated && !Env.isBaseLanguage(language, TableName) && !ldc.IsVirtual
&& baseTable != null && !(TableName+"_Trl").equalsIgnoreCase(baseTable))
{ {
displayColumn.append(TableName).append("_Trl.").append(ldc.ColumnName); displayColumn.append(TableName).append("_Trl.").append(ldc.ColumnName);
} }
@ -886,11 +894,12 @@ public class MLookupFactory
// //
StringBuilder embedSQL = new StringBuilder("SELECT "); StringBuilder embedSQL = new StringBuilder("SELECT ");
StringBuilder displayColumn = getDisplayColumn(language, TableName, list); StringBuilder displayColumn = getDisplayColumn(language, TableName, list, BaseTable);
embedSQL.append(displayColumn.toString()); embedSQL.append(displayColumn.toString());
embedSQL.append(" FROM ").append(TableName); embedSQL.append(" FROM ").append(TableName);
// Translation // Translation
if (isTranslated && !Env.isBaseLanguage(language, TableName)) if ( isTranslated && !Env.isBaseLanguage(language, TableName)
&& !(TableName+"_Trl").equalsIgnoreCase(BaseTable)) // IDEMPIERE-1070
{ {
embedSQL.append(" INNER JOIN ").append(TableName).append("_TRL ON (") embedSQL.append(" INNER JOIN ").append(TableName).append("_TRL ON (")
.append(TableName).append(".").append(KeyColumn) .append(TableName).append(".").append(KeyColumn)