IDEMPIERE-4631 Lead window -> NPE GridFieldVO.loadLookupInfo: No LookupInfo for BP_Location_ID (#511)

This commit is contained in:
Carlos Ruiz 2021-01-06 15:22:33 +01:00 committed by GitHub
parent 8cc8445d8d
commit 2cfb699c6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -1028,6 +1028,8 @@ public class MLookupFactory
private static ArrayList<LookupDisplayColumn> getListIdentifiers(String TableName) { private static ArrayList<LookupDisplayColumn> getListIdentifiers(String TableName) {
ArrayList<LookupDisplayColumn> list = new ArrayList<LookupDisplayColumn>(); ArrayList<LookupDisplayColumn> list = new ArrayList<LookupDisplayColumn>();
MTable table = MTable.get(Env.getCtx(), TableName); MTable table = MTable.get(Env.getCtx(), TableName);
if (table == null)
return null;
for (String idColumnName : table.getIdentifierColumns()) { for (String idColumnName : table.getIdentifierColumns()) {
MColumn column = table.getColumn(idColumnName); MColumn column = table.getColumn(idColumnName);
LookupDisplayColumn ldc = new LookupDisplayColumn(column.getColumnName(), column.getColumnSQL(true), column.isTranslated(), column.getAD_Reference_ID(), column.getAD_Reference_Value_ID()); LookupDisplayColumn ldc = new LookupDisplayColumn(column.getColumnName(), column.getColumnSQL(true), column.isTranslated(), column.getAD_Reference_ID(), column.getAD_Reference_Value_ID());

View File

@ -279,7 +279,7 @@ public class MQuery implements Serializable, Cloneable
return "C_BPartner_Location_ID"; return "C_BPartner_Location_ID";
if (columnName.equals("Account_ID")) if (columnName.equals("Account_ID"))
return "C_ElementValue_ID"; return "C_ElementValue_ID";
if (columnName.equals("C_LocFrom_ID") || columnName.equals("C_LocTo_ID")) if (columnName.equals("C_LocFrom_ID") || columnName.equals("C_LocTo_ID") || columnName.equals("BP_Location_ID"))
return "C_Location_ID"; return "C_Location_ID";
if (columnName.equals("C_UOM_To_ID")) if (columnName.equals("C_UOM_To_ID"))
return "C_UOM_ID"; return "C_UOM_ID";