diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/CustomizeGridViewPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/CustomizeGridViewPanel.java index a902e0e7cb..a3cd5a5274 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/CustomizeGridViewPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/CustomizeGridViewPanel.java @@ -296,14 +296,20 @@ public class CustomizeGridViewPanel extends Panel { yesModel.removeAllElements(); noModel.removeAllElements(); - - String sql = "SELECT t.AD_Field_ID,t.Name,t.SeqNoGrid,AD_Client_ID, AD_Org_ID FROM AD_Field t WHERE t.AD_Tab_ID=? AND t.IsDisplayedGrid ='Y' ORDER BY 3,2"; + boolean baseLanguage = Env.isBaseLanguage(Env.getCtx(), "AD_Field"); + String sql; + if (baseLanguage) + sql = "SELECT t.AD_Field_ID,t.Name,t.SeqNoGrid,AD_Client_ID, AD_Org_ID FROM AD_Field t WHERE t.AD_Tab_ID=? AND t.IsDisplayedGrid ='Y' ORDER BY 3,2"; + else + sql = "SELECT t.AD_Field_ID,trl.Name,t.SeqNoGrid,t.AD_Client_ID, t.AD_Org_ID FROM AD_Field t , AD_Field_Trl trl " + + " WHERE t.AD_Tab_ID=? AND t.IsDisplayedGrid ='Y' AND (t.AD_Field_ID = trl.AD_Field_ID) AND trl.AD_Language=? ORDER BY 3,2"; PreparedStatement pstmt = null; ResultSet rs = null; try { pstmt = DB.prepareStatement(sql, null); pstmt.setInt(1, m_AD_Tab_ID); + pstmt.setString(2, Env.getAD_Language(Env.getCtx())); rs = pstmt.executeQuery(); HashMap curTabSel = new HashMap();