IDEMPIERE-4632 Print Invoices is not translating the invoice if the r… (#512)

* IDEMPIERE-4632 Print Invoices is not translating the invoice if the report is a Jasper Report

* IDEMPIERE-4632 Print Invoices is not translating the invoice if the report is a Jasper Report
This commit is contained in:
Diego Ruiz 2021-01-06 17:13:08 +01:00 committed by GitHub
parent 2cfb699c6f
commit 1d40ac7d6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -93,6 +93,7 @@ import org.compiere.model.PrintInfo;
import org.compiere.print.layout.LayoutEngine;
import org.compiere.print.layout.PrintDataEvaluatee;
import org.compiere.process.ProcessInfo;
import org.compiere.process.ProcessInfoParameter;
import org.compiere.process.ServerProcessCtl;
import org.compiere.util.CLogger;
import org.compiere.util.DB;
@ -1394,6 +1395,10 @@ queued-job-count = 0 (class javax.print.attribute.standard.QueuedJobCount)
{
if (m_printFormat != null && m_printFormat.getJasperProcess_ID() > 0) {
ProcessInfo pi = new ProcessInfo ("", m_printFormat.getJasperProcess_ID(), m_printFormat.getAD_Table_ID(), m_info.getRecord_ID());
if (m_printFormat.getLanguage() != null && m_printFormat.getLanguage().getAD_Language() != null) {
ProcessInfoParameter reportLanguagePip = new ProcessInfoParameter("AD_Language", m_printFormat.getLanguage().getAD_Language(), null, null, null);
pi.setParameter(new ProcessInfoParameter[] {reportLanguagePip});
}
pi.setIsBatch(true);
pi.setPDFFileName(fileName);
ServerProcessCtl.process(pi, (m_trxName == null ? null : Trx.get(m_trxName, false)));