IDEMPIERE-5058 Pack In from a tenant print format just packed out throws cross tenant error because of Print Paper (#1008)
This commit is contained in:
parent
f96d3384e8
commit
444011ff64
|
@ -41,6 +41,7 @@ import org.compiere.model.X_AD_PrintFormat;
|
|||
import org.compiere.model.X_AD_PrintFormatItem;
|
||||
import org.compiere.print.MPrintFormat;
|
||||
import org.compiere.print.MPrintFormatItem;
|
||||
import org.compiere.print.MPrintPaper;
|
||||
import org.compiere.util.DB;
|
||||
import org.compiere.util.Env;
|
||||
import org.xml.sax.SAXException;
|
||||
|
@ -101,12 +102,15 @@ public class PrintFormatElementHandler extends AbstractElementHandler {
|
|||
|
||||
MPrintFormat m_Printformat = new MPrintFormat(ctx.ctx, AD_PrintFormat_ID, null);
|
||||
if (m_Printformat.getAD_PrintPaper_ID() > 0) {
|
||||
MPrintPaper pp = MPrintPaper.get(m_Printformat.getAD_PrintPaper_ID());
|
||||
if (pp.getAD_Client_ID() == m_Printformat.getAD_Client_ID()) {
|
||||
try {
|
||||
ctx.packOut.getHandler(I_AD_PrintPaper.Table_Name).packOut(ctx.packOut, document, ctx.logDocument, m_Printformat.getAD_PrintPaper_ID());
|
||||
} catch (Exception e) {
|
||||
throw new SAXException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (m_Printformat.getAD_Client_ID() == 0 && m_Printformat.getAD_Table_ID() > 0) {
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue