IDEMPIERE-3233:process dialog:deduce refresh tab when run a process

This commit is contained in:
hieplq@hasuvimex.vn 2016-10-29 18:26:33 +07:00 committed by Carlos Ruiz
parent 9a74e18e40
commit 4fcd450ffd
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.GridWindowVO;
import org.compiere.model.I_M_Product; import org.compiere.model.I_M_Product;
import org.compiere.model.MImage; import org.compiere.model.MImage;
import org.compiere.model.MPInstance;
import org.compiere.model.MProcess; import org.compiere.model.MProcess;
import org.compiere.model.MProjectIssue; import org.compiere.model.MProjectIssue;
import org.compiere.model.MQuery; import org.compiere.model.MQuery;
@ -1193,9 +1194,16 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
} }
else if (event.getTarget() instanceof ProcessModalDialog) else if (event.getTarget() instanceof ProcessModalDialog)
{ {
if (!DialogEvents.ON_WINDOW_CLOSE.equals(event.getName())){
return;
}
hideBusyMask(); hideBusyMask();
ProcessModalDialog dialog = (ProcessModalDialog) event.getTarget(); ProcessModalDialog dialog = (ProcessModalDialog) event.getTarget();
onModalClose(dialog.getProcessInfo()); ProcessInfo pi = dialog.getProcessInfo();
onModalClose(pi);
String s = null; String s = null;
boolean b = false; boolean b = false;
ProcessInfoLog[] logs = null; ProcessInfoLog[] logs = null;
@ -1211,7 +1219,13 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
b = statusBar.getStatusError(); b = statusBar.getStatusError();
logs = statusBar.getPLogs(); 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) if (getActiveGridTab().isQuickForm)
{ {
statusBarQF.setStatusLine(s, b, logs); statusBarQF.setStatusLine(s, b, logs);