IDEMPIERE-2281 Alert Processor and Scheduler ignoring Client Storage Provider Setup

This commit is contained in:
Carlos Ruiz 2014-11-05 10:02:26 -05:00
parent f0f7ea0f02
commit 545183280f
2 changed files with 3 additions and 1 deletions

View File

@ -149,7 +149,7 @@ public class MAttachment extends X_AD_Attachment
*/
private void initAttachmentStoreDetails(Properties ctx, String trxName)
{
MClientInfo clientInfo = MClientInfo.get(ctx);
MClientInfo clientInfo = MClientInfo.get(ctx, getAD_Client_ID());
provider=new MStorageProvider(ctx, clientInfo.getAD_StorageProvider_ID(), trxName);
}
@ -161,6 +161,7 @@ public class MAttachment extends X_AD_Attachment
public void setClientOrg(int AD_Client_ID, int AD_Org_ID)
{
super.setClientOrg(AD_Client_ID, AD_Org_ID);
initAttachmentStoreDetails(getCtx(), get_TrxName());
} // setClientOrg
/**

View File

@ -264,6 +264,7 @@ public class AlertProcessor extends AdempiereServer
note.saveEx();
// Attachment
MAttachment attachment = new MAttachment (getCtx(), MNote.Table_ID, note.getAD_Note_ID(), trx.getTrxName());
attachment.setClientOrg(m_model.getAD_Client_ID(), m_model.getAD_Org_ID());
for (File f : attachments) {
attachment.addEntry(f);
}