Author: mor
Date: Fri May 22 18:36:19 2009 New Revision: 777651 URL: http://svn.apache.org/viewvc?rev=777651&view=rev Log: Reverted my last commit in rev. 777498. This need to support configuration so that this feature can be turned on/off. Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/CategoryDetail.groovy ofbiz/trunk/applications/product/data/ProductScheduledServices.xml ofbiz/trunk/applications/product/entitydef/entitymodel.xml ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml ofbiz/trunk/applications/product/servicedef/services_facility.xml Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/CategoryDetail.groovy URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/CategoryDetail.groovy?rev=777651&r1=777650&r2=777651&view=diff ============================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/CategoryDetail.groovy (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/CategoryDetail.groovy Fri May 22 18:36:19 2009 @@ -59,18 +59,7 @@ catResult = dispatcher.runSync("getProductCategoryAndLimitedMembers", andMap); productCategory = catResult.productCategory; - -// Prevents out of stock product to be displayed on site -productCategoryMembers = catResult.productCategoryMembers; -productsInStock = []; -productCategoryMembers.each { productCategoryMember -> - product = productCategoryMember.getRelatedOne("Product"); - if ((!product.isOutOfStock) || ("N".equals(product.isOutOfStock))) { - productsInStock.add(productCategoryMember); - } -} - -context.productCategoryMembers = productsInStock; +context.productCategoryMembers = catResult.productCategoryMembers; context.productCategory = productCategory; context.viewIndex = catResult.viewIndex; context.viewSize = catResult.viewSize; Modified: ofbiz/trunk/applications/product/data/ProductScheduledServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/data/ProductScheduledServices.xml?rev=777651&r1=777650&r2=777651&view=diff ============================================================================== --- ofbiz/trunk/applications/product/data/ProductScheduledServices.xml (original) +++ ofbiz/trunk/applications/product/data/ProductScheduledServices.xml Fri May 22 18:36:19 2009 @@ -21,26 +21,6 @@ <entity-engine-xml> <JobSandbox jobId="8100" jobName="Purge Old Store Auto-Entered Promos" runTime="2000-01-01 00:00:00.000" serviceName="purgeOldStoreAutoPromos" poolId="pool" runAsUser="system" tempExprId="MIDNIGHT_DAILY" maxRecurrenceCount="-1"/> - <RecurrenceRule recurrenceRuleId="500" untilDateTime="" frequency="HOURLY" intervalNumber="1" countNumber="-1"/> - <RecurrenceInfo recurrenceInfoId="500" startDateTime="2008-05-14 22:00:00.000" recurrenceRuleId="500" recurrenceCount="0"/> - <RuntimeData runtimeDataId="8801"> - <runtimeInfo><![CDATA[<?xml version="1.0" encoding="UTF-8"?> - <ofbiz-ser> - <map-HashMap> - <map-Entry> - <map-Key> - <std-String value="recurrenceInfoId"/> - </map-Key> - <map-Value> - <std-String value="500"/> - </map-Value> - </map-Entry> - </map-HashMap> - </ofbiz-ser> - ]]></runtimeInfo> - </RuntimeData> - <JobSandbox jobId="8801" jobName="Check Stock Availability" runTime="2000-01-01 00:00:00.000" serviceName="checkStockAvailability" runtimeDataId="8801" poolId="pool" runAsUser="system" recurrenceInfoId="500"/> - <!--Data for scheduling the service productImportFromSpreadsheet --> <!--RecurrenceRule recurrenceRuleId="500" untilDateTime="" frequency="MINUTELY" intervalNumber="5" countNumber="-1"/> <RecurrenceInfo recurrenceInfoId="500" startDateTime="2006-06-06 01:10:00.000" recurrenceRuleId="500" recurrenceCount="0"/> Modified: ofbiz/trunk/applications/product/entitydef/entitymodel.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/entitydef/entitymodel.xml?rev=777651&r1=777650&r2=777651&view=diff ============================================================================== --- ofbiz/trunk/applications/product/entitydef/entitymodel.xml (original) +++ ofbiz/trunk/applications/product/entitydef/entitymodel.xml Fri May 22 18:36:19 2009 @@ -2589,7 +2589,6 @@ <field name="lastModifiedByUserLogin" type="id-vlong"></field> <field name="inShippingBox" type="indicator"></field> <field name="defaultShipmentBoxTypeId" type="id"></field> - <field name="isOutOfStock" type="indicator"><description>This field defines whether the product is out of stock or not</description></field> <prim-key field="productId"/> <relation type="one" fk-name="PROD_TYPE" rel-entity-name="ProductType"> <key-map field-name="productTypeId"/> Modified: ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml?rev=777651&r1=777650&r2=777651&view=diff ============================================================================== --- ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml (original) +++ ofbiz/trunk/applications/product/script/org/ofbiz/product/inventory/InventoryServices.xml Fri May 22 18:36:19 2009 @@ -1293,30 +1293,4 @@ </else> </if-empty> </simple-method> - - <simple-method method-name="checkStockAvailability" short-description="Schedule service that check stock availability hourly. If a product is out of stock then it sets flag isOutOfStock on Product entity to Y else it sets it to N" > - <entity-condition entity-name="Product" list="products" use-cache="true"> - <use-iterator/> - </entity-condition> - <iterate list="products" entry="product"> - <set field="serviceInMap.productId" from-field="product.productId"/> - <call-service service-name="getProductInventoryAvailable" in-map-name="serviceInMap"> - <result-to-field result-name="availableToPromiseTotal"/> - </call-service> - <if-compare field="availableToPromiseTotal" operator="less-equals" value="0" type="BigDecimal"> - <set field="product.isOutOfStock" value="Y"/> - <else> - <set field="product.isOutOfStock" value="N"/> - </else> - </if-compare> - <entity-one entity-name="UserLogin" value-field="userLogin" auto-field-map="false"> - <field-map field-name="userLoginId" value="system"/> - </entity-one> - <set-service-fields service-name="updateProduct" map="product" to-map="updateProductCtx"/> - <set-service-fields service-name="updateProduct" map="userLogin" to-map="updateProductCtx"/> - <call-service service-name="updateProduct" in-map-name="updateProductCtx"/> - <clear-field field="product"/> - <clear-field field="updateProductCtx"/> - </iterate> - </simple-method> </simple-methods> \ No newline at end of file Modified: ofbiz/trunk/applications/product/servicedef/services_facility.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/servicedef/services_facility.xml?rev=777651&r1=777650&r2=777651&view=diff ============================================================================== --- ofbiz/trunk/applications/product/servicedef/services_facility.xml (original) +++ ofbiz/trunk/applications/product/servicedef/services_facility.xml Fri May 22 18:36:19 2009 @@ -890,9 +890,4 @@ <attribute name="productId" type="String" mode="IN" optional="false"/> <attribute name="LocationList" type="List" mode="OUT" optional="true"/> </service> - <service name="checkStockAvailability" engine="simple" - location="component://product/script/org/ofbiz/product/inventory/InventoryServices.xml" invoke="checkStockAvailability"> - <description>Schedule service that check stock availability hourly. If a product is out of stock then it sets flag isOutOfStock on Product entity to Y else it sets it to N</description> - <attribute name="recurrenceInfoId" mode="IN" type="String" optional="false"/> - </service> </services> |
Free forum by Nabble | Edit this page |