IDEMPIERE-4729: Fixing cross tenant error reported issue when submitting field suggestion (#622)

This commit is contained in:
Deepak Pansheriya 2021-03-10 17:18:43 +05:30 committed by GitHub
parent c7854316be
commit f8f17d5b85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -14,6 +14,7 @@ import org.adempiere.webui.component.Window;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.compiere.model.MField;
import org.compiere.model.MFieldSuggestion;
import org.compiere.model.PO;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.zkoss.zk.ui.event.Event;
@ -149,8 +150,12 @@ public class WFieldSuggestion extends Window implements EventListener<Event> {
suggestion.setIsApproved(false);
suggestion.setIsUpdateBaseLanguage(false);
suggestion.setProcessed(false);
suggestion.saveEx();
try {
PO.setCrossTenantSafe();
suggestion.saveEx();
}finally {
PO.clearCrossTenantSafe();
}
FDialog.info(0, this, Msg.getMsg(Env.getCtx(),"Your suggestions have been submitted for review"));
this.detach();
}