IDEMPIERE-4525 Translate MailText in Print Invoices to the corresponding BP Language (#356)
This commit is contained in:
parent
9c9efa41d4
commit
ed7a7dcbde
|
@ -288,6 +288,7 @@ public class InvoicePrint extends SvrProcess
|
|||
boolean printed = false;
|
||||
if (p_EMailPDF)
|
||||
{
|
||||
mText.setBPartner(C_BPartner_ID); // Context - Translation
|
||||
StringBuilder subject =new StringBuilder(mText.getMailHeader()).append(" - ").append(DocumentNo);
|
||||
EMail email = client.createEMail(to.getEMail(), subject.toString(), null);
|
||||
if (!email.isValid())
|
||||
|
@ -298,7 +299,6 @@ public class InvoicePrint extends SvrProcess
|
|||
continue;
|
||||
}
|
||||
mText.setUser(to); // Context
|
||||
mText.setBPartner(C_BPartner_ID); // Context
|
||||
mText.setPO(new MInvoice(getCtx(), C_Invoice_ID, get_TrxName()));
|
||||
String message = mText.getMailText(true);
|
||||
if (mText.isHtml())
|
||||
|
|
|
@ -89,7 +89,6 @@ public class MMailText extends X_R_MailText
|
|||
*/
|
||||
public String getMailText(boolean all)
|
||||
{
|
||||
if (m_MailText == null)
|
||||
translate();
|
||||
if (!all)
|
||||
return parse(m_MailText);
|
||||
|
@ -112,7 +111,6 @@ public class MMailText extends X_R_MailText
|
|||
*/
|
||||
public String getMailText()
|
||||
{
|
||||
if (m_MailText == null)
|
||||
translate();
|
||||
return parse (m_MailText);
|
||||
} // getMailText
|
||||
|
@ -123,7 +121,6 @@ public class MMailText extends X_R_MailText
|
|||
*/
|
||||
public String getMailText2()
|
||||
{
|
||||
if (m_MailText == null)
|
||||
translate();
|
||||
return parse (m_MailText2);
|
||||
} // getMailText2
|
||||
|
@ -134,7 +131,6 @@ public class MMailText extends X_R_MailText
|
|||
*/
|
||||
public String getMailText3()
|
||||
{
|
||||
if (m_MailText == null)
|
||||
translate();
|
||||
return parse (m_MailText3);
|
||||
} // getMailText3
|
||||
|
@ -145,7 +141,6 @@ public class MMailText extends X_R_MailText
|
|||
*/
|
||||
public String getMailHeader()
|
||||
{
|
||||
if (m_MailHeader == null)
|
||||
translate();
|
||||
return parse(m_MailHeader);
|
||||
} // getMailHeader
|
||||
|
|
|
@ -249,6 +249,7 @@ public class InvoicePrint extends SvrProcess
|
|||
boolean printed = false;
|
||||
if (p_EMailPDF)
|
||||
{
|
||||
mText.setBPartner(C_BPartner_ID); // Context - Translation
|
||||
String subject = mText.getMailHeader() + " - " + DocumentNo;
|
||||
EMail email = client.createEMail(to.getEMail(), subject, null);
|
||||
if (!email.isValid())
|
||||
|
@ -259,7 +260,6 @@ public class InvoicePrint extends SvrProcess
|
|||
continue;
|
||||
}
|
||||
mText.setUser(to); // Context
|
||||
mText.setBPartner(C_BPartner_ID); // Context
|
||||
mText.setPO(new MInvoice(getCtx(), C_Invoice_ID, get_TrxName()));
|
||||
String message = mText.getMailText(true);
|
||||
if (mText.isHtml())
|
||||
|
|
Loading…
Reference in New Issue