IDEMPIERE-4626 Error message when opening FindWindow in Invoice(Custo… (#507)

* IDEMPIERE-4626 Error message when opening FindWindow in Invoice(Customer)

add Payment displaytype to isList

* IDEMPIERE-4626 Error message when opening FindWindow in Invoice(Customer)

merge suggestion from Carlos
This commit is contained in:
hengsin 2021-01-05 22:40:37 +08:00 committed by GitHub
parent 00f22bb30a
commit 3af7bc1351
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 5 deletions

View File

@ -800,7 +800,7 @@ public class MColumn extends X_AD_Column implements ImmutablePOSupport
foreignTable = "AD_Org"; foreignTable = "AD_Org";
else if ("C_ProjectType_ID".equalsIgnoreCase(getColumnName())) else if ("C_ProjectType_ID".equalsIgnoreCase(getColumnName()))
foreignTable = "C_ProjectType"; foreignTable = "C_ProjectType";
} else if (DisplayType.isList(refid) || DisplayType.Payment == refid) { } else if (DisplayType.isList(refid)) {
foreignTable = "AD_Ref_List"; foreignTable = "AD_Ref_List";
} else if (DisplayType.Location == refid) { } else if (DisplayType.Location == refid) {
foreignTable = "C_Location"; foreignTable = "C_Location";
@ -941,7 +941,7 @@ public class MColumn extends X_AD_Column implements ImmutablePOSupport
if (!column.isKey() && !column.getColumnName().equals(PO.getUUIDColumnName(table.getTableName())) && !column.isVirtualColumn()) if (!column.isKey() && !column.getColumnName().equals(PO.getUUIDColumnName(table.getTableName())) && !column.isVirtualColumn())
{ {
int refid = column.getAD_Reference_ID(); int refid = column.getAD_Reference_ID();
if (!DisplayType.isList(refid) && refid != DisplayType.Payment) if (!DisplayType.isList(refid))
{ {
String referenceTableName = column.getReferenceTableName(); String referenceTableName = column.getReferenceTableName();
if (referenceTableName != null) if (referenceTableName != null)
@ -1153,7 +1153,7 @@ public class MColumn extends X_AD_Column implements ImmutablePOSupport
return ""; return "";
int refid = column.getAD_Reference_ID(); int refid = column.getAD_Reference_ID();
if (!DisplayType.isList(refid) && refid != DisplayType.Payment) if (!DisplayType.isList(refid))
{ {
String referenceTableName = column.getReferenceTableName(); String referenceTableName = column.getReferenceTableName();
if (referenceTableName != null) if (referenceTableName != null)

View File

@ -770,7 +770,8 @@ public class MLookupFactory
{ {
if (!ColumnName.endsWith("_ID")) if (!ColumnName.endsWith("_ID"))
{ {
s_log.log(Level.SEVERE, "Key does not end with '_ID': " + ColumnName); String error = "Key does not end with '_ID': " + ColumnName;
s_log.log(Level.SEVERE, error, new Exception(error));
return null; return null;
} }

View File

@ -373,7 +373,8 @@ public final class DisplayType
public static boolean isList(int displayType) public static boolean isList(int displayType)
{ {
if (DisplayType.List == displayType || DisplayType.RadiogroupList == displayType if (DisplayType.List == displayType || DisplayType.RadiogroupList == displayType
|| DisplayType.ChosenMultipleSelectionList == displayType) || DisplayType.ChosenMultipleSelectionList == displayType
|| DisplayType.Payment == displayType)
return true; return true;
IServiceReferenceHolder<IDisplayTypeFactory> cache = s_displayTypeFactoryCache.get(displayType); IServiceReferenceHolder<IDisplayTypeFactory> cache = s_displayTypeFactoryCache.get(displayType);