IDEMPIERE-655 No report without printformat window access / Correct wrong usage of == on objects

This commit is contained in:
Carlos Ruiz 2013-03-07 23:19:25 -05:00
parent 41398ec88c
commit 811111d257
3 changed files with 3 additions and 3 deletions

View File

@ -467,7 +467,7 @@ public class Viewer extends CFrame
}
// IDEMPIERE-297 - Check for Table Access and Window Access for New Report
if ( MRole.getDefault().isTableAccess(MPrintFormat.Table_ID, false)
&& (MRole.getDefault().getWindowAccess(WINDOW_PRINTFORMAT) == Boolean.TRUE))
&& (Boolean.TRUE.equals(MRole.getDefault().getWindowAccess(WINDOW_PRINTFORMAT))))
{
StringBuffer sb = new StringBuffer("** ").append(Msg.getMsg(m_ctx, "NewReport")).append(" **");
KeyNamePair pp = new KeyNamePair(-1, sb.toString());

View File

@ -404,7 +404,7 @@ public class ReportAction implements EventListener<Event>
log.log(Level.SEVERE, e.getLocalizedMessage(), e);
}
if (MRole.getDefault().isTableAccess(MPrintFormat.Table_ID, false) && MRole.getDefault().getWindowAccess(WINDOW_PRINTFORMAT) == Boolean.TRUE)
if (MRole.getDefault().isTableAccess(MPrintFormat.Table_ID, false) && Boolean.TRUE.equals(MRole.getDefault().getWindowAccess(WINDOW_PRINTFORMAT)))
{
StringBuffer sb = new StringBuffer("** ").append(Msg.getMsg(Env.getCtx(), "NewReport")).append(" **");
pp = new KeyNamePair(-1, sb.toString());

View File

@ -606,7 +606,7 @@ public class ZkReportViewer extends Window implements EventListener<Event>, ITab
}
// IDEMPIERE-297 - Check for Table Access and Window Access for New Report
if ( MRole.getDefault().isTableAccess(MPrintFormat.Table_ID, false)
&& MRole.getDefault().getWindowAccess(WINDOW_PRINTFORMAT) == Boolean.TRUE)
&& Boolean.TRUE.equals(MRole.getDefault().getWindowAccess(WINDOW_PRINTFORMAT)))
{
StringBuffer sb = new StringBuffer("** ").append(Msg.getMsg(Env.getCtx(), "NewReport")).append(" **");
KeyNamePair pp = new KeyNamePair(-1, sb.toString());