IDEMPIERE-3998 Execute Toolbar Process / add info about parameter *RecordIDs* when using this new feature - for logging purposes

This commit is contained in:
Carlos Ruiz 2019-08-29 13:12:51 +02:00
parent 31c236e419
commit 56b1d98e27
1 changed files with 5 additions and 2 deletions

View File

@ -28,6 +28,7 @@ import org.adempiere.webui.session.SessionManager;
import org.compiere.apps.AbstractProcessCtl;
import org.compiere.apps.IProcessParameter;
import org.compiere.model.MPInstance;
import org.compiere.model.MPInstancePara;
import org.compiere.process.ProcessInfo;
import org.compiere.util.CLogger;
import org.compiere.util.DB;
@ -152,10 +153,10 @@ public class WProcessCtl extends AbstractProcessCtl {
*/
public static void process(IProcessUI aProcessUI, int WindowNo, IProcessParameter parameter, ProcessInfo pi, Trx trx)
{
if (log.isLoggable(Level.FINE)) log.fine("WindowNo=" + WindowNo + " - " + pi);
if (log.isLoggable(Level.FINE)) log.fine("WindowNo=" + WindowNo + " - " + pi);
MPInstance instance = null;
if (pi.getAD_PInstance_ID() < 1) { //red1 bypass if PInstance exists
MPInstance instance = null;
try
{
instance = new MPInstance(Env.getCtx(), pi.getAD_Process_ID(), pi.getRecord_ID());
@ -196,6 +197,8 @@ public class WProcessCtl extends AbstractProcessCtl {
if (pi.getRecord_IDs() != null && pi.getRecord_IDs().size() > 0)
{
DB.createT_Selection(pi.getAD_PInstance_ID(), pi.getRecord_IDs(), null);
MPInstancePara ip = instance.createParameter(-1, "*RecordIDs*", pi.getRecord_IDs().toString());
ip.saveEx();
}
// execute