diff --git a/base/src/org/compiere/model/GridTab.java b/base/src/org/compiere/model/GridTab.java index 14d71ebdde..18dcdea0c8 100644 --- a/base/src/org/compiere/model/GridTab.java +++ b/base/src/org/compiere/model/GridTab.java @@ -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 diff --git a/dbPort/src/org/compiere/model/MRole.java b/dbPort/src/org/compiere/model/MRole.java index 257fdcbd02..c9dd5760f7 100644 --- a/dbPort/src/org/compiere/model/MRole.java +++ b/dbPort/src/org/compiere/model/MRole.java @@ -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++) {