IDEMPIERE-3381 Transaction not pass to scheduled report.
This commit is contained in:
parent
37bafb5851
commit
f01e4cac14
|
@ -261,7 +261,7 @@ public class ServerReportCtl {
|
||||||
String TableName = MTable.getTableName(ctx, format.getAD_Table_ID());
|
String TableName = MTable.getTableName(ctx, format.getAD_Table_ID());
|
||||||
MQuery query = MQuery.get (ctx, pi.getAD_PInstance_ID(), TableName);
|
MQuery query = MQuery.get (ctx, pi.getAD_PInstance_ID(), TableName);
|
||||||
PrintInfo info = new PrintInfo(pi);
|
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())
|
if (pi.isPrintPreview() && pi.isBatch())
|
||||||
{
|
{
|
||||||
pi.setPDFReport(re.getPDF());
|
pi.setPDFReport(re.getPDF());
|
||||||
|
|
|
@ -169,6 +169,7 @@ public class Scheduler extends AdempiereServer
|
||||||
pi.setPrintPreview(true);
|
pi.setPrintPreview(true);
|
||||||
MUser from = new MUser(getCtx(), pi.getAD_User_ID(), null);
|
MUser from = new MUser(getCtx(), pi.getAD_User_ID(), null);
|
||||||
|
|
||||||
|
pi.setTransactionName(m_trx != null ? m_trx.getTrxName() : null);
|
||||||
ServerProcessCtl.process(pi, m_trx);
|
ServerProcessCtl.process(pi, m_trx);
|
||||||
if ( pi.isError() ) // note, this call close the transaction, don't use m_trx below
|
if ( pi.isError() ) // note, this call close the transaction, don't use m_trx below
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue