Merge pull request #43 from globalqss/IDEMPIERE-3233

IDEMPIERE-3233:process dialog:deduce refresh tab when run a process
This commit is contained in:
hengsin 2020-05-09 14:15:19 +08:00 committed by GitHub
commit 4da87fa96b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 2 deletions

View File

@ -90,6 +90,7 @@ import org.compiere.model.GridWindow;
import org.compiere.model.GridWindowVO;
import org.compiere.model.I_M_Product;
import org.compiere.model.MImage;
import org.compiere.model.MPInstance;
import org.compiere.model.MProcess;
import org.compiere.model.MProjectIssue;
import org.compiere.model.MQuery;
@ -1193,9 +1194,16 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
}
else if (event.getTarget() instanceof ProcessModalDialog)
{
if (!DialogEvents.ON_WINDOW_CLOSE.equals(event.getName())){
return;
}
hideBusyMask();
ProcessModalDialog dialog = (ProcessModalDialog) event.getTarget();
onModalClose(dialog.getProcessInfo());
ProcessInfo pi = dialog.getProcessInfo();
onModalClose(pi);
String s = null;
boolean b = false;
ProcessInfoLog[] logs = null;
@ -1211,7 +1219,13 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
b = statusBar.getStatusError();
logs = statusBar.getPLogs();
}
onRefresh(true, false);
MPInstance instance = new MPInstance(ctx, pi.getAD_PInstance_ID(), "false");
if (!instance.isRunAsJob()){
// when run as job, don't expect see its effect when close parameter panel, so don't refresh
onRefresh(true, false);
}
if (getActiveGridTab().isQuickForm)
{
statusBarQF.setStatusLine(s, b, logs);