IDEMPIERE-2756 Background threads losing context when user log out / additional fix on development

This commit is contained in:
Carlos Ruiz 2015-08-07 10:25:18 -05:00
parent 839a5370dc
commit 966bcefc52
1 changed files with 2 additions and 2 deletions

View File

@ -269,14 +269,14 @@ public class Scheduler extends AdempiereServer
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 = "";
if (mailTemplate.is_new()){
mailContent = m_model.getDescription();
}else{
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
mailContent = mailTemplate.getMailText(true);
schedulerName = mailTemplate.getMailHeader();