IDEMPIERE-857 Partner Location field must not show quick entry options

This commit is contained in:
Richard Morales 2013-04-13 19:50:15 -05:00
parent de75287a15
commit 2261e10219
1 changed files with 6 additions and 2 deletions

View File

@ -122,6 +122,8 @@ public class WEditorPopupMenu extends Menupopup implements EventListener<Event>
this.newEnabled = false; this.newEnabled = false;
this.updateEnabled = false; this.updateEnabled = false;
} else { } else {
int posPoint = lookup.getColumnName().indexOf(".");
String tableName = lookup.getColumnName().substring(0, posPoint);
int cnt = DB.getSQLValueEx(null, int cnt = DB.getSQLValueEx(null,
"SELECT COUNT(*) " "SELECT COUNT(*) "
+ "FROM AD_Field f " + "FROM AD_Field f "
@ -130,8 +132,10 @@ public class WEditorPopupMenu extends Menupopup implements EventListener<Event>
+ "WHERE t.AD_Window_ID = ? " + "WHERE t.AD_Window_ID = ? "
+ " AND f.IsActive = 'Y' " + " AND f.IsActive = 'Y' "
+ " AND t.IsActive = 'Y' " + " AND t.IsActive = 'Y' "
+ " AND f.IsQuickEntry = 'Y' ", + " AND f.IsQuickEntry = 'Y' "
winID); + " AND (t.TabLevel = 0 "
+ " AND t.AD_Table_ID IN (SELECT AD_Table_ID FROM AD_Table WHERE TableName = ? )) ",
winID,tableName);
if (cnt > 0) { if (cnt > 0) {
this.newEnabled = true; this.newEnabled = true;
this.updateEnabled = true; this.updateEnabled = true;