IDEMPIERE-2026:when role have limit access to a user, can't select any bpartner have no contact

This commit is contained in:
hieplq 2014-06-29 13:10:58 +07:00
parent 5e9593740c
commit 520d4802e5
1 changed files with 5 additions and 4 deletions

View File

@ -2368,9 +2368,10 @@ public final class MRole extends X_AD_Role
// NOT IN (x) // NOT IN (x)
if (m_recordAccess[i].isExclude()) if (m_recordAccess[i].isExclude())
{ {
if (sbExclude.length() == 0) if (sbExclude.length() == 0){
sbExclude.append(keyColumnName) sbExclude.append("(").append(keyColumnName).append(" IS NULL OR ");
.append(" NOT IN ("); sbExclude.append(keyColumnName).append(" NOT IN (");
}
else else
sbExclude.append(","); sbExclude.append(",");
sbExclude.append(m_recordAccess[i].getRecord_ID()); sbExclude.append(m_recordAccess[i].getRecord_ID());
@ -2390,7 +2391,7 @@ public final class MRole extends X_AD_Role
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
if (sbExclude.length() > 0) if (sbExclude.length() > 0)
sb.append(sbExclude).append(")"); sb.append(sbExclude).append("))");
if (sbInclude.length() > 0) if (sbInclude.length() > 0)
{ {
if (sb.length() > 0) if (sb.length() > 0)