IDEMPIERE-2756 Background threads losing context when user log out / additional fix on development
This commit is contained in:
parent
839a5370dc
commit
966bcefc52
|
@ -269,14 +269,14 @@ public class Scheduler extends AdempiereServer
|
||||||
|
|
||||||
if (email)
|
if (email)
|
||||||
{
|
{
|
||||||
MMailText mailTemplate = new MMailText(m_schedulerctx, m_model.getR_MailText_ID(), null);
|
MMailText mailTemplate = new MMailText(getCtx(), m_model.getR_MailText_ID(), null);
|
||||||
String mailContent = "";
|
String mailContent = "";
|
||||||
|
|
||||||
if (mailTemplate.is_new()){
|
if (mailTemplate.is_new()){
|
||||||
mailContent = m_model.getDescription();
|
mailContent = m_model.getDescription();
|
||||||
}else{
|
}else{
|
||||||
mailTemplate.setUser(user);
|
mailTemplate.setUser(user);
|
||||||
mailTemplate.setLanguage(Env.getContext(m_schedulerctx, "#AD_Language"));
|
mailTemplate.setLanguage(Env.getContext(getCtx(), "#AD_Language"));
|
||||||
// if user has bpartner link. maybe use language depend user
|
// if user has bpartner link. maybe use language depend user
|
||||||
mailContent = mailTemplate.getMailText(true);
|
mailContent = mailTemplate.getMailText(true);
|
||||||
schedulerName = mailTemplate.getMailHeader();
|
schedulerName = mailTemplate.getMailHeader();
|
||||||
|
|
Loading…
Reference in New Issue