diff --git a/org.adempiere.pipo/src/org/adempiere/pipo2/PackInHandler.java b/org.adempiere.pipo/src/org/adempiere/pipo2/PackInHandler.java index 90fcd01feb..50744f78c0 100644 --- a/org.adempiere.pipo/src/org/adempiere/pipo2/PackInHandler.java +++ b/org.adempiere.pipo/src/org/adempiere/pipo2/PackInHandler.java @@ -521,9 +521,12 @@ public class PackInHandler extends DefaultHandler { if (!isUpdateRoleAccess) return; - List roles = new Query(m_ctx.ctx, MRole.Table_Name, "IsManual='N'", m_ctx.trx.getTrxName()) + int AD_Client_ID=Env.getAD_Client_ID(Env.getCtx()); + + List roles = new Query(m_ctx.ctx, MRole.Table_Name, "IsManual='N' AND (?=0 OR AD_Client_ID=?)", m_ctx.trx.getTrxName()) .setOnlyActiveRecords(true) .setOrderBy("AD_Client_ID, Name") + .setParameters(AD_Client_ID, AD_Client_ID) .list(); for (MRole role : roles) { role.updateAccessRecords(false);