From 545183280f6c11c97fea74d90b99515057fad639 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 5 Nov 2014 10:02:26 -0500 Subject: [PATCH] IDEMPIERE-2281 Alert Processor and Scheduler ignoring Client Storage Provider Setup --- org.adempiere.base/src/org/compiere/model/MAttachment.java | 3 ++- .../src/main/server/org/compiere/server/AlertProcessor.java | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/org.adempiere.base/src/org/compiere/model/MAttachment.java b/org.adempiere.base/src/org/compiere/model/MAttachment.java index 8c73f28c87..be9526197e 100644 --- a/org.adempiere.base/src/org/compiere/model/MAttachment.java +++ b/org.adempiere.base/src/org/compiere/model/MAttachment.java @@ -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 /** diff --git a/org.adempiere.server/src/main/server/org/compiere/server/AlertProcessor.java b/org.adempiere.server/src/main/server/org/compiere/server/AlertProcessor.java index 94b6277ec5..e91090108b 100644 --- a/org.adempiere.server/src/main/server/org/compiere/server/AlertProcessor.java +++ b/org.adempiere.server/src/main/server/org/compiere/server/AlertProcessor.java @@ -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); }