ilscipio/scipio-erp

View on GitHub
applications/product/widget/catalog/FieldLookupForms.xml

Summary

Maintainability
Test Coverage
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is subject to the terms and conditions defined in the
files 'LICENSE' and 'NOTICE', which are part of this source
code package.
-->

<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd">
    <form name="lookupProduct" target="LookupProduct" title="" type="single"
        header-row-style="header-row"> <!-- orig: default-table-style=-style="basic-table" -->
        <!-- <auto-fields-entity entity-name="Product" default-field-type="hidden"/> -->
        <field name="productId" title="${uiLabelMap.ProductProductId}"><text-find/></field>
        <field name="brandName" title="${uiLabelMap.ProductBrandName}"><text-find/></field>
        <field name="internalName" title="${uiLabelMap.ProductInternalName}"><text-find/></field>
        <field name="productTypeId" title="${uiLabelMap.ProductProductType}">
            <drop-down allow-empty="true">
                <entity-options entity-name="ProductType" description="${description}">
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="primaryProductCategoryId" title="${uiLabelMap.ProductPrimaryCategory}">
            <drop-down allow-empty="true">
                <entity-options description="${description}" entity-name="ProductCategory" key-field-name="productCategoryId">
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="noConditionFind"><hidden value="Y"/><!-- if this isn't there then with all fields empty no query will be done --></field>
        <!-- NOTE DEJ20070829 not sure why this is here, but it doesn't seem applicable for a general product lookup, also doesn't handle case where isVariant is null <field name="isVariant"><hidden value="N"/></field> -->
        <field name="submitAction" title="${uiLabelMap.CommonFind}" widget-style="${styles.link_run_sys} ${styles.action_find}"><submit button-type="button"/></field>
    </form>
    <form name="listLookupProduct" list-name="listIt" title="" type="list" paginate-target="LookupProduct"
        odd-row-style="alternate-row" view-size="20"> <!-- orig: default-table-style=-style="basic-table" -->
        <actions>
            <service service-name="performFind" result-map="result" result-map-list="listIt">
                <field-map field-name="inputFields" from-field="parameters"/>
                <field-map field-name="entityName" value="Product"/>
                <field-map field-name="viewIndex" from-field="viewIndex"/>
                <field-map field-name="viewSize" from-field="viewSize"/>
            </service>
            
        </actions>
        <row-actions>            
            <set field="hasVariants" value="${groovy: org.ofbiz.entity.util.EntityUtil.filterByDate(delegator.findByAnd('ProductAssoc', org.ofbiz.base.util.UtilMisc.toMap('productId', productId, 'productAssocTypeId', 'PRODUCT_VARIANT'), null, true)).size() > 0}" type="Boolean"/>
        </row-actions>
        <field name="productId" title="${uiLabelMap.ProductProductId}" widget-style="${styles.link_nav_info_id}">
            <hyperlink also-hidden="false" target-type="plain" description="${productId}" target="javascript:set_value('${productId}')"/>
        </field>
        <field name="brandName" title="${uiLabelMap.ProductBrandName}"><display/></field>
        <field name="internalName" title="${uiLabelMap.ProductInternalName}"><display/></field>
        <field name="productTypeId" title="${uiLabelMap.ProductProductType}"><display-entity entity-name="ProductType"/></field>
        <field name="searchAction" title=" " widget-style="${styles.link_nav} ${styles.action_find}" use-when="hasVariants">
            <hyperlink also-hidden="false" target-type="plain" description="${uiLabelMap.ProductVariants}" target="LookupVariantProduct">
                <parameter param-name="productId"/>
            </hyperlink>
        </field>
    </form>
    <form name="lookupSupplierProduct" target="LookupSupplierProduct" title="" type="single"
        header-row-style="header-row"> <!-- orig: default-table-style=-style="basic-table" -->
        <field name="partyId"><hidden/></field>
        <field name="productId" title="${uiLabelMap.ProductProductId}"><text-find/></field>
        <field name="brandName" title="${uiLabelMap.ProductBrandName}"><text-find/></field>
        <field name="internalName" title="${uiLabelMap.ProductInternalName}"><text-find/></field>
        <field name="productTypeId" title="${uiLabelMap.ProductProductType}">
            <drop-down allow-empty="true">
                <entity-options entity-name="ProductType" description="${description}">
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="submitAction" title="${uiLabelMap.CommonFind}" widget-style="${styles.link_run_sys} ${styles.action_find}"><submit button-type="button"/></field>
    </form>
    <form name="listLookupSupplierProduct" list-name="listIt" title="" type="list" paginate-target="LookupSupplierProduct"
        odd-row-style="alternate-row" view-size="20"> <!-- orig: default-table-style=-style="basic-table" -->
        <actions>
            <set field="fieldList" value="${groovy:['productId','partyId','lastPrice','shippingPrice','currencyUomId','supplierProductName','supplierProductId','canDropShip']}" type="List"/>
            <service service-name="performFind" result-map="result" result-map-list="listIt">
                <field-map field-name="inputFields" from-field="parameters"/>
                <field-map field-name="entityName" value="SupplierProductAndProduct"/>
                <field-map field-name="orderBy" value="productId"/>
                <field-map field-name="viewIndex" from-field="viewIndex"/>
                <field-map field-name="viewSize" from-field="viewSize"/>
                <field-map field-name="distinct" from-field="searchDistinct"/><!-- SCIPIO -->
            </service>
        </actions>
        <field name="productId" title="${uiLabelMap.ProductProductId}" widget-style="${styles.link_nav_info_id}">
            <hyperlink also-hidden="false" target-type="plain" description="${productId}" target="javascript:set_value('${productId}')"/>
        </field>
        <field name="brandName" title="${uiLabelMap.ProductBrandName}"><display/></field>
        <field name="internalName" title="${uiLabelMap.ProductInternalName}"><display/></field>
        <field name="productTypeId" title="${uiLabelMap.ProductProductType}"><display-entity entity-name="ProductType"/></field>
        <field name="supplierProductId"><display/></field>
        <field name="minimumOrderQuantity"><display/></field>
    </form>

    <form name="lookupVirtualProduct" extends="lookupProduct" default-map-name= "inputFields" target="LookupVirtualProduct" title="" type="single"
        header-row-style="header-row"> <!-- orig: default-table-style=-style="basic-table" -->
        <field name="isVirtual"><hidden value="Y"/></field>
    </form>
    <form name="listLookupVirtualProduct" list-name="listIt" title="" type="list" extends="listLookupProduct"
        paginate-target="LookupVirtualProduct" odd-row-style="alternate-row" view-size="20"> <!-- orig: default-table-style=-style="basic-table" -->
        <actions>
            <service service-name="performFind" result-map="result" result-map-list="listIt">
                <field-map field-name="inputFields" from-field="parameters"/>
                <field-map field-name="entityName" value="Product"/>
                <field-map field-name="viewIndex" from-field="viewIndex"/>
                <field-map field-name="viewSize" from-field="viewSize"/>
            </service>
        </actions>
        <field name="productId" title="${uiLabelMap.ProductProductId}" widget-style="${styles.link_nav_info_id}">
            <hyperlink also-hidden="false" target-type="plain" description="${productId}" target="javascript:set_value('${productId}')"/>
        </field>
        <field name="brandName" title="${uiLabelMap.ProductBrandName}"><display/></field>
        <field name="internalName" title="${uiLabelMap.ProductInternalName}"><display/></field>
        <field name="productTypeId" title="${uiLabelMap.ProductProductType}"><display-entity entity-name="ProductType"/></field>
    </form>

    <form name="lookupProductAndPrice" target="LookupProductAndPrice" title="" type="single"
        header-row-style="header-row"> <!-- orig: default-table-style=-style="basic-table" -->
        <!-- <auto-fields-entity entity-name="Product" default-field-type="hidden"/> -->
        <field name="productId" title="${uiLabelMap.ProductProductId}"><text-find/></field>
        <field name="internalName" title="${uiLabelMap.ProductInternalName}"><text-find/></field>
        <field name="productTypeId" title="${uiLabelMap.ProductProductType}">
            <drop-down allow-empty="true">
                <entity-options entity-name="ProductType" description="${description}">
                    <entity-order-by field-name="description"/>
                </entity-options>
             </drop-down>
        </field>
        <field name="description" title="${uiLabelMap.CommonDescription}"><text-find/></field>
        <field name="primaryProductCategoryId">
            <drop-down allow-empty="true">
                <entity-options description="${description}" entity-name="ProductCategory" key-field-name="productCategoryId">
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="currencyUomId" title="${uiLabelMap.CommonCurrency}">
            <drop-down allow-empty="false" no-current-selected-key="${defaultCurrencyUomId}">
                <entity-options key-field-name="uomId" description="${description} - ${abbreviation}" entity-name="Uom">
                    <entity-constraint name="uomTypeId" operator="equals" value="CURRENCY_MEASURE"/>
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="productPriceTypeId" title="${uiLabelMap.ProductPriceType}">
            <drop-down allow-empty="false" no-current-selected-key="DEFAULT_PRICE">
                <entity-options description="${description}" entity-name="ProductPriceType" key-field-name="productPriceTypeId">
                </entity-options>
            </drop-down>
        </field>
        <field name="productPricePurposeId">
            <drop-down allow-empty="false" no-current-selected-key="PURCHASE">
                <entity-options description="${description}" entity-name="ProductPricePurpose" key-field-name="productPricePurposeId">
                </entity-options>
            </drop-down>
        </field>
        <field name="price" title="${uiLabelMap.ProductPrice}"><range-find/></field>

        <field name="noConditionFind"><hidden value="Y"/><!-- if this isn't there then with all fields empty no query will be done --></field>
        <field name="filterByDate"><hidden value="Y"/></field>
        <field name="submitAction" title="${uiLabelMap.CommonFind}" widget-style="${styles.link_run_sys} ${styles.action_find}"><submit button-type="button"/></field>
    </form>
    <form name="listLookupProductAndPrice" list-name="listIt" title="" type="list"
        paginate-target="LookupProductAndPrice" odd-row-style="alternate-row" view-size="20"> <!-- orig: default-table-style=-style="basic-table" -->
        <actions>
            <service service-name="performFind" result-map="result" result-map-list="listIt">
                <field-map field-name="inputFields" from-field="parameters"/>
                <field-map field-name="entityName" value="ProductAndPriceView"/>
                <field-map field-name="orderBy" value="productId"/>
                <field-map field-name="viewIndex" from-field="viewIndex"/>
                <field-map field-name="viewSize" from-field="viewSize"/>
            </service>
        </actions>
        <row-actions>            
            <set field="hasVariants" value="${groovy: delegator.findByAnd('ProductAssoc', org.ofbiz.base.util.UtilMisc.toMap('productId', productId, 'productAssocTypeId', 'PRODUCT_VARIANT'), null, true).size() > 0}" type="Boolean"/>
        </row-actions>
        <!--
        <field name="productId" title=" " widget-style="${styles.link_nav_info_id}" use-when="isVirtual==null||&quot;${isVirtual}&quot;.equals(&quot;N&quot;)">
            <hyperlink also-hidden="false" target-type="plain" description="${productId}" target="javascript:set_value('${productId}')"/>
        </field>
        <field name="productId" title="${uiLabelMap.ProductProductId}" use-when="isVirtual!=null&amp;&amp;&quot;${isVirtual}&quot;.equals(&quot;Y&quot;)"><display/></field>
        -->
        <field name="productId" widget-style="${styles.link_nav_info_id}">
            <hyperlink also-hidden="false" target-type="plain" description="${productId}" target="javascript:set_value('${productId}')"/>
        </field>
        <field name="internalName" title="${uiLabelMap.ProductInternalName}"><display/></field>
        <field name="productTypeId" title="${uiLabelMap.ProductProductType}"><display-entity entity-name="ProductType"/></field>
        <field name="currencyUomId" title="${uiLabelMap.CommonCurrency}"><display/></field>
        <field name="price" title="${uiLabelMap.ProductPrice}"><display/></field>
        <field name="fromDate" title="${uiLabelMap.CommonFrom}"><display/></field>
        <field name="thruDate" title="${uiLabelMap.CommonThru}"><display/></field>
        <field name="searchAction" title=" " widget-style="${styles.link_nav} ${styles.action_find}" use-when="hasVariants">
            <hyperlink also-hidden="false" target-type="plain" description="${uiLabelMap.ProductVariants}" target="LookupVariantProduct">
                <parameter param-name="productId"/>
            </hyperlink>
        </field>
    </form>

    <form name="lookupProductCategory" target="LookupProductCategory" title="" type="single"
        header-row-style="header-row"> <!-- orig: default-table-style=-style="basic-table" -->
        <auto-fields-entity entity-name="ProductCategory" default-field-type="find"/>
        <field name="productCategoryTypeId">
            <drop-down allow-empty="true">
                <entity-options description="${description}" entity-name="ProductCategoryType">
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="showInSelect">
            <drop-down allow-empty="true">
                <option key="Y" description="${uiLabelMap.CommonYes}"/>
                <option key="N" description="${uiLabelMap.CommonNo}"/>
            </drop-down>
        </field>
        <field name="noConditionFind"><hidden value="Y"/><!-- if this isn't there then with all fields empty no query will be done --></field>
        <field name="submitAction" title="${uiLabelMap.CommonFind}" widget-style="${styles.link_run_sys} ${styles.action_find}"><submit button-type="button"/></field>

        <sort-order>
            <field-group>
                <sort-field name="productCategoryId"/>
                <sort-field name="categoryName"/>
            </field-group>
            <field-group title="${uiLabelMap.CommonAdvancedSearch}" collapsible="true" initially-collapsed="true">
                <sort-field name="productCategoryTypeId"/>
                <sort-field name="primaryParentCategoryId"/>
                <sort-field name="description"/>
                <sort-field name="longDescription"/>
                <sort-field name="showInSelect"/>
                <sort-field name="categoryImageUrl"/>
                <sort-field name="linkOneImageUrl"/>
                <sort-field name="linkTwoImageUrl"/>
                <sort-field name="detailScreen"/>
            </field-group>
        </sort-order>
    </form>
    <form name="listLookupProductCategory" list-name="listIt" title="" type="list"
        paginate-target="LookupProductCategory" odd-row-style="alternate-row" view-size="20"> <!-- orig: default-table-style=-style="basic-table" -->
        <actions>
            <service service-name="performFind" result-map="result" result-map-list="listIt">
                <field-map field-name="inputFields" from-field="parameters"/>
                <field-map field-name="entityName" value="ProductCategory"/>
                <field-map field-name="viewIndex" from-field="viewIndex"/>
                <field-map field-name="viewSize" from-field="viewSize"/>
            </service>
        </actions>
        <auto-fields-entity entity-name="ProductCategory" default-field-type="display"/>
        <field name="productCategoryTypeId"><display-entity entity-name="ProductCategoryType"/></field>
        <field name="productCategoryId" title=" " widget-style="${styles.link_nav_info_id}">
            <hyperlink also-hidden="false" target-type="plain" description="${productCategoryId}" target="javascript:set_value('${productCategoryId}')"/>
        </field>
        <field name="longDescription"><ignored/></field>
        <field name="categoryImageUrl"><ignored/></field>
        <field name="linkOneImageUrl"><ignored/></field>
        <field name="linkTwoImageUrl"><ignored/></field>
        <field name="detailScreen"><ignored/></field>
    </form>

    <form name="lookupProductFeature" target="LookupProductFeature" title="" type="single"
        header-row-style="header-row"> <!-- orig: default-table-style=-style="basic-table" -->
        <auto-fields-entity entity-name="ProductFeature" default-field-type="find"/>
        <field name="productFeatureTypeId">
            <drop-down allow-empty="true">
                <entity-options description="${description}" entity-name="ProductFeatureType">
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="productFeatureCategoryId">
            <drop-down allow-empty="true">
                <entity-options description="${description}" entity-name="ProductFeatureCategory">
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>

        <field name="noConditionFind"><hidden value="Y"/><!-- if this isn't there then with all fields empty no query will be done --></field>
        <field name="submitAction" title="${uiLabelMap.CommonFind}" widget-style="${styles.link_run_sys} ${styles.action_find}"><submit button-type="button"/></field>
    </form>
    <form name="listLookupProductFeature" list-name="listIt" title="" type="list" paginate-target="LookupProductFeature"
        odd-row-style="alternate-row" view-size="20"> <!-- orig: default-table-style=-style="basic-table" -->
        <actions>
            <service service-name="performFind" result-map="result" result-map-list="listIt">
                <field-map field-name="inputFields" from-field="parameters"/>
                <field-map field-name="entityName" value="ProductFeature"/>
                <field-map field-name="viewIndex" from-field="viewIndex"/>
                <field-map field-name="viewSize" from-field="viewSize"/>
            </service>
        </actions>
        <auto-fields-entity entity-name="ProductFeature" default-field-type="display"/>
        <field name="productFeatureId" title=" " widget-style="${styles.link_nav_info_id}">
            <hyperlink also-hidden="false" target-type="plain" description="${productFeatureId}" target="javascript:set_value('${productFeatureId}')"/>
        </field>
    </form>

    <form name="LookupProductStore" target="LookupProductStore" title="" type="single"
        header-row-style="header-row"> <!-- orig: default-table-style=-style="basic-table" -->
        <!-- <auto-fields-entity entity-name="ProductStore" default-field-type="find"/> -->

        <field name="productStoreId"><text-find/></field>
        <field name="storeName"><text-find/></field>
        <field name="companyName"><text-find/></field>
        <field name="payToPartyId"><text-find/></field>

        <field name="noConditionFind"><hidden value="Y"/><!-- if this isn't there then with all fields empty no query will be done --></field>
        <field name="submitAction" title="${uiLabelMap.CommonFind}" widget-style="${styles.link_run_sys} ${styles.action_find}"><submit button-type="button"/></field>
    </form>
    <form name="listLookupProductStore" list-name="listIt" target="" title="" type="list"
        paginate-target="LookupProductStore" odd-row-style="alternate-row" view-size="20"> <!-- orig: default-table-style=-style="basic-table" -->
        <actions>
            <service service-name="performFind" result-map="result" result-map-list="listIt">
                <field-map field-name="inputFields" from-field="parameters"/>
                <field-map field-name="entityName" value="ProductStore"/>
                <field-map field-name="viewIndex" from-field="viewIndex"/>
                <field-map field-name="viewSize" from-field="viewSize"/>
            </service>
        </actions>

        <!-- <auto-fields-entity entity-name="ProductStore" default-field-type="display"/> -->

        <field name="productStoreId" widget-style="${styles.link_nav_info_id}">
            <hyperlink also-hidden="false" target-type="plain" description="${productStoreId}" target="javascript:set_value('${productStoreId}')"/>
        </field>
        <field name="primaryStoreGroupId"><display/></field>
        <field name="storeName"><display/></field>
        <!-- <field name="companyName"><display/></field> -->
    </form>
    <form name="lookupCostComponentCalc" target="LookupCostComponentCalc" title="" type="single"
        header-row-style="header-row"> <!-- orig: default-table-style=-style="basic-table" -->
        <field name="costComponentCalcId" title="${uiLabelMap.ProductCostComponentCalcId}"><text-find/></field>
        <field name="description" title="${uiLabelMap.CommonDescription}"><text-find/></field>
        <field name="costGlAccountTypeId" title="${uiLabelMap.ProductCostGlAccountTypeId}">
            <drop-down allow-empty="true">
                <entity-options entity-name="GlAccountType" description="${description}" key-field-name="glAccountTypeId">
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="offsettingGlAccountTypeId" title="${uiLabelMap.ProductOffsettingGlAccountTypeId}">
            <drop-down allow-empty="true">
                <entity-options entity-name="GlAccountType" description="${description}" key-field-name="glAccountTypeId">
                    <entity-order-by field-name="description"/>
                </entity-options>
            </drop-down>
        </field>
        <field name="noConditionFind"><hidden value="Y"/><!-- if this isn't there then with all fields empty no query will be done --></field>
        <field name="submitAction" title="${uiLabelMap.CommonFind}" widget-style="${styles.link_run_sys} ${styles.action_find}"><submit button-type="button"/></field>
    </form>
    <form name="listLookupCostComponentCalc" list-name="listIt" title="" type="list" paginate-target="LookupCostComponentCalc"
        odd-row-style="alternate-row" view-size="20"> <!-- orig: default-table-style=-style="basic-table" -->
        <actions>
            <service service-name="performFind" result-map="result" result-map-list="listIt">
                <field-map field-name="inputFields" from-field="parameters"/>
                <field-map field-name="entityName" value="CostComponentCalc"/>
                <field-map field-name="viewIndex" from-field="viewIndex"/>
                <field-map field-name="viewSize" from-field="viewSize"/>
            </service>
        </actions>
        <field name="costComponentCalcId" title="${uiLabelMap.ProductCostComponentCalcId}" widget-style="${styles.link_nav_info_id}">
            <hyperlink also-hidden="false" target-type="plain" description="${costComponentCalcId}" target="javascript:set_value('${costComponentCalcId}')"/>
        </field>
        <field name="description" title="${uiLabelMap.CommonDescription}"><display/></field>
        <field name="costGlAccountTypeId" title="${uiLabelMap.ProductCostGlAccountTypeId}"><display/></field>
        <field name="offsettingGlAccountTypeId" title="${uiLabelMap.ProductOffsettingGlAccountTypeId}"><display/></field>
    </form>
</forms>