* Bug [ 1662433 ] Error in window process audit, log tab

This commit is contained in:
Carlos Ruiz 2007-03-26 05:12:57 +00:00
parent 52bbbc307f
commit 1be2c0f910
2 changed files with 47 additions and 41 deletions

View File

@ -311,34 +311,36 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
}
} // for all fields
// Add Standard Fields
if (m_mTable.getField("Created") == null)
{
GridField created = new GridField (GridFieldVO.createStdField(m_vo.ctx,
m_vo.WindowNo, m_vo.TabNo,
m_vo.AD_Window_ID, m_vo.AD_Tab_ID, false, true, true));
m_mTable.addField(created);
}
if (m_mTable.getField("CreatedBy") == null)
{
GridField createdBy = new GridField (GridFieldVO.createStdField(m_vo.ctx,
m_vo.WindowNo, m_vo.TabNo,
m_vo.AD_Window_ID, m_vo.AD_Tab_ID, false, true, false));
m_mTable.addField(createdBy);
}
if (m_mTable.getField("Updated") == null)
{
GridField updated = new GridField (GridFieldVO.createStdField(m_vo.ctx,
m_vo.WindowNo, m_vo.TabNo,
m_vo.AD_Window_ID, m_vo.AD_Tab_ID, false, false, true));
m_mTable.addField(updated);
}
if (m_mTable.getField("UpdatedBy") == null)
{
GridField updatedBy = new GridField (GridFieldVO.createStdField(m_vo.ctx,
m_vo.WindowNo, m_vo.TabNo,
m_vo.AD_Window_ID, m_vo.AD_Tab_ID, false, false, false));
m_mTable.addField(updatedBy);
if (! m_mTable.getTableName().equals(X_AD_PInstance_Log.Table_Name)) { // globalqss, bug 1662433
// Add Standard Fields
if (m_mTable.getField("Created") == null)
{
GridField created = new GridField (GridFieldVO.createStdField(m_vo.ctx,
m_vo.WindowNo, m_vo.TabNo,
m_vo.AD_Window_ID, m_vo.AD_Tab_ID, false, true, true));
m_mTable.addField(created);
}
if (m_mTable.getField("CreatedBy") == null)
{
GridField createdBy = new GridField (GridFieldVO.createStdField(m_vo.ctx,
m_vo.WindowNo, m_vo.TabNo,
m_vo.AD_Window_ID, m_vo.AD_Tab_ID, false, true, false));
m_mTable.addField(createdBy);
}
if (m_mTable.getField("Updated") == null)
{
GridField updated = new GridField (GridFieldVO.createStdField(m_vo.ctx,
m_vo.WindowNo, m_vo.TabNo,
m_vo.AD_Window_ID, m_vo.AD_Tab_ID, false, false, true));
m_mTable.addField(updated);
}
if (m_mTable.getField("UpdatedBy") == null)
{
GridField updatedBy = new GridField (GridFieldVO.createStdField(m_vo.ctx,
m_vo.WindowNo, m_vo.TabNo,
m_vo.AD_Window_ID, m_vo.AD_Tab_ID, false, false, false));
m_mTable.addField(updatedBy);
}
}
return true;
} // loadFields

View File

@ -1674,20 +1674,24 @@ public final class MRole extends X_AD_Role
tableName = TableNameIn;
}
// Client Access
if (fullyQualified)
retSQL.append(tableName).append(".");
retSQL.append(getClientWhere(rw));
// Org Access
if (!isAccessAllOrgs())
{
retSQL.append(" AND ");
if (fullyQualified)
retSQL.append(tableName).append(".");
retSQL.append(getOrgWhere(rw));
if (! tableName.equals(X_AD_PInstance_Log.Table_Name)) { // globalqss, bug 1662433
// Client Access
if (fullyQualified)
retSQL.append(tableName).append(".");
retSQL.append(getClientWhere(rw));
// Org Access
if (!isAccessAllOrgs())
{
retSQL.append(" AND ");
if (fullyQualified)
retSQL.append(tableName).append(".");
retSQL.append(getOrgWhere(rw));
}
} else {
retSQL.append("1=1");
}
// ** Data Access **
for (int i = 0; i < ti.length; i++)
{