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
|
//document actions
|
||||||
if (docActionBtn != null) {
|
if (docActionBtn != null) {
|
||||||
IProcessButton processButton = (IProcessButton) docActionBtn.getAttribute(WButtonEditor.EDITOR_ATTRIBUTE);
|
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();
|
List<Listitem> actions = actionPanel.getDocActionItems();
|
||||||
if (actions.size() > 0) {
|
if (actions.size() > 0) {
|
||||||
if (this.getChildren().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 lblDocAction;
|
||||||
private Label label;
|
private Label label;
|
||||||
|
@ -93,6 +93,11 @@ public class WDocActionPanel extends Window implements EventListener<Event>, Dia
|
||||||
}
|
}
|
||||||
|
|
||||||
public WDocActionPanel(GridTab mgridTab)
|
public WDocActionPanel(GridTab mgridTab)
|
||||||
|
{
|
||||||
|
this(mgridTab, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public WDocActionPanel(GridTab mgridTab, boolean fromMenu)
|
||||||
{
|
{
|
||||||
gridTab = mgridTab;
|
gridTab = mgridTab;
|
||||||
DocStatus = (String)gridTab.getValue("DocStatus");
|
DocStatus = (String)gridTab.getValue("DocStatus");
|
||||||
|
@ -102,15 +107,16 @@ public class WDocActionPanel extends Window implements EventListener<Event>, Dia
|
||||||
|
|
||||||
readReference();
|
readReference();
|
||||||
initComponents();
|
initComponents();
|
||||||
dynInit();
|
dynInit(fromMenu);
|
||||||
|
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dynamic Init - determine valid DocActions based on DocStatus for the different documents.
|
* 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());
|
String wfStatus = MWFActivity.getActiveInfo(Env.getCtx(), m_AD_Table_ID, gridTab.getRecord_ID());
|
||||||
if (wfStatus != null)
|
if (wfStatus != null)
|
||||||
{
|
{
|
||||||
FDialog.error(gridTab.getWindowNo(), this, "WFActiveForRecord", wfStatus);
|
if (! fromMenu)
|
||||||
|
FDialog.error(gridTab.getWindowNo(), this, "WFActiveForRecord", wfStatus);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue