IDEMPIERE-3466 Workflow condition applied across all clients / thanks to Pritesh Shah

This commit is contained in:
Carlos Ruiz 2017-08-31 17:52:37 +02:00
parent 1bf66f1064
commit 53df432dc5
1 changed files with 3 additions and 2 deletions

View File

@ -25,6 +25,7 @@ import org.compiere.model.PO;
import org.compiere.model.Query; import org.compiere.model.Query;
import org.compiere.model.X_AD_WF_NodeNext; import org.compiere.model.X_AD_WF_NodeNext;
import org.compiere.process.DocAction; import org.compiere.process.DocAction;
import org.compiere.util.Env;
/** /**
* Workflow Node Next - Transition * Workflow Node Next - Transition
@ -127,9 +128,9 @@ public class MWFNodeNext extends X_AD_WF_NodeNext
if (!requery && m_conditions != null) if (!requery && m_conditions != null)
return m_conditions; return m_conditions;
// //
final String whereClause = MWFNextCondition.COLUMNNAME_AD_WF_NodeNext_ID+"=?"; final String whereClause = "AD_WF_NodeNext_ID=? AND AD_Client_ID IN (0,?)";
List<MWFNextCondition> list = new Query(getCtx(), MWFNextCondition.Table_Name, whereClause, get_TrxName()) List<MWFNextCondition> list = new Query(getCtx(), MWFNextCondition.Table_Name, whereClause, get_TrxName())
.setParameters(new Object[]{getAD_WF_NodeNext_ID()}) .setParameters(new Object[]{getAD_WF_NodeNext_ID(), Env.getAD_Client_ID(Env.getCtx())})
.setOnlyActiveRecords(true) .setOnlyActiveRecords(true)
.setOrderBy(MWFNextCondition.COLUMNNAME_SeqNo) .setOrderBy(MWFNextCondition.COLUMNNAME_SeqNo)
.list(); .list();