[OFBiz] SVN: r6019 - in trunk/applications/product: entitydef
webapp/catalog/lookup widget/catalog
jacopo at svn.ofbiz.org
jacopo at svn.ofbiz.org
Tue Oct 25 03:38:49 EDT 2005
Author: jacopo
Date: 2005-10-25 02:38:36 -0500 (Tue, 25 Oct 2005)
New Revision: 6019
Modified:
trunk/applications/product/entitydef/entitygroup.xml
trunk/applications/product/entitydef/entitymodel.xml
trunk/applications/product/webapp/catalog/lookup/FieldLookupForms.xml
trunk/applications/product/widget/catalog/LookupScreens.xml
Log:
Implemented new lookup screen to search product also by price (type, currency and purpose).
Modified: trunk/applications/product/entitydef/entitygroup.xml
===================================================================
--- trunk/applications/product/entitydef/entitygroup.xml 2005-10-25 07:07:11 UTC (rev 6018)
+++ trunk/applications/product/entitydef/entitygroup.xml 2005-10-25 07:38:36 UTC (rev 6019)
@@ -167,6 +167,7 @@
<entity-group group="org.ofbiz" entity="ProductTypeAttr" />
<entity-group group="org.ofbiz" entity="ProductVirtualAndAssocPrices" />
<entity-group group="org.ofbiz" entity="ProductVirtualAndVariantInfo" />
+ <entity-group group="org.ofbiz" entity="ProductAndPriceView" />
<!-- ========================================================= -->
<!-- org.ofbiz.product.promo -->
Modified: trunk/applications/product/entitydef/entitymodel.xml
===================================================================
--- trunk/applications/product/entitydef/entitymodel.xml 2005-10-25 07:07:11 UTC (rev 6018)
+++ trunk/applications/product/entitydef/entitymodel.xml 2005-10-25 07:38:36 UTC (rev 6019)
@@ -2216,6 +2216,25 @@
<key-map field-name="productId"/>
</view-link>
</view-entity>
+ <view-entity entity-name="ProductAndPriceView"
+ package-name="org.ofbiz.product.product"
+ title="Product And Price View">
+ <member-entity entity-alias="PR" entity-name="Product"/>
+ <member-entity entity-alias="PP" entity-name="ProductPrice"/>
+ <alias entity-alias="PR" name="productId"/>
+ <alias entity-alias="PR" name="productTypeId"/>
+ <alias entity-alias="PR" name="productName"/>
+ <alias entity-alias="PR" name="internalName"/>
+ <alias entity-alias="PP" name="productPriceTypeId"/>
+ <alias entity-alias="PP" name="productPricePurposeId"/>
+ <alias entity-alias="PP" name="currencyUomId"/>
+ <alias entity-alias="PP" name="fromDate"/>
+ <alias entity-alias="PP" name="thruDate"/>
+ <alias entity-alias="PP" name="price"/>
+ <view-link entity-alias="PR" rel-entity-alias="PP">
+ <key-map field-name="productId"/>
+ </view-link>
+ </view-entity>
<!-- ========================================================= -->
<!-- org.ofbiz.product.promo -->
Modified: trunk/applications/product/webapp/catalog/lookup/FieldLookupForms.xml
===================================================================
--- trunk/applications/product/webapp/catalog/lookup/FieldLookupForms.xml 2005-10-25 07:07:11 UTC (rev 6018)
+++ trunk/applications/product/webapp/catalog/lookup/FieldLookupForms.xml 2005-10-25 07:38:36 UTC (rev 6019)
@@ -92,7 +92,72 @@
<hyperlink also-hidden="false" target-type="plain" description="${productId}" target="javascript:set_value('${productId}')"/>
</field>
</form>
-
+
+ <form name="lookupProductAndPrice" target="LookupProductAndPrice" title="" type="single"
+ default-title-style="tableheadtext" default-tooltip-style="tabletext" default-widget-style="inputBox">
+ <!-- <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">
+ <entity-options description="${uomId} - ${description}" entity-name="Uom" key-field-name="uomId">
+ <entity-constraint name="uomTypeId" operator="equals" value="CURRENCY_MEASURE"/>
+ </entity-options>
+ </drop-down>
+ </field>
+ <field name="productPriceTypeId" title="${uiLabelMap.ProductPriceType}">
+ <drop-down allow-empty="false">
+ <entity-options description="${description}" entity-name="ProductPriceType" key-field-name="productPriceTypeId">
+ </entity-options>
+ </drop-down>
+ </field>
+ <field name="productPricePurposeId" title="${uiLabelMap.ProductPricePurpose}">
+ <drop-down allow-empty="false">
+ <entity-options description="${description}" entity-name="ProductPricePurpose" key-field-name="productPricePurposeId">
+ </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="submitButton" title="${uiLabelMap.CommonLookup}" widget-style="smallSubmit"><submit button-type="button"/></field>
+ </form>
+ <form name="listLookupProductAndPrice" list-iterator-name="listIt" paginate-target="LookupProductAndPrice" title="" type="list"
+ default-title-style="tableheadtext" default-tooltip-style="tabletext" default-widget-style="tabletext">
+ <actions>
+ <service service-name="performFind" result-map-name="result" result-map-list-iterator-name="listIt">
+ <field-map field-name="inputFields" env-name="parameters"/>
+ <field-map field-name="entityName" value="ProductAndPriceView"/>
+ </service>
+ </actions>
+ <field name="productId" title=" " widget-style="buttontext">
+ <hyperlink also-hidden="false" target-type="plain" description="${productId}" target="javascript:set_values('${productId}', '${internalName}')"/>
+ </field>
+ <field name="internalName"><display/></field>
+ <field name="productTypeId"><display/></field>
+ <field name="currencyUomId"><display/></field>
+ <field name="price"><display/></field>
+ <field name="fromDate"><display/></field>
+ <field name="thruDate"><display/></field>
+ <field name="searchVariants" title=" " widget-style="buttontext" use-when="isVirtual!=null&&"${isVirtual}".equals("Y")">
+ <hyperlink also-hidden="false" target-type="plain" description="Variants" target="LookupVariantProduct?productId=${productId}"/>
+ </field>
+ </form>
+
<form name="lookupProductFeature"
default-title-style="tableheadtext"
default-tooltip-style="tabletext" default-widget-style="inputBox"
Modified: trunk/applications/product/widget/catalog/LookupScreens.xml
===================================================================
--- trunk/applications/product/widget/catalog/LookupScreens.xml 2005-10-25 07:07:11 UTC (rev 6018)
+++ trunk/applications/product/widget/catalog/LookupScreens.xml 2005-10-25 07:38:36 UTC (rev 6019)
@@ -100,6 +100,30 @@
</widgets>
</section>
</screen>
+ <screen name="LookupProductAndPrice">
+ <section>
+ <condition>
+ <or>
+ <if-has-permission permission="CATALOG" action="_VIEW"/>
+ </or>
+ </condition>
+ <actions>
+ <property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
+ <set field="title" value="Lookup Product And Price"/>
+ <set field="queryString" from-field="result.queryString"/>
+ <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer"/>
+ <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="20"/>
+ </actions>
+ <widgets>
+ <decorator-screen name="LookupDecorator" location="component://common/widget/CommonScreens.xml">
+ <decorator-section name="body">
+ <include-form name="lookupProductAndPrice" location="component://product/webapp/catalog/lookup/FieldLookupForms.xml" />
+ <include-form name="listLookupProductAndPrice" location="component://product/webapp/catalog/lookup/FieldLookupForms.xml" />
+ </decorator-section>
+ </decorator-screen>
+ </widgets>
+ </section>
+ </screen>
<screen name="LookupProductFeature">
<section>
<condition>
More information about the Svn
mailing list