IDEMPIERE-3381 Transaction not pass to scheduled report.

This commit is contained in:
Heng Sin Low 2017-05-31 07:55:29 +08:00
parent 37bafb5851
commit f01e4cac14
2 changed files with 2 additions and 1 deletions

View File

@ -261,7 +261,7 @@ public class ServerReportCtl {
String TableName = MTable.getTableName(ctx, format.getAD_Table_ID());
MQuery query = MQuery.get (ctx, pi.getAD_PInstance_ID(), TableName);
PrintInfo info = new PrintInfo(pi);
re = new ReportEngine(ctx, format, query, info);
re = new ReportEngine(ctx, format, query, info, pi.getTransactionName());
if (pi.isPrintPreview() && pi.isBatch())
{
pi.setPDFReport(re.getPDF());

View File

@ -169,6 +169,7 @@ public class Scheduler extends AdempiereServer
pi.setPrintPreview(true);
MUser from = new MUser(getCtx(), pi.getAD_User_ID(), null);
pi.setTransactionName(m_trx != null ? m_trx.getTrxName() : null);
ServerProcessCtl.process(pi, m_trx);
if ( pi.isError() ) // note, this call close the transaction, don't use m_trx below
{