IDEMPIERE-1026 Button on table to create automatically the window (#775)
* IDEMPIERE-1026 Button on table to create automatically the window Set relevant fields for translation tabs * Set better order by for translation tables * Minor performance fix found when testing this - the callout is visiting the database even on null column
This commit is contained in:
parent
0b3e307d86
commit
53ef632ecc
|
@ -31,6 +31,8 @@ public class Callout_AD_Column extends CalloutEngine
|
|||
{
|
||||
public String columnName (Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value)
|
||||
{ // IDEMPIERE-1011 - dup code on MColumn.setmartDefaults
|
||||
if (value == null)
|
||||
return "";
|
||||
I_AD_Column column = GridTabWrapper.create(mTab, I_AD_Column.class);
|
||||
if (MColumn.isSuggestSelectionColumn(column.getColumnName(), true))
|
||||
column.setIsSelectionColumn(true);
|
||||
|
|
|
@ -189,6 +189,13 @@ public class CreateWindowFromTable extends SvrProcess
|
|||
else
|
||||
tab.setOrderByClause(table.getTableName() + ".Created DESC");
|
||||
|
||||
if (table.getTableName().toLowerCase().endsWith("_trl")) {
|
||||
tab.setIsTranslationTab(true);
|
||||
tab.setIsInsertRecord(false);
|
||||
if (table.columnExistsInDB("AD_Language"))
|
||||
tab.setOrderByClause(table.getTableName() + ".AD_Language");
|
||||
}
|
||||
|
||||
tab.saveEx();
|
||||
addLog(tab.getAD_Tab_ID(), null, null, "@AD_Tab_ID@: " + tab.getName(),
|
||||
tab.get_Table_ID(), tab.getAD_Tab_ID());
|
||||
|
|
Loading…
Reference in New Issue