IDEMPIERE-3444: Zoom context menu do not work when user do not have access to sales window.
This commit is contained in:
parent
0312ee82c0
commit
fde822e318
|
@ -123,7 +123,10 @@ public class WEditorPopupMenu extends Menupopup implements EventListener<Event>
|
||||||
int winID = lookup.getZoom();
|
int winID = lookup.getZoom();
|
||||||
int winIDPO = lookup.getZoom(false) ;
|
int winIDPO = lookup.getZoom(false) ;
|
||||||
Boolean canAccess = MRole.getDefault().getWindowAccess(winID);
|
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.zoomEnabled = false;
|
||||||
this.newEnabled = false;
|
this.newEnabled = false;
|
||||||
this.updateEnabled = false;
|
this.updateEnabled = false;
|
||||||
|
|
Loading…
Reference in New Issue