diff --git a/client/src/org/compiere/apps/search/Find.java b/client/src/org/compiere/apps/search/Find.java index 250b1d75de..eca4db3fba 100644 --- a/client/src/org/compiere/apps/search/Find.java +++ b/client/src/org/compiere/apps/search/Find.java @@ -209,6 +209,9 @@ public final class Find extends CDialog public static final int FIELDLENGTH = 20; /** Reference ID for Yes/No */ public static final int AD_REFERENCE_ID_YESNO = 319; + /** Reference ID for Posted */ + public static final int AD_REFERENCE_ID_POSTED = 234; + // private CPanel southPanel = new CPanel(); @@ -488,6 +491,27 @@ public final class Find extends CDialog mField = ynfield; } + // Make Posted searchable + if ( mField.getVO().displayType == DisplayType.Button && "Posted".equals(mField.getColumnName()) ) + { + GridFieldVO vo = mField.getVO(); + GridFieldVO postedvo = vo.clone(vo.ctx, vo.WindowNo, vo.TabNo, vo.AD_Window_ID, vo.AD_Tab_ID, vo.tabReadOnly); + postedvo.IsDisplayed = true; + postedvo.displayType = DisplayType.List; + postedvo.AD_Reference_Value_ID = AD_REFERENCE_ID_POSTED; + + postedvo.lookupInfo = MLookupFactory.getLookupInfo (postedvo.ctx, postedvo.WindowNo, postedvo.AD_Column_ID, postedvo.displayType, + Env.getLanguage(postedvo.ctx), postedvo.ColumnName, postedvo.AD_Reference_Value_ID, + postedvo.IsParent, postedvo.ValidationCode); + postedvo.lookupInfo.InfoFactoryClass = postedvo.InfoFactoryClass; + + GridField postedfield = new GridField(postedvo); + + // replace the original field by the Posted List field + m_findFields[i] = postedfield; + mField = postedfield; + } + if (columnName.equals("Value")) hasValue = true; else if (columnName.equals("Name"))