IDEMPIERE-4703 Cross tenant issue on sort tabs (#584)

This commit is contained in:
Carlos Ruiz 2021-02-14 03:06:59 +01:00 committed by GitHub
parent 51a081cbe7
commit ff88459dc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -421,6 +421,7 @@ public class ADSortTab extends Panel implements IADTabpanel
if (m_IdentifierTranslated)
sql.append(" AND t.").append(m_KeyColumnName).append("=tt.").append(m_KeyColumnName)
.append(" AND tt.AD_Language=?");
sql.append(" AND t.AD_Client_ID IN (0,?)");
// Order
sql.append(" ORDER BY ");
if (m_ColumnYesNoName != null)
@ -441,11 +442,14 @@ public class ADSortTab extends Panel implements IADTabpanel
ResultSet rs = null;
try
{
int idx = 1;
pstmt = DB.prepareStatement(sql.toString(), null);
pstmt.setInt(1, ID);
pstmt.setInt(idx++, ID);
if (m_IdentifierTranslated)
pstmt.setString(2, Env.getAD_Language(Env.getCtx()));
pstmt.setString(idx++, Env.getAD_Language(Env.getCtx()));
pstmt.setInt(idx++, Env.getAD_Client_ID(Env.getCtx()));
rs = pstmt.executeQuery();
while (rs.next())