IDEMPIERE-3444: Zoom context menu do not work when user do not have access to sales window.

This commit is contained in:
Deepak Pansheriya 2017-08-03 20:03:59 +05:30
parent 0312ee82c0
commit fde822e318
1 changed files with 4 additions and 1 deletions

View File

@ -123,7 +123,10 @@ public class WEditorPopupMenu extends Menupopup implements EventListener<Event>
int winID = lookup.getZoom();
int winIDPO = lookup.getZoom(false) ;
Boolean canAccess = MRole.getDefault().getWindowAccess(winID);
if (winID <= 0 || canAccess == null) {
Boolean canAccessPO = null;
if (winIDPO > 0)
canAccessPO = MRole.getDefault().getWindowAccess(winIDPO);
if ((winID <= 0 || canAccess == null) && (canAccessPO == null || canAccessPO == false)) {
this.zoomEnabled = false;
this.newEnabled = false;
this.updateEnabled = false;