IDEMPIERE-2122 ShowAdress link only appears on some columns

This commit is contained in:
Nicolas Micoud 2014-10-22 10:17:38 -05:00
parent e6136d9a5d
commit 37cd70900d
1 changed files with 4 additions and 7 deletions

View File

@ -176,10 +176,10 @@ ContextMenuListener, IZoomableEditor
if (gridField != null) if (gridField != null)
{ {
String columnName = getColumnName(); String tableName_temp = lookup.getColumnName(); // Returns AD_Org.AD_Org_ID
if ((columnName.toUpperCase().equals("C_BPARTNER_LOCATION_ID")) int posPoint = tableName_temp.indexOf(".");
|| (columnName.toUpperCase().equals("BILL_LOCATION_ID")) String tableName = tableName_temp.substring(0, posPoint);
|| (columnName.toUpperCase().equals("DROPSHIP_LOCATION_ID"))) if (tableName.toUpperCase().equals("C_BPARTNER_LOCATION"))
{ {
popupMenu = new WEditorPopupMenu(true, true, isShowPreference(), false, false, true, lookup); popupMenu = new WEditorPopupMenu(true, true, isShowPreference(), false, false, true, lookup);
} else { } else {
@ -191,9 +191,6 @@ ContextMenuListener, IZoomableEditor
boolean isShortListAvailable = false; // Short List available for this lookup boolean isShortListAvailable = false; // Short List available for this lookup
if (lookup != null && (lookup.getDisplayType() == DisplayType.TableDir || lookup.getDisplayType() == DisplayType.Table)) // only for Table & TableDir if (lookup != null && (lookup.getDisplayType() == DisplayType.TableDir || lookup.getDisplayType() == DisplayType.Table)) // only for Table & TableDir
{ {
String tableName_temp = lookup.getColumnName(); // Returns AD_Org.AD_Org_ID
int posPoint = tableName_temp.indexOf(".");
String tableName = tableName_temp.substring(0, posPoint);
MTable table = MTable.get(Env.getCtx(), tableName); MTable table = MTable.get(Env.getCtx(), tableName);
isShortListAvailable = (table.getColumnIndex("IsShortList") >= 0); isShortListAvailable = (table.getColumnIndex("IsShortList") >= 0);
if (isShortListAvailable) if (isShortListAvailable)