IDEMPIERE-5077 Process (gear) button unusable when the workflow is suspended (#1031)
This commit is contained in:
parent
78296f9178
commit
83c4b16882
|
@ -60,7 +60,7 @@ public class ProcessButtonPopup extends Menupopup implements EventListener<Event
|
|||
//document actions
|
||||
if (docActionBtn != null) {
|
||||
IProcessButton processButton = (IProcessButton) docActionBtn.getAttribute(WButtonEditor.EDITOR_ATTRIBUTE);
|
||||
WDocActionPanel actionPanel = new WDocActionPanel(processButton.getADTabpanel().getGridTab());
|
||||
WDocActionPanel actionPanel = new WDocActionPanel(processButton.getADTabpanel().getGridTab(), true);
|
||||
List<Listitem> actions = actionPanel.getDocActionItems();
|
||||
if (actions.size() > 0) {
|
||||
if (this.getChildren().size() > 0)
|
||||
|
|
|
@ -69,7 +69,7 @@ public class WDocActionPanel extends Window implements EventListener<Event>, Dia
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -2166149559040327486L;
|
||||
private static final long serialVersionUID = -3218367479851088526L;
|
||||
|
||||
private Label lblDocAction;
|
||||
private Label label;
|
||||
|
@ -93,6 +93,11 @@ public class WDocActionPanel extends Window implements EventListener<Event>, Dia
|
|||
}
|
||||
|
||||
public WDocActionPanel(GridTab mgridTab)
|
||||
{
|
||||
this(mgridTab, false);
|
||||
}
|
||||
|
||||
public WDocActionPanel(GridTab mgridTab, boolean fromMenu)
|
||||
{
|
||||
gridTab = mgridTab;
|
||||
DocStatus = (String)gridTab.getValue("DocStatus");
|
||||
|
@ -102,15 +107,16 @@ public class WDocActionPanel extends Window implements EventListener<Event>, Dia
|
|||
|
||||
readReference();
|
||||
initComponents();
|
||||
dynInit();
|
||||
dynInit(fromMenu);
|
||||
|
||||
init();
|
||||
}
|
||||
|
||||
/**
|
||||
* Dynamic Init - determine valid DocActions based on DocStatus for the different documents.
|
||||
* @param fromMenu
|
||||
*/
|
||||
private void dynInit()
|
||||
private void dynInit(boolean fromMenu)
|
||||
{
|
||||
|
||||
//
|
||||
|
@ -149,7 +155,8 @@ public class WDocActionPanel extends Window implements EventListener<Event>, Dia
|
|||
String wfStatus = MWFActivity.getActiveInfo(Env.getCtx(), m_AD_Table_ID, gridTab.getRecord_ID());
|
||||
if (wfStatus != null)
|
||||
{
|
||||
FDialog.error(gridTab.getWindowNo(), this, "WFActiveForRecord", wfStatus);
|
||||
if (! fromMenu)
|
||||
FDialog.error(gridTab.getWindowNo(), this, "WFActiveForRecord", wfStatus);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue