diff --git a/org.adempiere.base.callout/src/org/compiere/model/Callout_AD_Column.java b/org.adempiere.base.callout/src/org/compiere/model/Callout_AD_Column.java index c2da07bb6a..c69d0fa698 100644 --- a/org.adempiere.base.callout/src/org/compiere/model/Callout_AD_Column.java +++ b/org.adempiere.base.callout/src/org/compiere/model/Callout_AD_Column.java @@ -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); diff --git a/org.adempiere.base.process/src/org/compiere/process/CreateWindowFromTable.java b/org.adempiere.base.process/src/org/compiere/process/CreateWindowFromTable.java index ca603d8c1d..ca6628ea84 100644 --- a/org.adempiere.base.process/src/org/compiere/process/CreateWindowFromTable.java +++ b/org.adempiere.base.process/src/org/compiere/process/CreateWindowFromTable.java @@ -180,7 +180,7 @@ public class CreateWindowFromTable extends SvrProcess tab.setAD_Table_ID(p_AD_Table_ID); tab.setTabLevel(p_TabLevel); tab.setIsSingleRow(true); //Default - + //Set order by if (table.columnExistsInDB("Value")) tab.setOrderByClause(table.getTableName() + ".Value"); @@ -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());