[ https://issues.apache.org/jira/browse/OFBIZ-7266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15352537#comment-15352537 ]
Kongrath Suankaewmanee commented on OFBIZ-7266: ----------------------------------------------- You can test on the product. Go to product and select one product to edit and then set "Sales Discontinuation Through Date", and this code to LookupProduct in {OFBiz Path}/applications/product/widget/catalog/LookupScreens.xml : {code:xml} <set field="conditionDates.filterByDate" value="true"/> <set field="conditionDates.fromDateName" value="salesDiscontinuationDate"/> <set field="conditionDates.thruDateName" value="salesDiscontinuationDate"/> {code} LookupProduct code will be look like this : {code:xml} <screen name="LookupProduct"> <section> <condition> <if-service-permission service-name="catalogPermissionCheck" main-action="VIEW"/> </condition> <actions> <property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/> <set field="title" value="${uiLabelMap.PageTitleLookupProduct}"/> <set field="queryString" from-field="result.queryString"/> <set field="entityName" value="Product"/> <set field="searchFields" value="[productId, internalName, brandName]"/> <set field="conditionDates.filterByDate" value="true"/> <set field="conditionDates.fromDateName" value="salesDiscontinuationDate"/> <set field="conditionDates.thruDateName" value="salesDiscontinuationDate"/> </actions> <widgets> <decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml"> <decorator-section name="search-options"> <include-form name="lookupProduct" location="component://product/widget/catalog/FieldLookupForms.xml"/> </decorator-section> <decorator-section name="search-results"> <include-form name="listLookupProduct" location="component://product/widget/catalog/FieldLookupForms.xml"/> </decorator-section> </decorator-screen> </widgets> </section> </screen> {code} then after you try to search product on lookup field, product should not show on auto-complete. > Auto-complete on lookup field should be able to support filter by date. > ----------------------------------------------------------------------- > > Key: OFBIZ-7266 > URL: https://issues.apache.org/jira/browse/OFBIZ-7266 > Project: OFBiz > Issue Type: Improvement > Components: ALL COMPONENTS > Affects Versions: Trunk > Reporter: Kongrath Suankaewmanee > Assignee: Nicolas Malin > Priority: Minor > Attachments: OFBIZ-7266-NMA.patch, OFBIZ-7266.patch > > > Hi, > For the general reason, if the lookup popup (like as performFind service > work) able to filter the result from date. so, in the auto complete for > lookup filed should be also able too. > Simple : > add this tag in action tag before call LookupDecorator > and filter on field "fromDate", "thruDate" as default. > {code:xml} > <set field="conditionDates.filterByDate" value="true"/> > {code} > Advance : > you can customize "fromDate" and "thruDate" field names by do follow below > {code:xml} > <set field="conditionDates.filterByDate" value="true"/> > <set field="conditionDates.fromDateName" value="startDate"/> > <set field="conditionDates.thruDateName" value="endDate"/> > {code} > Best Regards, > Kongrath -- This message was sent by Atlassian JIRA (v6.3.4#6332)