This commit is throwing a lot of exceptions during data loading. See the
buildbot report. -Adrian On 12/19/2011 6:40 AM, [hidden email] wrote: > Author: hansbak > Date: Mon Dec 19 06:40:18 2011 > New Revision: 1220622 > > URL: http://svn.apache.org/viewvc?rev=1220622&view=rev > Log: > new producttype: configurable product service, using inventory > > Modified: > ofbiz/trunk/applications/manufacturing/data/ManufacturingExampleData.xml > ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java > ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java > ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java > ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Product.groovy > ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl > ofbiz/trunk/applications/product/data/ProductTypeData.xml > ofbiz/trunk/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml > ofbiz/trunk/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml > ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java > ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java > ofbiz/trunk/specialpurpose/ecommerce/data/DemoProduct.xml > > Modified: ofbiz/trunk/applications/manufacturing/data/ManufacturingExampleData.xml > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/data/ManufacturingExampleData.xml?rev=1220622&r1=1220621&r2=1220622&view=diff > ============================================================================== > --- ofbiz/trunk/applications/manufacturing/data/ManufacturingExampleData.xml (original) > +++ ofbiz/trunk/applications/manufacturing/data/ManufacturingExampleData.xml Mon Dec 19 06:40:18 2011 > @@ -45,6 +45,11 @@ under the License. > <FixedAsset fixedAssetId="DEMO_PROD_EQUIPMT_2" fixedAssetName="Demo Production Equipment Two" fixedAssetTypeId="PRODUCTION_EQUIPMENT" dateAcquired="2005-01-01 00:01:00.0" expectedEndOfLife="2010-01-01" calendarId="DEMO_CALENDAR" salvageValue="50" purchaseCost="1000" purchaseCostUomId="USD"/> > <FixedAssetGeoPoint fixedAssetId="DEMO_PROD_EQUIPMT_2" geoPointId="9000" fromDate="2009-01-09 00:00:00.000"/> > > +<FixedAsset fixedAssetId="DEMO_BOOK_GROUP" fixedAssetTypeId="GROUP_EQUIPMENT" fixedAssetName="Demo Book Group"/> > +<FixedAssetGeoPoint fixedAssetId="DEMO_BOOK_GROUP" geoPointId="9000" fromDate="2011-08-02 00:00:00.000"/> > +<FixedAsset fixedAssetId="DEMO_BOOK" fixedAssetName="Demo Book" fixedAssetTypeId="PRODUCTION_EQUIPMENT" parentFixedAssetId="DEMO_BOOK_GROUP" calendarId="DEMO_CALENDAR" purchaseCost="200" purchaseCostUomId="USD"/> > +<FixedAssetGeoPoint fixedAssetId="DEMO_BOOK" geoPointId="9000" fromDate="2011-08-02 00:00:00.000"/> > + > <FixedAssetDepMethod depreciationCustomMethodId="STR_LINE_DEP_FORMULA" fixedAssetId="DEMO_PROD_EQUIPMT_1"/> > <FixedAssetDepMethod depreciationCustomMethodId="DBL_DECL_DEP_FORMULA" fixedAssetId="DEMO_PROD_EQUIPMT_2"/> > </entity-engine-xml> > > Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java?rev=1220622&r1=1220621&r2=1220622&view=diff > ============================================================================== > --- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java (original) > +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java Mon Dec 19 06:40:18 2011 > @@ -1138,7 +1138,7 @@ public class OrderServices { > String productId = (String) orderItem.get("productId"); > GenericValue product = delegator.getRelatedOne("Product", orderItem); > > - if("SERVICE_PRODUCT".equals(product.get("productTypeId"))){ > + if("SERVICE_PRODUCT".equals(product.get("productTypeId")) || "AGGREGATEDSERV_CONF".equals(product.get("productTypeId"))){ > String inventoryFacilityId = null; > if ("Y".equals(productStore.getString("oneInventoryFacility"))) { > inventoryFacilityId = productStore.getString("inventoryFacilityId"); > > Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java?rev=1220622&r1=1220621&r2=1220622&view=diff > ============================================================================== > --- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java (original) > +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java Mon Dec 19 06:40:18 2011 > @@ -644,7 +644,7 @@ public class CheckOutHelper { > GenericValue permUserLogin = delegator.findByPrimaryKeyCache("UserLogin", UtilMisc.toMap("userLoginId", "system")); > GenericValue productStore = ProductStoreWorker.getProductStore(productStoreId, delegator); > GenericValue product = delegator.findByPrimaryKey("Product", UtilMisc.toMap("productId", productId)); > - if ("AGGREGATED_CONF".equals(product.getString("productTypeId"))) { > + if ("AGGREGATED_CONF".equals(product.getString("productTypeId")) || "AGGREGATEDSERV_CONF".equals(product.getString("productTypeId"))) { > org.ofbiz.product.config.ProductConfigWrapper config = this.cart.findCartItem(counter).getConfigWrapper(); > Map<String, Object> inputMap = new HashMap<String, Object>(); > inputMap.put("config", config); > > Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java?rev=1220622&r1=1220621&r2=1220622&view=diff > ============================================================================== > --- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java (original) > +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java Mon Dec 19 06:40:18 2011 > @@ -3430,7 +3430,11 @@ public class ShoppingCart implements Ite > serviceContext.put("internalName", internalName); > serviceContext.put("productName", productName); > serviceContext.put("description", description); > - serviceContext.put("productTypeId", "AGGREGATED_CONF"); > + if(ProductWorker.isAggregateService(delegator, item.getProductId())) > + serviceContext.put("productTypeId", "AGGREGATEDSERV_CONF"); > + else > + serviceContext.put("productTypeId", "AGGREGATED_CONF"); > + > serviceContext.put("configId", configId); > if (UtilValidate.isNotEmpty(product.getString("requirementMethodEnumId"))) { > serviceContext.put("requirementMethodEnumId", product.getString("requirementMethodEnumId")); > > Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Product.groovy > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Product.groovy?rev=1220622&r1=1220621&r2=1220622&view=diff > ============================================================================== > --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Product.groovy (original) > +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Product.groovy Mon Dec 19 06:40:18 2011 > @@ -124,7 +124,7 @@ if (productId) { > } > > // Set the default template for aggregated product (product component configurator ui) > - if (product.productTypeId&& "AGGREGATED".equals(product.productTypeId)&& context.configproductdetailScreen) { > + if (product.productTypeId&& ("AGGREGATED".equals(product.productTypeId) || "AGGREGATED_SERVICE".equals(product.productTypeId))&& context.configproductdetailScreen) { > detailScreen = context.configproductdetailScreen; > } > > > Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl?rev=1220622&r1=1220621&r2=1220622&view=diff > ============================================================================== > --- ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl (original) > +++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl Mon Dec 19 06:40:18 2011 > @@ -101,7 +101,7 @@ ${virtualJavaScript?if_exists} > <#elseif product.productTypeId?if_exists == "ASSET_USAGE"> > <a href="${productUrl}" class="buttontext">${uiLabelMap.OrderMakeBooking}...</a> > <#-- check to see if it is an aggregated or configurable product; will enter parameters on the detail screen--> > -<#elseif product.productTypeId?if_exists == "AGGREGATED"> > +<#elseif product.productTypeId?if_exists == "AGGREGATED" || product.productTypeId?if_exists == "AGGREGATED_SERVICE"> > <a href="${productUrl}" class="buttontext">${uiLabelMap.OrderConfigure}...</a> > <#-- check to see if the product is a virtual product --> > <#elseif product.isVirtual?exists&& product.isVirtual == "Y"> > > Modified: ofbiz/trunk/applications/product/data/ProductTypeData.xml > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/data/ProductTypeData.xml?rev=1220622&r1=1220621&r2=1220622&view=diff > ============================================================================== > --- ofbiz/trunk/applications/product/data/ProductTypeData.xml (original) > +++ ofbiz/trunk/applications/product/data/ProductTypeData.xml Mon Dec 19 06:40:18 2011 > @@ -500,7 +500,9 @@ under the License. > <ProductType description="Work In Process" isPhysical="Y" isDigital="N" hasTable="N" parentTypeId="GOOD" productTypeId="WIP"/> > <ProductType description="Configurable Good Configuration" isPhysical="Y" isDigital="N" hasTable="N" parentTypeId="AGGREGATED" productTypeId="AGGREGATED_CONF"/> > <ProductType description="Fixed Asset Usage For Rental of an asset which is shipped from and returned to inventory" isPhysical="Y" isDigital="N" hasTable="N" parentTypeId="" productTypeId="ASSET_USAGE_OUT_IN"/> > -<ProductType description="Service a product which is received to- and shipped from inventory" isPhysical="Y" isDigital="N" hasTable="N" parentTypeId="" productTypeId="SERVICE_PRODUCT"/> > +<ProductType description="Service a product using inventory" isPhysical="Y" isDigital="N" hasTable="N" parentTypeId="" productTypeId="SERVICE_PRODUCT"/> > +<ProductType description="Configurable Service using inventory" isPhysical="Y" isDigital="N" hasTable="N" parentTypeId="SERVICE_PRODUCT" productTypeId="AGGREGATED_SERVICE"/> > +<ProductType description="Configurable Service Configuration" isPhysical="Y" isDigital="N" hasTable="N" parentTypeId="AGGREGATED_SERVICE" productTypeId="AGGREGATEDSERV_CONF"/> > > <EnumerationType description="Product Requirement Method" enumTypeId="PROD_REQ_METHOD" hasTable="N" parentTypeId=""/> > <!-- NONE: no requirement is created (default) --> > @@ -618,7 +620,7 @@ under the License. > <StatusItem description="Approved" sequenceId="02" statusCode="APPROVED" statusId="IM_APPROVED" statusTypeId="IMAGE_MANAGEMENT_ST"/> > <StatusItem description="Rejected" sequenceId="03" statusCode="REJECTED" statusId="IM_REJECTED" statusTypeId="IMAGE_MANAGEMENT_ST"/> > > -<ProductFeatureCategory productFeatureCategoryId="IMAGE" description="Image"/> > +<ProductFeatureCategory productFeatureCategoryI="IMAGE" description="Image"/> > <ProductFeatureCategory productFeatureCategoryId="TEXT" description="Text"/> > > <ProductFeature productFeatureId="IMAGE_AVATAR" productFeatureTypeId="SIZE" productFeatureCategoryId="IMAGE" description="100 X 75 (avatar)" defaultSequenceNum="1"/> > > Modified: ofbiz/trunk/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml?rev=1220622&r1=1220621&r2=1220622&view=diff > ============================================================================== > --- ofbiz/trunk/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml (original) > +++ ofbiz/trunk/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml Mon Dec 19 06:40:18 2011 > @@ -53,6 +53,7 @@ under the License. > <or> > <if-compare field="product.productTypeId" operator="equals" value="SERVICE_PRODUCT"/> > <if-compare field="product.productTypeId" operator="equals" value="ASSET_USAGE_OUT_IN"/> > +<if-compare field="product.productTypeId" operator="equals" value="AGGREGATEDSERV_CONF"/> > </or> > </condition> > <then> > > Modified: ofbiz/trunk/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml?rev=1220622&r1=1220621&r2=1220622&view=diff > ============================================================================== > --- ofbiz/trunk/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml (original) > +++ ofbiz/trunk/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml Mon Dec 19 06:40:18 2011 > @@ -53,6 +53,7 @@ under the License. > <or> > <if-compare field="product.productTypeId" operator="equals" value="SERVICE_PRODUCT"/> > <if-compare field="product.productTypeId" operator="equals" value="ASSET_USAGE_OUT_IN"/> > +<if-compare field="product.productTypeId" operator="equals" value="AGGREGATEDSERV_CONF"/> > </or> > </condition> > <then> > > Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java?rev=1220622&r1=1220621&r2=1220622&view=diff > ============================================================================== > --- ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java (original) > +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java Mon Dec 19 06:40:18 2011 > @@ -97,7 +97,7 @@ public class ProductConfigWrapper implem > > private void init(Delegator delegator, LocalDispatcher dispatcher, String productId, String productStoreId, String catalogId, String webSiteId, String currencyUomId, Locale locale, GenericValue autoUserLogin) throws Exception { > product = delegator.findByPrimaryKey("Product", UtilMisc.toMap("productId", productId)); > - if (product == null || !product.getString("productTypeId").equals("AGGREGATED")) { > + if (product == null || !product.getString("productTypeId").equals("AGGREGATED")&& !product.getString("productTypeId").equals("AGGREGATED_SERVICE")) { > throw new ProductConfigWrapperException("Product " + productId + " is not an AGGREGATED product."); > } > this.dispatcher = dispatcher; > @@ -123,7 +123,7 @@ public class ProductConfigWrapper implem > basePrice = price; > } > questions = FastList.newInstance(); > - if ("AGGREGATED".equals(product.getString("productTypeId"))) { > + if ("AGGREGATED".equals(product.getString("productTypeId")) || "AGGREGATED_SERVICE".equals(product.getString("productTypeId"))) { > List<GenericValue> questionsValues = delegator.findByAnd("ProductConfig", UtilMisc.toMap("productId", productId), UtilMisc.toList("sequenceNum")); > questionsValues = EntityUtil.filterByDate(questionsValues); > Set<String> itemIds = FastSet.newInstance(); > > Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java > URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java?rev=1220622&r1=1220621&r2=1220622&view=diff > ============================================================================== > --- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java (original) > +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java Mon Dec 19 06:40:18 2011 > @@ -146,7 +146,7 @@ public class ProductWorker { > public static String getInstanceAggregatedId(Delegator delegator, String instanceProductId) throws GenericEntityException { > GenericValue instanceProduct = delegator.findByPrimaryKey("Product", UtilMisc.toMap("productId", instanceProductId)); > > - if (UtilValidate.isNotEmpty(instanceProduct)&& "AGGREGATED_CONF".equals(instanceProduct.getString("productTypeId"))) { > + if (UtilValidate.isNotEmpty(instanceProduct)&& ("AGGREGATED_CONF".equals(instanceProduct.getString("productTypeId")) || "AGGREGATEDSERV_CONF".equals(instanceProduct.getString("productTypeId")))) { > GenericValue productAssoc = EntityUtil.getFirst(EntityUtil.filterByDate(instanceProduct.getRelatedByAnd("AssocProductAssoc", > UtilMisc.toMap("productAssocTypeId", "PRODUCT_CONF")))); > if (UtilValidate.isNotEmpty(productAssoc)) { > @@ -172,7 +172,7 @@ public class ProductWorker { > public static List<GenericValue> getAggregatedAssocs(Delegator delegator, String aggregatedProductId) throws GenericEntityException { > GenericValue aggregatedProduct = delegator.findByPrimaryKey("Product", UtilMisc.toMap("productId", aggregatedProductId)); > > - if (UtilValidate.isNotEmpty(aggregatedProduct)&& "AGGREGATED".equals(aggregatedProduct.getString("productTypeId"))) { > + if (UtilValidate.isNotEmpty(aggregatedProduct)&& ("AGGREGATED".equals(aggregatedProduct.getString("productTypeId")) || "AGGREGATED_SERVICE".equals(aggregatedProduct.getString("productTypeId")))) { > List<GenericValue> productAssocs = EntityUtil.filterByDate(aggregatedProduct.getRelatedByAnd("MainProductAssoc", > UtilMisc.toMap("productAssocTypeId", "PRODUCT_CONF"))); > return productAssocs; > @@ -1193,4 +1193,16 @@ nextProd: > return Boolean.TRUE; > } > > + public static boolean isAggregateService(Delegator delegator, String aggregatedProductId) { > + try { > + GenericValue aggregatedProduct = delegator.findByPrimaryKeyCache("Product", UtilMisc.toMap("productId", aggregatedProductId)); > + if (UtilValidate.isNotEmpty(aggregatedProduct)&& "AGGREGATED_SERVICE".equals(aggregatedProduct.getString("productTypeId"))) { > + return true; > + } > + } catch (GenericEntityException e) { > + Debug.logWarning(e.getMessage(), module); > + } > + > + return false; > + } > } > > Modified: ofbiz/trunk/specialpurpose/ecommerce/data/DemoProduct.xml > URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/data/DemoProduct.xml?rev=1220622&r1=1220621&r2=1220622&view=diff > ============================================================================== > --- ofbiz/trunk/specialpurpose/ecommerce/data/DemoProduct.xml (original) > +++ ofbiz/trunk/specialpurpose/ecommerce/data/DemoProduct.xml Mon Dec 19 06:40:18 2011 > @@ -737,6 +737,93 @@ under the License. > <ContentAssoc contentId="SV-1001-ALT" contentIdTo="CSV-1001-ALTEN" contentAssocTypeId="ALTERNATE_LOCALE" fromDate="2011-08-02 12:00:00.0"/> > <ProductContent productId="SV-1001" contentId="SV-1001-ALT" productContentTypeId="ALTERNATIVE_URL" fromDate="2011-08-02 12:00:00.0"/> > > +<!-- test for the configurable product type which is received to- and shipped from inventory--> > +<Product productId="CFSV1001" productTypeId="AGGREGATED_SERVICE" primaryProductCategoryId="SERV-001" productName="Scanning book service" internalName="The configurable product type which is received to- and shipped from inventory" description="The configurable product type which is received to- and shipped from inventory for demonstration use" taxable="Y" chargeShipping="N" autoCreateKeywords="Y" isVirtual="N" isVariant="N" createdDate="2008-12-02 12:00:00.0" createdByUserLogin="admin" lastModifiedDate="2008-12-02 12:00:00.0" lastModifiedByUserLogin="admin"/> > +<Product productId="SCAN_TYPE" productTypeId="SERVICE_PRODUCT" productName="Scanning Type" internalName="Scanning Type" description="Scanning Type" isVirtual="Y" isVariant="N" billOfMaterialLevel="0" createdDate="2004-08-20 12:50:54.794" createdByUserLogin="admin"/> > +<Product productId="SCAN-EC" productTypeId="SERVICE_PRODUCT" internalName="Economy Scanning type" productName="Economy Scanning type" description="Economy Scanning type" returnable="N" includeInPromotions="N" taxable="N" chargeShipping="N" isVirtual="N" isVariant="Y" createdDate="2003-11-20 13:48:19.105" createdByUserLogin="admin" lastModifiedDate="2003-11-20 13:48:19.105" lastModifiedByUserLogin="admin"/> > +<Product productId="SCAN-ST" productTypeId="SERVICE_PRODUCT" internalName="Standard Scanning type" productName="Standard Scanning type" description="Standard Scanning type" returnable="N" includeInPromotions="N" taxable="N" chargeShipping="N" isVirtual="N" isVariant="Y" createdDate="2003-11-20 13:48:19.105" createdByUserLogin="admin" lastModifiedDate="2003-11-20 13:48:19.105" lastModifiedByUserLogin="admin"/> > +<Product productId="SCAN-SU" productTypeId="SERVICE_PRODUCT" internalName="Superfine Scanning type" productName="Superfine Scanning type" description="Superfine Scanning type" returnable="N" includeInPromotions="N" taxable="N" chargeShipping="N" isVirtual="N" isVariant="Y" createdDate="2003-11-20 13:48:19.105" createdByUserLogin="admin" lastModifiedDate="2003-11-20 13:48:19.105" lastModifiedByUserLogin="admin"/> > + > +<ProductFeatureCategory productFeatureCategoryId="SCAN_TYPE" description="Scanning Type"/> > +<ProductFeature productFeatureId="ECONOMY" productFeatureTypeId="TYPE" productFeatureCategoryId="SCAN_TYPE" description="Economy Scan" defaultSequenceNum="1"/> > +<ProductFeature productFeatureId="STANDARD" productFeatureTypeId="TYPE" productFeatureCategoryId="SCAN_TYPE" description="Standard Scan" defaultSequenceNum="2"/> > +<ProductFeature productFeatureId="SUPERFINE" productFeatureTypeId="TYPE" productFeatureCategoryId="SCAN_TYPE" description="Superfine Scan" defaultSequenceNum="3"/> > + > +<Product productId="EXPRESS" productTypeId="SERVICE_PRODUCT" productName="Express" internalName="Express" description="Express" isVirtual="N" isVariant="N" billOfMaterialLevel="0" createdDate="2007-12-27 12:00:00.0" createdByUserLogin="admin"/> > +<Product productId="SUPER_EXPRESS" productTypeId="SERVICE_PRODUCT" productName="Super Express" internalName="Super Express" description="Super Express" isVirtual="N" isVariant="N" billOfMaterialLevel="0" createdDate="2007-12-27 12:00:00.0" createdByUserLogin="admin"/> > +<Product productId="SCAN_COVER" productTypeId="SERVICE_PRODUCT" productName="Scan Cover" internalName="Scan Cover" description="Scan Cover" isVirtual="N" isVariant="N" billOfMaterialLevel="0" createdDate="2007-12-27 12:00:00.0" createdByUserLogin="admin"/> > +<Product productId="OCR" productTypeId="SERVICE_PRODUCT" productName="OCR" internalName="OCR" description="OCR" isVirtual="N" isVariant="N" billOfMaterialLevel="0" createdDate="2007-12-27 12:00:00.0" createdByUserLogin="admin"/> > +<Product productId="METADATA" productTypeId="SERVICE_PRODUCT" productName="Metadata" internalName="Metadata" description="Metadata" isVirtual="N" isVariant="N" billOfMaterialLevel="0" createdDate="2007-12-27 12:00:00.0" createdByUserLogin="admin"/> > +<Product productId="DVD" productTypeId="SERVICE_PRODUCT" productName="DVD" internalName="DVD" description="DVD" isVirtual="N" isVariant="N" billOfMaterialLevel="0" createdDate="2007-12-27 12:00:00.0" createdByUserLogin="admin"/> > + > +<ProductAssoc productId="SCAN_TYPE" productIdTo="SCAN-EC" productAssocTypeId="PRODUCT_VARIANT" fromDate="2011-08-02 12:00:00.0"/> > +<ProductAssoc productId="SCAN_TYPE" productIdTo="SCAN-ST" productAssocTypeId="PRODUCT_VARIANT" fromDate="2011-08-02 12:00:00.0"/> > +<ProductAssoc productId="SCAN_TYPE" productIdTo="SCAN-SU" productAssocTypeId="PRODUCT_VARIANT" fromDate="2011-08-02 12:00:00.0"/> > + > +<ProductFeatureAppl productId="SCAN_TYPE" productFeatureId="ECONOMY" productFeatureApplTypeId="SELECTABLE_FEATURE" fromDate="2011-08-02 12:00:00.0" sequenceNum="1"/> > +<ProductFeatureAppl productId="SCAN_TYPE" productFeatureId="STANDARD" productFeatureApplTypeId="SELECTABLE_FEATURE" fromDate="2011-08-02 12:00:00.0" sequenceNum="2"/> > +<ProductFeatureAppl productId="SCAN_TYPE" productFeatureId="SUPERFINE" productFeatureApplTypeId="SELECTABLE_FEATURE" fromDate="2011-08-02 12:00:00.0" sequenceNum="3"/> > + > +<ProductFeatureAppl productId="SCAN-EC" productFeatureId="ECONOMY" productFeatureApplTypeId="STANDARD_FEATURE" fromDate="2011-08-02 12:00:00.0" sequenceNum="1"/> > +<ProductFeatureAppl productId="SCAN-ST" productFeatureId="STANDARD" productFeatureApplTypeId="STANDARD_FEATURE" fromDate="2011-08-02 12:00:00.0" sequenceNum="1"/> > +<ProductFeatureAppl productId="SCAN-SU" productFeatureId="SUPERFINE" productFeatureApplTypeId="STANDARD_FEATURE" fromDate="2011-08-02 12:00:00.0" sequenceNum="1"/> > + > +<ProductPrice productId="CFSV1001" productPricePurposeId="PURCHASE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-08-02 12:00:00.0" price="9.99" createdDate="2011-08-02 12:00:00.0" createdByUserLogin="admin"/> > +<ProductPrice productId="SCAN-EC" productPricePurposeId="PURCHASE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="1.00" createdDate="2011-01-01 00:00:00.0"/> > +<ProductPrice productId="SCAN-EC" productPricePurposeId="COMPONENT_PRICE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="1.00" createdDate="2011-01-01 00:00:00.0"/> > +<ProductPrice productId="SCAN-ST" productPricePurposeId="PURCHASE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="2.00" createdDate="2011-01-01 00:00:00.0"/> > +<ProductPrice productId="SCAN-ST" productPricePurposeId="COMPONENT_PRICE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="2.00" createdDate="2011-01-01 00:00:00.0"/> > +<ProductPrice productId="SCAN-SU" productPricePurposeId="PURCHASE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="3.00" createdDate="2011-01-01 00:00:00.0"/> > +<ProductPrice productId="SCAN-SU" productPricePurposeId="COMPONENT_PRICE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="3.00" createdDate="2011-01-01 00:00:00.0"/> > +<ProductPrice productId="EXPRESS" productPricePurposeId="COMPONENT_PRICE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="1.50" createdDate="2011-01-01 00:00:00.0"/> > +<ProductPrice productId="SUPER_EXPRESS" productPricePurposeId="COMPONENT_PRICE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="3.00" createdDate="2011-01-01 00:00:00.0"/> > +<ProductPrice productId="SCAN_COVER" productPricePurposeId="COMPONENT_PRICE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="1.00" createdDate="2011-01-01 00:00:00.0"/> > +<ProductPrice productId="OCR" productPricePurposeId="COMPONENT_PRICE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="2.00" createdDate="2011-01-01 00:00:00.0"/> > +<ProductPrice productId="METADATA" productPricePurposeId="COMPONENT_PRICE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="1.00" createdDate="2011-01-01 00:00:00.0"/> > +<ProductPrice productId="DVD" productPricePurposeId="COMPONENT_PRICE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="0.25" createdDate="2011-01-01 00:00:00.0"/> > + > +<ProductConfigItem configItemId="SC00000" configItemTypeId="MULTIPLE" configItemName="Scanning Type" description="Select the scanning type :"/> > +<ProductConfigItem configItemId="SCF0001" configItemTypeId="MULTIPLE" configItemName="Scanning Options" description="Scanning options :"/> > + > +<ProductConfigOption configItemId="SC00000" configOptionId="SCOP001" configOptionName="OPT0001" description="Scanning Type" sequenceNum="10"/> > +<ProductConfigOption configItemId="SCF0001" configOptionId="SCOP006" configOptionName="OPT0006" description="Express" sequenceNum="10"/> > +<ProductConfigOption configItemId="SCF0001" configOptionId="SCOP007" configOptionName="OPT0007" description="Super Express" sequenceNum="20"/> > +<ProductConfigOption configItemId="SCF0001" configOptionId="SCOP008" configOptionName="OPT0008" description="Scan Cover" sequenceNum="30"/> > +<ProductConfigOption configItemId="SCF0001" configOptionId="SCOP009" configOptionName="OPT0009" description="OCR" sequenceNum="40"/> > +<ProductConfigOption configItemId="SCF0001" configOptionId="SCOP010" configOptionName="OPT0010" description="Metadata" sequenceNum="60"/> > +<ProductConfigOption configItemId="SCF0001" configOptionId="SCOP011" configOptionName="OPT0011" description="DVD" sequenceNum="50"/> > + > +<ProductConfigProduct configItemId="SC00000" configOptionId="SCOP001" productId="SCAN_TYPE" quantity="1"/> > +<ProductConfigProduct configItemId="SCF0001" configOptionId="SCOP006" productId="EXPRESS" quantity="1"/> > +<ProductConfigProduct configItemId="SCF0001" configOptionId="SCOP007" productId="SUPER_EXPRESS" quantity="1"/> > +<ProductConfigProduct configItemId="SCF0001" configOptionId="SCOP008" productId="SCAN_COVER" quantity="1"/> > +<ProductConfigProduct configItemId="SCF0001" configOptionId="SCOP009" productId="OCR" quantity="1"/> > +<ProductConfigProduct configItemId="SCF0001" configOptionId="SCOP010" productId="METADATA" quantity="1"/> > +<ProductConfigProduct configItemId="SCF0001" configOptionId="SCOP011" productId="DVD" quantity="1"/> > + > +<ProductCategoryMember productCategoryId="SERV-001" productId="CFSV1001" fromDate="2011-08-02 12:00:00.0"/> > +<ProductCategoryMember productCategoryId="CATALOG1_SEARCH" productId="CFSV1001" fromDate="2011-08-02 12:00:00.0"/> > +<DataResource dataResourceId="CFSV1001-ALT" dataResourceTypeId="LINK" objectInfo="scanning-book-service-CFSV1001-p"/> > +<DataResource dataResourceTypeId="ELECTRONIC_TEXT" dataResourceId="CFSV1001-ALT" localeString="en"/> > +<DataResource dataResourceTypeId="ELECTRONIC_TEXT" dataResourceId="DRCFSV1001-ALTEN" localeString="en_US"/> > +<ElectronicText dataResourceId="CFSV1001-ALT" textData="scanning-book-product"/> > +<ElectronicText dataResourceId="DRCFSV1001-ALTEN" textData="scanning-book-product"/> > + > +<ProductConfig productId="CFSV1001" configItemId="SC00000" sequenceNum="10" fromDate="2011-01-01 00:00:00.0" description="Select the scanning type :" configTypeId="QUESTION" isMandatory="N"/> > +<ProductConfig productId="CFSV1001" configItemId="SCF0001" sequenceNum="20" fromDate="2011-01-01 00:00:00.0" description="Scanning options :" configTypeId="QUESTION" isMandatory="N"/> > + > +<WorkEffort workEffortId="SCTASK01" workEffortTypeId="ROU_TASK" workEffortPurposeTypeId="ROU_ASSEMBLING" currentStatusId="ROU_ACTIVE" workEffortName="Stock out" description="Components" revisionNumber="1" fixedAssetId="DEMO_BOOK_GROUP" estimatedMilliSeconds="600000" estimatedSetupMillis="0"/> > +<WorkEffort workEffortId="SCTASK02" workEffortTypeId="ROU_TASK" workEffortPurposeTypeId="ROU_ASSEMBLING" currentStatusId="ROU_ACTIVE" workEffortName="Preparation" description="Preparation" revisionNumber="1" fixedAssetId="DEMO_BOOK_GROUP" estimatedMilliSeconds="900000" estimatedSetupMillis="0"/> > +<WorkEffort workEffortId="SCROUT01" workEffortTypeId="ROUTING" currentStatusId="ROU_ACTIVE" workEffortName="Pizza preparation" description="Scanning preparation" revisionNumber="1" quantityToProduce="0"/> > +<WorkEffortGoodStandard workEffortId="SCROUT01" productId="CFSV1001" workEffortGoodStdTypeId="ROU_PROD_TEMPLATE" statusId="WEGS_CREATED" fromDate="2011-01-01 00:00:00.0"/> > +<WorkEffortAssoc workEffortIdFrom="SCROUT01" workEffortIdTo="SCTASK01" workEffortAssocTypeId="ROUTING_COMPONENT" sequenceNum="10" fromDate="2011-01-01 00:00:00.0"/> > +<WorkEffortAssoc workEffortIdFrom="SCROUT01" workEffortIdTo="SCTASK02" workEffortAssocTypeId="ROUTING_COMPONENT" sequenceNum="20" fromDate="2011-01-01 00:00:00.0"/> > + > +<Content contentId="CFSV1001-ALT" contentTypeId="DOCUMENT" dataResourceId="CFSV1001-ALT" localeString="en"/> > +<Content contentId="CCFSV1001-ALTEN" contentTypeId="DOCUMENT" dataResourceId="DRCFSV1001-ALTEN" localeString="en_US"/> > +<ContentAssoc contentId="CFSV1001-ALT" contentIdTo="CCFSV1001-ALTEN" contentAssocTypeId="ALTERNATE_LOCALE" fromDate="2011-08-02 12:00:00.0"/> > +<ProductContent productId="CFSV1001" contentId="CFSV1001-ALT" productContentTypeId="ALTERNATIVE_URL" fromDate="2011-08-02 12:00:00.0"/> > + > <ProductFeatureCategory productFeatureCategoryId="8000" description="License Features"/> > <ProductFeatureCategoryAppl productFeatureCategoryId="8000" productCategoryId="CATALOG1_SEARCH" fromDate="2001-05-13 12:00:00.0"/> > > > |
Yep,
the problem was the line: >> -<ProductFeatureCategory productFeatureCategoryId="IMAGE" description="Image"/> >> +<ProductFeatureCategory productFeatureCategoryI="IMAGE" description="Image"/> I have fixed it. Even without reviewing this big commit, this kind of errors (that imply that very few tests were done) makes me feel nervous about the quality of the code committed. Jacopo On Dec 19, 2011, at 9:24 AM, Adrian Crum wrote: > This commit is throwing a lot of exceptions during data loading. See the buildbot report. > > -Adrian > > On 12/19/2011 6:40 AM, [hidden email] wrote: >> Author: hansbak >> Date: Mon Dec 19 06:40:18 2011 >> New Revision: 1220622 >> >> URL: http://svn.apache.org/viewvc?rev=1220622&view=rev >> Log: >> new producttype: configurable product service, using inventory >> >> Modified: >> ofbiz/trunk/applications/manufacturing/data/ManufacturingExampleData.xml >> ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java >> ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java >> ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java >> ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Product.groovy >> ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl >> ofbiz/trunk/applications/product/data/ProductTypeData.xml >> ofbiz/trunk/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml >> ofbiz/trunk/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml >> ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java >> ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java >> ofbiz/trunk/specialpurpose/ecommerce/data/DemoProduct.xml >> >> Modified: ofbiz/trunk/applications/manufacturing/data/ManufacturingExampleData.xml >> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/data/ManufacturingExampleData.xml?rev=1220622&r1=1220621&r2=1220622&view=diff >> ============================================================================== >> --- ofbiz/trunk/applications/manufacturing/data/ManufacturingExampleData.xml (original) >> +++ ofbiz/trunk/applications/manufacturing/data/ManufacturingExampleData.xml Mon Dec 19 06:40:18 2011 >> @@ -45,6 +45,11 @@ under the License. >> <FixedAsset fixedAssetId="DEMO_PROD_EQUIPMT_2" fixedAssetName="Demo Production Equipment Two" fixedAssetTypeId="PRODUCTION_EQUIPMENT" dateAcquired="2005-01-01 00:01:00.0" expectedEndOfLife="2010-01-01" calendarId="DEMO_CALENDAR" salvageValue="50" purchaseCost="1000" purchaseCostUomId="USD"/> >> <FixedAssetGeoPoint fixedAssetId="DEMO_PROD_EQUIPMT_2" geoPointId="9000" fromDate="2009-01-09 00:00:00.000"/> >> >> +<FixedAsset fixedAssetId="DEMO_BOOK_GROUP" fixedAssetTypeId="GROUP_EQUIPMENT" fixedAssetName="Demo Book Group"/> >> +<FixedAssetGeoPoint fixedAssetId="DEMO_BOOK_GROUP" geoPointId="9000" fromDate="2011-08-02 00:00:00.000"/> >> +<FixedAsset fixedAssetId="DEMO_BOOK" fixedAssetName="Demo Book" fixedAssetTypeId="PRODUCTION_EQUIPMENT" parentFixedAssetId="DEMO_BOOK_GROUP" calendarId="DEMO_CALENDAR" purchaseCost="200" purchaseCostUomId="USD"/> >> +<FixedAssetGeoPoint fixedAssetId="DEMO_BOOK" geoPointId="9000" fromDate="2011-08-02 00:00:00.000"/> >> + >> <FixedAssetDepMethod depreciationCustomMethodId="STR_LINE_DEP_FORMULA" fixedAssetId="DEMO_PROD_EQUIPMT_1"/> >> <FixedAssetDepMethod depreciationCustomMethodId="DBL_DECL_DEP_FORMULA" fixedAssetId="DEMO_PROD_EQUIPMT_2"/> >> </entity-engine-xml> >> >> Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java >> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java?rev=1220622&r1=1220621&r2=1220622&view=diff >> ============================================================================== >> --- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java (original) >> +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java Mon Dec 19 06:40:18 2011 >> @@ -1138,7 +1138,7 @@ public class OrderServices { >> String productId = (String) orderItem.get("productId"); >> GenericValue product = delegator.getRelatedOne("Product", orderItem); >> >> - if("SERVICE_PRODUCT".equals(product.get("productTypeId"))){ >> + if("SERVICE_PRODUCT".equals(product.get("productTypeId")) || "AGGREGATEDSERV_CONF".equals(product.get("productTypeId"))){ >> String inventoryFacilityId = null; >> if ("Y".equals(productStore.getString("oneInventoryFacility"))) { >> inventoryFacilityId = productStore.getString("inventoryFacilityId"); >> >> Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java >> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java?rev=1220622&r1=1220621&r2=1220622&view=diff >> ============================================================================== >> --- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java (original) >> +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java Mon Dec 19 06:40:18 2011 >> @@ -644,7 +644,7 @@ public class CheckOutHelper { >> GenericValue permUserLogin = delegator.findByPrimaryKeyCache("UserLogin", UtilMisc.toMap("userLoginId", "system")); >> GenericValue productStore = ProductStoreWorker.getProductStore(productStoreId, delegator); >> GenericValue product = delegator.findByPrimaryKey("Product", UtilMisc.toMap("productId", productId)); >> - if ("AGGREGATED_CONF".equals(product.getString("productTypeId"))) { >> + if ("AGGREGATED_CONF".equals(product.getString("productTypeId")) || "AGGREGATEDSERV_CONF".equals(product.getString("productTypeId"))) { >> org.ofbiz.product.config.ProductConfigWrapper config = this.cart.findCartItem(counter).getConfigWrapper(); >> Map<String, Object> inputMap = new HashMap<String, Object>(); >> inputMap.put("config", config); >> >> Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java >> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java?rev=1220622&r1=1220621&r2=1220622&view=diff >> ============================================================================== >> --- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java (original) >> +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java Mon Dec 19 06:40:18 2011 >> @@ -3430,7 +3430,11 @@ public class ShoppingCart implements Ite >> serviceContext.put("internalName", internalName); >> serviceContext.put("productName", productName); >> serviceContext.put("description", description); >> - serviceContext.put("productTypeId", "AGGREGATED_CONF"); >> + if(ProductWorker.isAggregateService(delegator, item.getProductId())) >> + serviceContext.put("productTypeId", "AGGREGATEDSERV_CONF"); >> + else >> + serviceContext.put("productTypeId", "AGGREGATED_CONF"); >> + >> serviceContext.put("configId", configId); >> if (UtilValidate.isNotEmpty(product.getString("requirementMethodEnumId"))) { >> serviceContext.put("requirementMethodEnumId", product.getString("requirementMethodEnumId")); >> >> Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Product.groovy >> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Product.groovy?rev=1220622&r1=1220621&r2=1220622&view=diff >> ============================================================================== >> --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Product.groovy (original) >> +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Product.groovy Mon Dec 19 06:40:18 2011 >> @@ -124,7 +124,7 @@ if (productId) { >> } >> >> // Set the default template for aggregated product (product component configurator ui) >> - if (product.productTypeId&& "AGGREGATED".equals(product.productTypeId)&& context.configproductdetailScreen) { >> + if (product.productTypeId&& ("AGGREGATED".equals(product.productTypeId) || "AGGREGATED_SERVICE".equals(product.productTypeId))&& context.configproductdetailScreen) { >> detailScreen = context.configproductdetailScreen; >> } >> >> >> Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl >> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl?rev=1220622&r1=1220621&r2=1220622&view=diff >> ============================================================================== >> --- ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl (original) >> +++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl Mon Dec 19 06:40:18 2011 >> @@ -101,7 +101,7 @@ ${virtualJavaScript?if_exists} >> <#elseif product.productTypeId?if_exists == "ASSET_USAGE"> >> <a href="${productUrl}" class="buttontext">${uiLabelMap.OrderMakeBooking}...</a> >> <#-- check to see if it is an aggregated or configurable product; will enter parameters on the detail screen--> >> -<#elseif product.productTypeId?if_exists == "AGGREGATED"> >> +<#elseif product.productTypeId?if_exists == "AGGREGATED" || product.productTypeId?if_exists == "AGGREGATED_SERVICE"> >> <a href="${productUrl}" class="buttontext">${uiLabelMap.OrderConfigure}...</a> >> <#-- check to see if the product is a virtual product --> >> <#elseif product.isVirtual?exists&& product.isVirtual == "Y"> >> >> Modified: ofbiz/trunk/applications/product/data/ProductTypeData.xml >> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/data/ProductTypeData.xml?rev=1220622&r1=1220621&r2=1220622&view=diff >> ============================================================================== >> --- ofbiz/trunk/applications/product/data/ProductTypeData.xml (original) >> +++ ofbiz/trunk/applications/product/data/ProductTypeData.xml Mon Dec 19 06:40:18 2011 >> @@ -500,7 +500,9 @@ under the License. >> <ProductType description="Work In Process" isPhysical="Y" isDigital="N" hasTable="N" parentTypeId="GOOD" productTypeId="WIP"/> >> <ProductType description="Configurable Good Configuration" isPhysical="Y" isDigital="N" hasTable="N" parentTypeId="AGGREGATED" productTypeId="AGGREGATED_CONF"/> >> <ProductType description="Fixed Asset Usage For Rental of an asset which is shipped from and returned to inventory" isPhysical="Y" isDigital="N" hasTable="N" parentTypeId="" productTypeId="ASSET_USAGE_OUT_IN"/> >> -<ProductType description="Service a product which is received to- and shipped from inventory" isPhysical="Y" isDigital="N" hasTable="N" parentTypeId="" productTypeId="SERVICE_PRODUCT"/> >> +<ProductType description="Service a product using inventory" isPhysical="Y" isDigital="N" hasTable="N" parentTypeId="" productTypeId="SERVICE_PRODUCT"/> >> +<ProductType description="Configurable Service using inventory" isPhysical="Y" isDigital="N" hasTable="N" parentTypeId="SERVICE_PRODUCT" productTypeId="AGGREGATED_SERVICE"/> >> +<ProductType description="Configurable Service Configuration" isPhysical="Y" isDigital="N" hasTable="N" parentTypeId="AGGREGATED_SERVICE" productTypeId="AGGREGATEDSERV_CONF"/> >> >> <EnumerationType description="Product Requirement Method" enumTypeId="PROD_REQ_METHOD" hasTable="N" parentTypeId=""/> >> <!-- NONE: no requirement is created (default) --> >> @@ -618,7 +620,7 @@ under the License. >> <StatusItem description="Approved" sequenceId="02" statusCode="APPROVED" statusId="IM_APPROVED" statusTypeId="IMAGE_MANAGEMENT_ST"/> >> <StatusItem description="Rejected" sequenceId="03" statusCode="REJECTED" statusId="IM_REJECTED" statusTypeId="IMAGE_MANAGEMENT_ST"/> >> >> -<ProductFeatureCategory productFeatureCategoryId="IMAGE" description="Image"/> >> +<ProductFeatureCategory productFeatureCategoryI="IMAGE" description="Image"/> >> <ProductFeatureCategory productFeatureCategoryId="TEXT" description="Text"/> >> >> <ProductFeature productFeatureId="IMAGE_AVATAR" productFeatureTypeId="SIZE" productFeatureCategoryId="IMAGE" description="100 X 75 (avatar)" defaultSequenceNum="1"/> >> >> Modified: ofbiz/trunk/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml >> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml?rev=1220622&r1=1220621&r2=1220622&view=diff >> ============================================================================== >> --- ofbiz/trunk/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml (original) >> +++ ofbiz/trunk/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml Mon Dec 19 06:40:18 2011 >> @@ -53,6 +53,7 @@ under the License. >> <or> >> <if-compare field="product.productTypeId" operator="equals" value="SERVICE_PRODUCT"/> >> <if-compare field="product.productTypeId" operator="equals" value="ASSET_USAGE_OUT_IN"/> >> +<if-compare field="product.productTypeId" operator="equals" value="AGGREGATEDSERV_CONF"/> >> </or> >> </condition> >> <then> >> >> Modified: ofbiz/trunk/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml >> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml?rev=1220622&r1=1220621&r2=1220622&view=diff >> ============================================================================== >> --- ofbiz/trunk/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml (original) >> +++ ofbiz/trunk/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml Mon Dec 19 06:40:18 2011 >> @@ -53,6 +53,7 @@ under the License. >> <or> >> <if-compare field="product.productTypeId" operator="equals" value="SERVICE_PRODUCT"/> >> <if-compare field="product.productTypeId" operator="equals" value="ASSET_USAGE_OUT_IN"/> >> +<if-compare field="product.productTypeId" operator="equals" value="AGGREGATEDSERV_CONF"/> >> </or> >> </condition> >> <then> >> >> Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java >> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java?rev=1220622&r1=1220621&r2=1220622&view=diff >> ============================================================================== >> --- ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java (original) >> +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java Mon Dec 19 06:40:18 2011 >> @@ -97,7 +97,7 @@ public class ProductConfigWrapper implem >> >> private void init(Delegator delegator, LocalDispatcher dispatcher, String productId, String productStoreId, String catalogId, String webSiteId, String currencyUomId, Locale locale, GenericValue autoUserLogin) throws Exception { >> product = delegator.findByPrimaryKey("Product", UtilMisc.toMap("productId", productId)); >> - if (product == null || !product.getString("productTypeId").equals("AGGREGATED")) { >> + if (product == null || !product.getString("productTypeId").equals("AGGREGATED")&& !product.getString("productTypeId").equals("AGGREGATED_SERVICE")) { >> throw new ProductConfigWrapperException("Product " + productId + " is not an AGGREGATED product."); >> } >> this.dispatcher = dispatcher; >> @@ -123,7 +123,7 @@ public class ProductConfigWrapper implem >> basePrice = price; >> } >> questions = FastList.newInstance(); >> - if ("AGGREGATED".equals(product.getString("productTypeId"))) { >> + if ("AGGREGATED".equals(product.getString("productTypeId")) || "AGGREGATED_SERVICE".equals(product.getString("productTypeId"))) { >> List<GenericValue> questionsValues = delegator.findByAnd("ProductConfig", UtilMisc.toMap("productId", productId), UtilMisc.toList("sequenceNum")); >> questionsValues = EntityUtil.filterByDate(questionsValues); >> Set<String> itemIds = FastSet.newInstance(); >> >> Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java >> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java?rev=1220622&r1=1220621&r2=1220622&view=diff >> ============================================================================== >> --- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java (original) >> +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java Mon Dec 19 06:40:18 2011 >> @@ -146,7 +146,7 @@ public class ProductWorker { >> public static String getInstanceAggregatedId(Delegator delegator, String instanceProductId) throws GenericEntityException { >> GenericValue instanceProduct = delegator.findByPrimaryKey("Product", UtilMisc.toMap("productId", instanceProductId)); >> >> - if (UtilValidate.isNotEmpty(instanceProduct)&& "AGGREGATED_CONF".equals(instanceProduct.getString("productTypeId"))) { >> + if (UtilValidate.isNotEmpty(instanceProduct)&& ("AGGREGATED_CONF".equals(instanceProduct.getString("productTypeId")) || "AGGREGATEDSERV_CONF".equals(instanceProduct.getString("productTypeId")))) { >> GenericValue productAssoc = EntityUtil.getFirst(EntityUtil.filterByDate(instanceProduct.getRelatedByAnd("AssocProductAssoc", >> UtilMisc.toMap("productAssocTypeId", "PRODUCT_CONF")))); >> if (UtilValidate.isNotEmpty(productAssoc)) { >> @@ -172,7 +172,7 @@ public class ProductWorker { >> public static List<GenericValue> getAggregatedAssocs(Delegator delegator, String aggregatedProductId) throws GenericEntityException { >> GenericValue aggregatedProduct = delegator.findByPrimaryKey("Product", UtilMisc.toMap("productId", aggregatedProductId)); >> >> - if (UtilValidate.isNotEmpty(aggregatedProduct)&& "AGGREGATED".equals(aggregatedProduct.getString("productTypeId"))) { >> + if (UtilValidate.isNotEmpty(aggregatedProduct)&& ("AGGREGATED".equals(aggregatedProduct.getString("productTypeId")) || "AGGREGATED_SERVICE".equals(aggregatedProduct.getString("productTypeId")))) { >> List<GenericValue> productAssocs = EntityUtil.filterByDate(aggregatedProduct.getRelatedByAnd("MainProductAssoc", >> UtilMisc.toMap("productAssocTypeId", "PRODUCT_CONF"))); >> return productAssocs; >> @@ -1193,4 +1193,16 @@ nextProd: >> return Boolean.TRUE; >> } >> >> + public static boolean isAggregateService(Delegator delegator, String aggregatedProductId) { >> + try { >> + GenericValue aggregatedProduct = delegator.findByPrimaryKeyCache("Product", UtilMisc.toMap("productId", aggregatedProductId)); >> + if (UtilValidate.isNotEmpty(aggregatedProduct)&& "AGGREGATED_SERVICE".equals(aggregatedProduct.getString("productTypeId"))) { >> + return true; >> + } >> + } catch (GenericEntityException e) { >> + Debug.logWarning(e.getMessage(), module); >> + } >> + >> + return false; >> + } >> } >> >> Modified: ofbiz/trunk/specialpurpose/ecommerce/data/DemoProduct.xml >> URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/data/DemoProduct.xml?rev=1220622&r1=1220621&r2=1220622&view=diff >> ============================================================================== >> --- ofbiz/trunk/specialpurpose/ecommerce/data/DemoProduct.xml (original) >> +++ ofbiz/trunk/specialpurpose/ecommerce/data/DemoProduct.xml Mon Dec 19 06:40:18 2011 >> @@ -737,6 +737,93 @@ under the License. >> <ContentAssoc contentId="SV-1001-ALT" contentIdTo="CSV-1001-ALTEN" contentAssocTypeId="ALTERNATE_LOCALE" fromDate="2011-08-02 12:00:00.0"/> >> <ProductContent productId="SV-1001" contentId="SV-1001-ALT" productContentTypeId="ALTERNATIVE_URL" fromDate="2011-08-02 12:00:00.0"/> >> >> +<!-- test for the configurable product type which is received to- and shipped from inventory--> >> +<Product productId="CFSV1001" productTypeId="AGGREGATED_SERVICE" primaryProductCategoryId="SERV-001" productName="Scanning book service" internalName="The configurable product type which is received to- and shipped from inventory" description="The configurable product type which is received to- and shipped from inventory for demonstration use" taxable="Y" chargeShipping="N" autoCreateKeywords="Y" isVirtual="N" isVariant="N" createdDate="2008-12-02 12:00:00.0" createdByUserLogin="admin" lastModifiedDate="2008-12-02 12:00:00.0" lastModifiedByUserLogin="admin"/> >> +<Product productId="SCAN_TYPE" productTypeId="SERVICE_PRODUCT" productName="Scanning Type" internalName="Scanning Type" description="Scanning Type" isVirtual="Y" isVariant="N" billOfMaterialLevel="0" createdDate="2004-08-20 12:50:54.794" createdByUserLogin="admin"/> >> +<Product productId="SCAN-EC" productTypeId="SERVICE_PRODUCT" internalName="Economy Scanning type" productName="Economy Scanning type" description="Economy Scanning type" returnable="N" includeInPromotions="N" taxable="N" chargeShipping="N" isVirtual="N" isVariant="Y" createdDate="2003-11-20 13:48:19.105" createdByUserLogin="admin" lastModifiedDate="2003-11-20 13:48:19.105" lastModifiedByUserLogin="admin"/> >> +<Product productId="SCAN-ST" productTypeId="SERVICE_PRODUCT" internalName="Standard Scanning type" productName="Standard Scanning type" description="Standard Scanning type" returnable="N" includeInPromotions="N" taxable="N" chargeShipping="N" isVirtual="N" isVariant="Y" createdDate="2003-11-20 13:48:19.105" createdByUserLogin="admin" lastModifiedDate="2003-11-20 13:48:19.105" lastModifiedByUserLogin="admin"/> >> +<Product productId="SCAN-SU" productTypeId="SERVICE_PRODUCT" internalName="Superfine Scanning type" productName="Superfine Scanning type" description="Superfine Scanning type" returnable="N" includeInPromotions="N" taxable="N" chargeShipping="N" isVirtual="N" isVariant="Y" createdDate="2003-11-20 13:48:19.105" createdByUserLogin="admin" lastModifiedDate="2003-11-20 13:48:19.105" lastModifiedByUserLogin="admin"/> >> + >> +<ProductFeatureCategory productFeatureCategoryId="SCAN_TYPE" description="Scanning Type"/> >> +<ProductFeature productFeatureId="ECONOMY" productFeatureTypeId="TYPE" productFeatureCategoryId="SCAN_TYPE" description="Economy Scan" defaultSequenceNum="1"/> >> +<ProductFeature productFeatureId="STANDARD" productFeatureTypeId="TYPE" productFeatureCategoryId="SCAN_TYPE" description="Standard Scan" defaultSequenceNum="2"/> >> +<ProductFeature productFeatureId="SUPERFINE" productFeatureTypeId="TYPE" productFeatureCategoryId="SCAN_TYPE" description="Superfine Scan" defaultSequenceNum="3"/> >> + >> +<Product productId="EXPRESS" productTypeId="SERVICE_PRODUCT" productName="Express" internalName="Express" description="Express" isVirtual="N" isVariant="N" billOfMaterialLevel="0" createdDate="2007-12-27 12:00:00.0" createdByUserLogin="admin"/> >> +<Product productId="SUPER_EXPRESS" productTypeId="SERVICE_PRODUCT" productName="Super Express" internalName="Super Express" description="Super Express" isVirtual="N" isVariant="N" billOfMaterialLevel="0" createdDate="2007-12-27 12:00:00.0" createdByUserLogin="admin"/> >> +<Product productId="SCAN_COVER" productTypeId="SERVICE_PRODUCT" productName="Scan Cover" internalName="Scan Cover" description="Scan Cover" isVirtual="N" isVariant="N" billOfMaterialLevel="0" createdDate="2007-12-27 12:00:00.0" createdByUserLogin="admin"/> >> +<Product productId="OCR" productTypeId="SERVICE_PRODUCT" productName="OCR" internalName="OCR" description="OCR" isVirtual="N" isVariant="N" billOfMaterialLevel="0" createdDate="2007-12-27 12:00:00.0" createdByUserLogin="admin"/> >> +<Product productId="METADATA" productTypeId="SERVICE_PRODUCT" productName="Metadata" internalName="Metadata" description="Metadata" isVirtual="N" isVariant="N" billOfMaterialLevel="0" createdDate="2007-12-27 12:00:00.0" createdByUserLogin="admin"/> >> +<Product productId="DVD" productTypeId="SERVICE_PRODUCT" productName="DVD" internalName="DVD" description="DVD" isVirtual="N" isVariant="N" billOfMaterialLevel="0" createdDate="2007-12-27 12:00:00.0" createdByUserLogin="admin"/> >> + >> +<ProductAssoc productId="SCAN_TYPE" productIdTo="SCAN-EC" productAssocTypeId="PRODUCT_VARIANT" fromDate="2011-08-02 12:00:00.0"/> >> +<ProductAssoc productId="SCAN_TYPE" productIdTo="SCAN-ST" productAssocTypeId="PRODUCT_VARIANT" fromDate="2011-08-02 12:00:00.0"/> >> +<ProductAssoc productId="SCAN_TYPE" productIdTo="SCAN-SU" productAssocTypeId="PRODUCT_VARIANT" fromDate="2011-08-02 12:00:00.0"/> >> + >> +<ProductFeatureAppl productId="SCAN_TYPE" productFeatureId="ECONOMY" productFeatureApplTypeId="SELECTABLE_FEATURE" fromDate="2011-08-02 12:00:00.0" sequenceNum="1"/> >> +<ProductFeatureAppl productId="SCAN_TYPE" productFeatureId="STANDARD" productFeatureApplTypeId="SELECTABLE_FEATURE" fromDate="2011-08-02 12:00:00.0" sequenceNum="2"/> >> +<ProductFeatureAppl productId="SCAN_TYPE" productFeatureId="SUPERFINE" productFeatureApplTypeId="SELECTABLE_FEATURE" fromDate="2011-08-02 12:00:00.0" sequenceNum="3"/> >> + >> +<ProductFeatureAppl productId="SCAN-EC" productFeatureId="ECONOMY" productFeatureApplTypeId="STANDARD_FEATURE" fromDate="2011-08-02 12:00:00.0" sequenceNum="1"/> >> +<ProductFeatureAppl productId="SCAN-ST" productFeatureId="STANDARD" productFeatureApplTypeId="STANDARD_FEATURE" fromDate="2011-08-02 12:00:00.0" sequenceNum="1"/> >> +<ProductFeatureAppl productId="SCAN-SU" productFeatureId="SUPERFINE" productFeatureApplTypeId="STANDARD_FEATURE" fromDate="2011-08-02 12:00:00.0" sequenceNum="1"/> >> + >> +<ProductPrice productId="CFSV1001" productPricePurposeId="PURCHASE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-08-02 12:00:00.0" price="9.99" createdDate="2011-08-02 12:00:00.0" createdByUserLogin="admin"/> >> +<ProductPrice productId="SCAN-EC" productPricePurposeId="PURCHASE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="1.00" createdDate="2011-01-01 00:00:00.0"/> >> +<ProductPrice productId="SCAN-EC" productPricePurposeId="COMPONENT_PRICE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="1.00" createdDate="2011-01-01 00:00:00.0"/> >> +<ProductPrice productId="SCAN-ST" productPricePurposeId="PURCHASE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="2.00" createdDate="2011-01-01 00:00:00.0"/> >> +<ProductPrice productId="SCAN-ST" productPricePurposeId="COMPONENT_PRICE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="2.00" createdDate="2011-01-01 00:00:00.0"/> >> +<ProductPrice productId="SCAN-SU" productPricePurposeId="PURCHASE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="3.00" createdDate="2011-01-01 00:00:00.0"/> >> +<ProductPrice productId="SCAN-SU" productPricePurposeId="COMPONENT_PRICE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="3.00" createdDate="2011-01-01 00:00:00.0"/> >> +<ProductPrice productId="EXPRESS" productPricePurposeId="COMPONENT_PRICE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="1.50" createdDate="2011-01-01 00:00:00.0"/> >> +<ProductPrice productId="SUPER_EXPRESS" productPricePurposeId="COMPONENT_PRICE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="3.00" createdDate="2011-01-01 00:00:00.0"/> >> +<ProductPrice productId="SCAN_COVER" productPricePurposeId="COMPONENT_PRICE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="1.00" createdDate="2011-01-01 00:00:00.0"/> >> +<ProductPrice productId="OCR" productPricePurposeId="COMPONENT_PRICE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="2.00" createdDate="2011-01-01 00:00:00.0"/> >> +<ProductPrice productId="METADATA" productPricePurposeId="COMPONENT_PRICE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="1.00" createdDate="2011-01-01 00:00:00.0"/> >> +<ProductPrice productId="DVD" productPricePurposeId="COMPONENT_PRICE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="0.25" createdDate="2011-01-01 00:00:00.0"/> >> + >> +<ProductConfigItem configItemId="SC00000" configItemTypeId="MULTIPLE" configItemName="Scanning Type" description="Select the scanning type :"/> >> +<ProductConfigItem configItemId="SCF0001" configItemTypeId="MULTIPLE" configItemName="Scanning Options" description="Scanning options :"/> >> + >> +<ProductConfigOption configItemId="SC00000" configOptionId="SCOP001" configOptionName="OPT0001" description="Scanning Type" sequenceNum="10"/> >> +<ProductConfigOption configItemId="SCF0001" configOptionId="SCOP006" configOptionName="OPT0006" description="Express" sequenceNum="10"/> >> +<ProductConfigOption configItemId="SCF0001" configOptionId="SCOP007" configOptionName="OPT0007" description="Super Express" sequenceNum="20"/> >> +<ProductConfigOption configItemId="SCF0001" configOptionId="SCOP008" configOptionName="OPT0008" description="Scan Cover" sequenceNum="30"/> >> +<ProductConfigOption configItemId="SCF0001" configOptionId="SCOP009" configOptionName="OPT0009" description="OCR" sequenceNum="40"/> >> +<ProductConfigOption configItemId="SCF0001" configOptionId="SCOP010" configOptionName="OPT0010" description="Metadata" sequenceNum="60"/> >> +<ProductConfigOption configItemId="SCF0001" configOptionId="SCOP011" configOptionName="OPT0011" description="DVD" sequenceNum="50"/> >> + >> +<ProductConfigProduct configItemId="SC00000" configOptionId="SCOP001" productId="SCAN_TYPE" quantity="1"/> >> +<ProductConfigProduct configItemId="SCF0001" configOptionId="SCOP006" productId="EXPRESS" quantity="1"/> >> +<ProductConfigProduct configItemId="SCF0001" configOptionId="SCOP007" productId="SUPER_EXPRESS" quantity="1"/> >> +<ProductConfigProduct configItemId="SCF0001" configOptionId="SCOP008" productId="SCAN_COVER" quantity="1"/> >> +<ProductConfigProduct configItemId="SCF0001" configOptionId="SCOP009" productId="OCR" quantity="1"/> >> +<ProductConfigProduct configItemId="SCF0001" configOptionId="SCOP010" productId="METADATA" quantity="1"/> >> +<ProductConfigProduct configItemId="SCF0001" configOptionId="SCOP011" productId="DVD" quantity="1"/> >> + >> +<ProductCategoryMember productCategoryId="SERV-001" productId="CFSV1001" fromDate="2011-08-02 12:00:00.0"/> >> +<ProductCategoryMember productCategoryId="CATALOG1_SEARCH" productId="CFSV1001" fromDate="2011-08-02 12:00:00.0"/> >> +<DataResource dataResourceId="CFSV1001-ALT" dataResourceTypeId="LINK" objectInfo="scanning-book-service-CFSV1001-p"/> >> +<DataResource dataResourceTypeId="ELECTRONIC_TEXT" dataResourceId="CFSV1001-ALT" localeString="en"/> >> +<DataResource dataResourceTypeId="ELECTRONIC_TEXT" dataResourceId="DRCFSV1001-ALTEN" localeString="en_US"/> >> +<ElectronicText dataResourceId="CFSV1001-ALT" textData="scanning-book-product"/> >> +<ElectronicText dataResourceId="DRCFSV1001-ALTEN" textData="scanning-book-product"/> >> + >> +<ProductConfig productId="CFSV1001" configItemId="SC00000" sequenceNum="10" fromDate="2011-01-01 00:00:00.0" description="Select the scanning type :" configTypeId="QUESTION" isMandatory="N"/> >> +<ProductConfig productId="CFSV1001" configItemId="SCF0001" sequenceNum="20" fromDate="2011-01-01 00:00:00.0" description="Scanning options :" configTypeId="QUESTION" isMandatory="N"/> >> + >> +<WorkEffort workEffortId="SCTASK01" workEffortTypeId="ROU_TASK" workEffortPurposeTypeId="ROU_ASSEMBLING" currentStatusId="ROU_ACTIVE" workEffortName="Stock out" description="Components" revisionNumber="1" fixedAssetId="DEMO_BOOK_GROUP" estimatedMilliSeconds="600000" estimatedSetupMillis="0"/> >> +<WorkEffort workEffortId="SCTASK02" workEffortTypeId="ROU_TASK" workEffortPurposeTypeId="ROU_ASSEMBLING" currentStatusId="ROU_ACTIVE" workEffortName="Preparation" description="Preparation" revisionNumber="1" fixedAssetId="DEMO_BOOK_GROUP" estimatedMilliSeconds="900000" estimatedSetupMillis="0"/> >> +<WorkEffort workEffortId="SCROUT01" workEffortTypeId="ROUTING" currentStatusId="ROU_ACTIVE" workEffortName="Pizza preparation" description="Scanning preparation" revisionNumber="1" quantityToProduce="0"/> >> +<WorkEffortGoodStandard workEffortId="SCROUT01" productId="CFSV1001" workEffortGoodStdTypeId="ROU_PROD_TEMPLATE" statusId="WEGS_CREATED" fromDate="2011-01-01 00:00:00.0"/> >> +<WorkEffortAssoc workEffortIdFrom="SCROUT01" workEffortIdTo="SCTASK01" workEffortAssocTypeId="ROUTING_COMPONENT" sequenceNum="10" fromDate="2011-01-01 00:00:00.0"/> >> +<WorkEffortAssoc workEffortIdFrom="SCROUT01" workEffortIdTo="SCTASK02" workEffortAssocTypeId="ROUTING_COMPONENT" sequenceNum="20" fromDate="2011-01-01 00:00:00.0"/> >> + >> +<Content contentId="CFSV1001-ALT" contentTypeId="DOCUMENT" dataResourceId="CFSV1001-ALT" localeString="en"/> >> +<Content contentId="CCFSV1001-ALTEN" contentTypeId="DOCUMENT" dataResourceId="DRCFSV1001-ALTEN" localeString="en_US"/> >> +<ContentAssoc contentId="CFSV1001-ALT" contentIdTo="CCFSV1001-ALTEN" contentAssocTypeId="ALTERNATE_LOCALE" fromDate="2011-08-02 12:00:00.0"/> >> +<ProductContent productId="CFSV1001" contentId="CFSV1001-ALT" productContentTypeId="ALTERNATIVE_URL" fromDate="2011-08-02 12:00:00.0"/> >> + >> <ProductFeatureCategory productFeatureCategoryId="8000" description="License Features"/> >> <ProductFeatureCategoryAppl productFeatureCategoryId="8000" productCategoryId="CATALOG1_SEARCH" fromDate="2001-05-13 12:00:00.0"/> >> >> >> |
I agree that it is troubling. The designs are questionable as well.
-Adrian On 12/19/2011 8:38 AM, Jacopo Cappellato wrote: > Yep, > > the problem was the line: > >>> -<ProductFeatureCategory productFeatureCategoryId="IMAGE" description="Image"/> >>> +<ProductFeatureCategory productFeatureCategoryI="IMAGE" description="Image"/> > I have fixed it. > Even without reviewing this big commit, this kind of errors (that imply that very few tests were done) makes me feel nervous about the quality of the code committed. > > Jacopo > > > On Dec 19, 2011, at 9:24 AM, Adrian Crum wrote: > >> This commit is throwing a lot of exceptions during data loading. See the buildbot report. >> >> -Adrian >> >> On 12/19/2011 6:40 AM, [hidden email] wrote: >>> Author: hansbak >>> Date: Mon Dec 19 06:40:18 2011 >>> New Revision: 1220622 >>> >>> URL: http://svn.apache.org/viewvc?rev=1220622&view=rev >>> Log: >>> new producttype: configurable product service, using inventory >>> >>> Modified: >>> ofbiz/trunk/applications/manufacturing/data/ManufacturingExampleData.xml >>> ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java >>> ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java >>> ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java >>> ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Product.groovy >>> ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl >>> ofbiz/trunk/applications/product/data/ProductTypeData.xml >>> ofbiz/trunk/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml >>> ofbiz/trunk/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml >>> ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java >>> ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java >>> ofbiz/trunk/specialpurpose/ecommerce/data/DemoProduct.xml >>> >>> Modified: ofbiz/trunk/applications/manufacturing/data/ManufacturingExampleData.xml >>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/data/ManufacturingExampleData.xml?rev=1220622&r1=1220621&r2=1220622&view=diff >>> ============================================================================== >>> --- ofbiz/trunk/applications/manufacturing/data/ManufacturingExampleData.xml (original) >>> +++ ofbiz/trunk/applications/manufacturing/data/ManufacturingExampleData.xml Mon Dec 19 06:40:18 2011 >>> @@ -45,6 +45,11 @@ under the License. >>> <FixedAsset fixedAssetId="DEMO_PROD_EQUIPMT_2" fixedAssetName="Demo Production Equipment Two" fixedAssetTypeId="PRODUCTION_EQUIPMENT" dateAcquired="2005-01-01 00:01:00.0" expectedEndOfLife="2010-01-01" calendarId="DEMO_CALENDAR" salvageValue="50" purchaseCost="1000" purchaseCostUomId="USD"/> >>> <FixedAssetGeoPoint fixedAssetId="DEMO_PROD_EQUIPMT_2" geoPointId="9000" fromDate="2009-01-09 00:00:00.000"/> >>> >>> +<FixedAsset fixedAssetId="DEMO_BOOK_GROUP" fixedAssetTypeId="GROUP_EQUIPMENT" fixedAssetName="Demo Book Group"/> >>> +<FixedAssetGeoPoint fixedAssetId="DEMO_BOOK_GROUP" geoPointId="9000" fromDate="2011-08-02 00:00:00.000"/> >>> +<FixedAsset fixedAssetId="DEMO_BOOK" fixedAssetName="Demo Book" fixedAssetTypeId="PRODUCTION_EQUIPMENT" parentFixedAssetId="DEMO_BOOK_GROUP" calendarId="DEMO_CALENDAR" purchaseCost="200" purchaseCostUomId="USD"/> >>> +<FixedAssetGeoPoint fixedAssetId="DEMO_BOOK" geoPointId="9000" fromDate="2011-08-02 00:00:00.000"/> >>> + >>> <FixedAssetDepMethod depreciationCustomMethodId="STR_LINE_DEP_FORMULA" fixedAssetId="DEMO_PROD_EQUIPMT_1"/> >>> <FixedAssetDepMethod depreciationCustomMethodId="DBL_DECL_DEP_FORMULA" fixedAssetId="DEMO_PROD_EQUIPMT_2"/> >>> </entity-engine-xml> >>> >>> Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java >>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java?rev=1220622&r1=1220621&r2=1220622&view=diff >>> ============================================================================== >>> --- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java (original) >>> +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java Mon Dec 19 06:40:18 2011 >>> @@ -1138,7 +1138,7 @@ public class OrderServices { >>> String productId = (String) orderItem.get("productId"); >>> GenericValue product = delegator.getRelatedOne("Product", orderItem); >>> >>> - if("SERVICE_PRODUCT".equals(product.get("productTypeId"))){ >>> + if("SERVICE_PRODUCT".equals(product.get("productTypeId")) || "AGGREGATEDSERV_CONF".equals(product.get("productTypeId"))){ >>> String inventoryFacilityId = null; >>> if ("Y".equals(productStore.getString("oneInventoryFacility"))) { >>> inventoryFacilityId = productStore.getString("inventoryFacilityId"); >>> >>> Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java >>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java?rev=1220622&r1=1220621&r2=1220622&view=diff >>> ============================================================================== >>> --- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java (original) >>> +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java Mon Dec 19 06:40:18 2011 >>> @@ -644,7 +644,7 @@ public class CheckOutHelper { >>> GenericValue permUserLogin = delegator.findByPrimaryKeyCache("UserLogin", UtilMisc.toMap("userLoginId", "system")); >>> GenericValue productStore = ProductStoreWorker.getProductStore(productStoreId, delegator); >>> GenericValue product = delegator.findByPrimaryKey("Product", UtilMisc.toMap("productId", productId)); >>> - if ("AGGREGATED_CONF".equals(product.getString("productTypeId"))) { >>> + if ("AGGREGATED_CONF".equals(product.getString("productTypeId")) || "AGGREGATEDSERV_CONF".equals(product.getString("productTypeId"))) { >>> org.ofbiz.product.config.ProductConfigWrapper config = this.cart.findCartItem(counter).getConfigWrapper(); >>> Map<String, Object> inputMap = new HashMap<String, Object>(); >>> inputMap.put("config", config); >>> >>> Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java >>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java?rev=1220622&r1=1220621&r2=1220622&view=diff >>> ============================================================================== >>> --- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java (original) >>> +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java Mon Dec 19 06:40:18 2011 >>> @@ -3430,7 +3430,11 @@ public class ShoppingCart implements Ite >>> serviceContext.put("internalName", internalName); >>> serviceContext.put("productName", productName); >>> serviceContext.put("description", description); >>> - serviceContext.put("productTypeId", "AGGREGATED_CONF"); >>> + if(ProductWorker.isAggregateService(delegator, item.getProductId())) >>> + serviceContext.put("productTypeId", "AGGREGATEDSERV_CONF"); >>> + else >>> + serviceContext.put("productTypeId", "AGGREGATED_CONF"); >>> + >>> serviceContext.put("configId", configId); >>> if (UtilValidate.isNotEmpty(product.getString("requirementMethodEnumId"))) { >>> serviceContext.put("requirementMethodEnumId", product.getString("requirementMethodEnumId")); >>> >>> Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Product.groovy >>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Product.groovy?rev=1220622&r1=1220621&r2=1220622&view=diff >>> ============================================================================== >>> --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Product.groovy (original) >>> +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Product.groovy Mon Dec 19 06:40:18 2011 >>> @@ -124,7 +124,7 @@ if (productId) { >>> } >>> >>> // Set the default template for aggregated product (product component configurator ui) >>> - if (product.productTypeId&& "AGGREGATED".equals(product.productTypeId)&& context.configproductdetailScreen) { >>> + if (product.productTypeId&& ("AGGREGATED".equals(product.productTypeId) || "AGGREGATED_SERVICE".equals(product.productTypeId))&& context.configproductdetailScreen) { >>> detailScreen = context.configproductdetailScreen; >>> } >>> >>> >>> Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl >>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl?rev=1220622&r1=1220621&r2=1220622&view=diff >>> ============================================================================== >>> --- ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl (original) >>> +++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl Mon Dec 19 06:40:18 2011 >>> @@ -101,7 +101,7 @@ ${virtualJavaScript?if_exists} >>> <#elseif product.productTypeId?if_exists == "ASSET_USAGE"> >>> <a href="${productUrl}" class="buttontext">${uiLabelMap.OrderMakeBooking}...</a> >>> <#-- check to see if it is an aggregated or configurable product; will enter parameters on the detail screen--> >>> -<#elseif product.productTypeId?if_exists == "AGGREGATED"> >>> +<#elseif product.productTypeId?if_exists == "AGGREGATED" || product.productTypeId?if_exists == "AGGREGATED_SERVICE"> >>> <a href="${productUrl}" class="buttontext">${uiLabelMap.OrderConfigure}...</a> >>> <#-- check to see if the product is a virtual product --> >>> <#elseif product.isVirtual?exists&& product.isVirtual == "Y"> >>> >>> Modified: ofbiz/trunk/applications/product/data/ProductTypeData.xml >>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/data/ProductTypeData.xml?rev=1220622&r1=1220621&r2=1220622&view=diff >>> ============================================================================== >>> --- ofbiz/trunk/applications/product/data/ProductTypeData.xml (original) >>> +++ ofbiz/trunk/applications/product/data/ProductTypeData.xml Mon Dec 19 06:40:18 2011 >>> @@ -500,7 +500,9 @@ under the License. >>> <ProductType description="Work In Process" isPhysical="Y" isDigital="N" hasTable="N" parentTypeId="GOOD" productTypeId="WIP"/> >>> <ProductType description="Configurable Good Configuration" isPhysical="Y" isDigital="N" hasTable="N" parentTypeId="AGGREGATED" productTypeId="AGGREGATED_CONF"/> >>> <ProductType description="Fixed Asset Usage For Rental of an asset which is shipped from and returned to inventory" isPhysical="Y" isDigital="N" hasTable="N" parentTypeId="" productTypeId="ASSET_USAGE_OUT_IN"/> >>> -<ProductType description="Service a product which is received to- and shipped from inventory" isPhysical="Y" isDigital="N" hasTable="N" parentTypeId="" productTypeId="SERVICE_PRODUCT"/> >>> +<ProductType description="Service a product using inventory" isPhysical="Y" isDigital="N" hasTable="N" parentTypeId="" productTypeId="SERVICE_PRODUCT"/> >>> +<ProductType description="Configurable Service using inventory" isPhysical="Y" isDigital="N" hasTable="N" parentTypeId="SERVICE_PRODUCT" productTypeId="AGGREGATED_SERVICE"/> >>> +<ProductType description="Configurable Service Configuration" isPhysical="Y" isDigital="N" hasTable="N" parentTypeId="AGGREGATED_SERVICE" productTypeId="AGGREGATEDSERV_CONF"/> >>> >>> <EnumerationType description="Product Requirement Method" enumTypeId="PROD_REQ_METHOD" hasTable="N" parentTypeId=""/> >>> <!-- NONE: no requirement is created (default) --> >>> @@ -618,7 +620,7 @@ under the License. >>> <StatusItem description="Approved" sequenceId="02" statusCode="APPROVED" statusId="IM_APPROVED" statusTypeId="IMAGE_MANAGEMENT_ST"/> >>> <StatusItem description="Rejected" sequenceId="03" statusCode="REJECTED" statusId="IM_REJECTED" statusTypeId="IMAGE_MANAGEMENT_ST"/> >>> >>> -<ProductFeatureCategory productFeatureCategoryId="IMAGE" description="Image"/> >>> +<ProductFeatureCategory productFeatureCategoryI="IMAGE" description="Image"/> >>> <ProductFeatureCategory productFeatureCategoryId="TEXT" description="Text"/> >>> >>> <ProductFeature productFeatureId="IMAGE_AVATAR" productFeatureTypeId="SIZE" productFeatureCategoryId="IMAGE" description="100 X 75 (avatar)" defaultSequenceNum="1"/> >>> >>> Modified: ofbiz/trunk/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml >>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml?rev=1220622&r1=1220621&r2=1220622&view=diff >>> ============================================================================== >>> --- ofbiz/trunk/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml (original) >>> +++ ofbiz/trunk/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml Mon Dec 19 06:40:18 2011 >>> @@ -53,6 +53,7 @@ under the License. >>> <or> >>> <if-compare field="product.productTypeId" operator="equals" value="SERVICE_PRODUCT"/> >>> <if-compare field="product.productTypeId" operator="equals" value="ASSET_USAGE_OUT_IN"/> >>> +<if-compare field="product.productTypeId" operator="equals" value="AGGREGATEDSERV_CONF"/> >>> </or> >>> </condition> >>> <then> >>> >>> Modified: ofbiz/trunk/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml >>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml?rev=1220622&r1=1220621&r2=1220622&view=diff >>> ============================================================================== >>> --- ofbiz/trunk/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml (original) >>> +++ ofbiz/trunk/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml Mon Dec 19 06:40:18 2011 >>> @@ -53,6 +53,7 @@ under the License. >>> <or> >>> <if-compare field="product.productTypeId" operator="equals" value="SERVICE_PRODUCT"/> >>> <if-compare field="product.productTypeId" operator="equals" value="ASSET_USAGE_OUT_IN"/> >>> +<if-compare field="product.productTypeId" operator="equals" value="AGGREGATEDSERV_CONF"/> >>> </or> >>> </condition> >>> <then> >>> >>> Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java >>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java?rev=1220622&r1=1220621&r2=1220622&view=diff >>> ============================================================================== >>> --- ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java (original) >>> +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java Mon Dec 19 06:40:18 2011 >>> @@ -97,7 +97,7 @@ public class ProductConfigWrapper implem >>> >>> private void init(Delegator delegator, LocalDispatcher dispatcher, String productId, String productStoreId, String catalogId, String webSiteId, String currencyUomId, Locale locale, GenericValue autoUserLogin) throws Exception { >>> product = delegator.findByPrimaryKey("Product", UtilMisc.toMap("productId", productId)); >>> - if (product == null || !product.getString("productTypeId").equals("AGGREGATED")) { >>> + if (product == null || !product.getString("productTypeId").equals("AGGREGATED")&& !product.getString("productTypeId").equals("AGGREGATED_SERVICE")) { >>> throw new ProductConfigWrapperException("Product " + productId + " is not an AGGREGATED product."); >>> } >>> this.dispatcher = dispatcher; >>> @@ -123,7 +123,7 @@ public class ProductConfigWrapper implem >>> basePrice = price; >>> } >>> questions = FastList.newInstance(); >>> - if ("AGGREGATED".equals(product.getString("productTypeId"))) { >>> + if ("AGGREGATED".equals(product.getString("productTypeId")) || "AGGREGATED_SERVICE".equals(product.getString("productTypeId"))) { >>> List<GenericValue> questionsValues = delegator.findByAnd("ProductConfig", UtilMisc.toMap("productId", productId), UtilMisc.toList("sequenceNum")); >>> questionsValues = EntityUtil.filterByDate(questionsValues); >>> Set<String> itemIds = FastSet.newInstance(); >>> >>> Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java >>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java?rev=1220622&r1=1220621&r2=1220622&view=diff >>> ============================================================================== >>> --- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java (original) >>> +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java Mon Dec 19 06:40:18 2011 >>> @@ -146,7 +146,7 @@ public class ProductWorker { >>> public static String getInstanceAggregatedId(Delegator delegator, String instanceProductId) throws GenericEntityException { >>> GenericValue instanceProduct = delegator.findByPrimaryKey("Product", UtilMisc.toMap("productId", instanceProductId)); >>> >>> - if (UtilValidate.isNotEmpty(instanceProduct)&& "AGGREGATED_CONF".equals(instanceProduct.getString("productTypeId"))) { >>> + if (UtilValidate.isNotEmpty(instanceProduct)&& ("AGGREGATED_CONF".equals(instanceProduct.getString("productTypeId")) || "AGGREGATEDSERV_CONF".equals(instanceProduct.getString("productTypeId")))) { >>> GenericValue productAssoc = EntityUtil.getFirst(EntityUtil.filterByDate(instanceProduct.getRelatedByAnd("AssocProductAssoc", >>> UtilMisc.toMap("productAssocTypeId", "PRODUCT_CONF")))); >>> if (UtilValidate.isNotEmpty(productAssoc)) { >>> @@ -172,7 +172,7 @@ public class ProductWorker { >>> public static List<GenericValue> getAggregatedAssocs(Delegator delegator, String aggregatedProductId) throws GenericEntityException { >>> GenericValue aggregatedProduct = delegator.findByPrimaryKey("Product", UtilMisc.toMap("productId", aggregatedProductId)); >>> >>> - if (UtilValidate.isNotEmpty(aggregatedProduct)&& "AGGREGATED".equals(aggregatedProduct.getString("productTypeId"))) { >>> + if (UtilValidate.isNotEmpty(aggregatedProduct)&& ("AGGREGATED".equals(aggregatedProduct.getString("productTypeId")) || "AGGREGATED_SERVICE".equals(aggregatedProduct.getString("productTypeId")))) { >>> List<GenericValue> productAssocs = EntityUtil.filterByDate(aggregatedProduct.getRelatedByAnd("MainProductAssoc", >>> UtilMisc.toMap("productAssocTypeId", "PRODUCT_CONF"))); >>> return productAssocs; >>> @@ -1193,4 +1193,16 @@ nextProd: >>> return Boolean.TRUE; >>> } >>> >>> + public static boolean isAggregateService(Delegator delegator, String aggregatedProductId) { >>> + try { >>> + GenericValue aggregatedProduct = delegator.findByPrimaryKeyCache("Product", UtilMisc.toMap("productId", aggregatedProductId)); >>> + if (UtilValidate.isNotEmpty(aggregatedProduct)&& "AGGREGATED_SERVICE".equals(aggregatedProduct.getString("productTypeId"))) { >>> + return true; >>> + } >>> + } catch (GenericEntityException e) { >>> + Debug.logWarning(e.getMessage(), module); >>> + } >>> + >>> + return false; >>> + } >>> } >>> >>> Modified: ofbiz/trunk/specialpurpose/ecommerce/data/DemoProduct.xml >>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/data/DemoProduct.xml?rev=1220622&r1=1220621&r2=1220622&view=diff >>> ============================================================================== >>> --- ofbiz/trunk/specialpurpose/ecommerce/data/DemoProduct.xml (original) >>> +++ ofbiz/trunk/specialpurpose/ecommerce/data/DemoProduct.xml Mon Dec 19 06:40:18 2011 >>> @@ -737,6 +737,93 @@ under the License. >>> <ContentAssoc contentId="SV-1001-ALT" contentIdTo="CSV-1001-ALTEN" contentAssocTypeId="ALTERNATE_LOCALE" fromDate="2011-08-02 12:00:00.0"/> >>> <ProductContent productId="SV-1001" contentId="SV-1001-ALT" productContentTypeId="ALTERNATIVE_URL" fromDate="2011-08-02 12:00:00.0"/> >>> >>> +<!-- test for the configurable product type which is received to- and shipped from inventory--> >>> +<Product productId="CFSV1001" productTypeId="AGGREGATED_SERVICE" primaryProductCategoryId="SERV-001" productName="Scanning book service" internalName="The configurable product type which is received to- and shipped from inventory" description="The configurable product type which is received to- and shipped from inventory for demonstration use" taxable="Y" chargeShipping="N" autoCreateKeywords="Y" isVirtual="N" isVariant="N" createdDate="2008-12-02 12:00:00.0" createdByUserLogin="admin" lastModifiedDate="2008-12-02 12:00:00.0" lastModifiedByUserLogin="admin"/> >>> +<Product productId="SCAN_TYPE" productTypeId="SERVICE_PRODUCT" productName="Scanning Type" internalName="Scanning Type" description="Scanning Type" isVirtual="Y" isVariant="N" billOfMaterialLevel="0" createdDate="2004-08-20 12:50:54.794" createdByUserLogin="admin"/> >>> +<Product productId="SCAN-EC" productTypeId="SERVICE_PRODUCT" internalName="Economy Scanning type" productName="Economy Scanning type" description="Economy Scanning type" returnable="N" includeInPromotions="N" taxable="N" chargeShipping="N" isVirtual="N" isVariant="Y" createdDate="2003-11-20 13:48:19.105" createdByUserLogin="admin" lastModifiedDate="2003-11-20 13:48:19.105" lastModifiedByUserLogin="admin"/> >>> +<Product productId="SCAN-ST" productTypeId="SERVICE_PRODUCT" internalName="Standard Scanning type" productName="Standard Scanning type" description="Standard Scanning type" returnable="N" includeInPromotions="N" taxable="N" chargeShipping="N" isVirtual="N" isVariant="Y" createdDate="2003-11-20 13:48:19.105" createdByUserLogin="admin" lastModifiedDate="2003-11-20 13:48:19.105" lastModifiedByUserLogin="admin"/> >>> +<Product productId="SCAN-SU" productTypeId="SERVICE_PRODUCT" internalName="Superfine Scanning type" productName="Superfine Scanning type" description="Superfine Scanning type" returnable="N" includeInPromotions="N" taxable="N" chargeShipping="N" isVirtual="N" isVariant="Y" createdDate="2003-11-20 13:48:19.105" createdByUserLogin="admin" lastModifiedDate="2003-11-20 13:48:19.105" lastModifiedByUserLogin="admin"/> >>> + >>> +<ProductFeatureCategory productFeatureCategoryId="SCAN_TYPE" description="Scanning Type"/> >>> +<ProductFeature productFeatureId="ECONOMY" productFeatureTypeId="TYPE" productFeatureCategoryId="SCAN_TYPE" description="Economy Scan" defaultSequenceNum="1"/> >>> +<ProductFeature productFeatureId="STANDARD" productFeatureTypeId="TYPE" productFeatureCategoryId="SCAN_TYPE" description="Standard Scan" defaultSequenceNum="2"/> >>> +<ProductFeature productFeatureId="SUPERFINE" productFeatureTypeId="TYPE" productFeatureCategoryId="SCAN_TYPE" description="Superfine Scan" defaultSequenceNum="3"/> >>> + >>> +<Product productId="EXPRESS" productTypeId="SERVICE_PRODUCT" productName="Express" internalName="Express" description="Express" isVirtual="N" isVariant="N" billOfMaterialLevel="0" createdDate="2007-12-27 12:00:00.0" createdByUserLogin="admin"/> >>> +<Product productId="SUPER_EXPRESS" productTypeId="SERVICE_PRODUCT" productName="Super Express" internalName="Super Express" description="Super Express" isVirtual="N" isVariant="N" billOfMaterialLevel="0" createdDate="2007-12-27 12:00:00.0" createdByUserLogin="admin"/> >>> +<Product productId="SCAN_COVER" productTypeId="SERVICE_PRODUCT" productName="Scan Cover" internalName="Scan Cover" description="Scan Cover" isVirtual="N" isVariant="N" billOfMaterialLevel="0" createdDate="2007-12-27 12:00:00.0" createdByUserLogin="admin"/> >>> +<Product productId="OCR" productTypeId="SERVICE_PRODUCT" productName="OCR" internalName="OCR" description="OCR" isVirtual="N" isVariant="N" billOfMaterialLevel="0" createdDate="2007-12-27 12:00:00.0" createdByUserLogin="admin"/> >>> +<Product productId="METADATA" productTypeId="SERVICE_PRODUCT" productName="Metadata" internalName="Metadata" description="Metadata" isVirtual="N" isVariant="N" billOfMaterialLevel="0" createdDate="2007-12-27 12:00:00.0" createdByUserLogin="admin"/> >>> +<Product productId="DVD" productTypeId="SERVICE_PRODUCT" productName="DVD" internalName="DVD" description="DVD" isVirtual="N" isVariant="N" billOfMaterialLevel="0" createdDate="2007-12-27 12:00:00.0" createdByUserLogin="admin"/> >>> + >>> +<ProductAssoc productId="SCAN_TYPE" productIdTo="SCAN-EC" productAssocTypeId="PRODUCT_VARIANT" fromDate="2011-08-02 12:00:00.0"/> >>> +<ProductAssoc productId="SCAN_TYPE" productIdTo="SCAN-ST" productAssocTypeId="PRODUCT_VARIANT" fromDate="2011-08-02 12:00:00.0"/> >>> +<ProductAssoc productId="SCAN_TYPE" productIdTo="SCAN-SU" productAssocTypeId="PRODUCT_VARIANT" fromDate="2011-08-02 12:00:00.0"/> >>> + >>> +<ProductFeatureAppl productId="SCAN_TYPE" productFeatureId="ECONOMY" productFeatureApplTypeId="SELECTABLE_FEATURE" fromDate="2011-08-02 12:00:00.0" sequenceNum="1"/> >>> +<ProductFeatureAppl productId="SCAN_TYPE" productFeatureId="STANDARD" productFeatureApplTypeId="SELECTABLE_FEATURE" fromDate="2011-08-02 12:00:00.0" sequenceNum="2"/> >>> +<ProductFeatureAppl productId="SCAN_TYPE" productFeatureId="SUPERFINE" productFeatureApplTypeId="SELECTABLE_FEATURE" fromDate="2011-08-02 12:00:00.0" sequenceNum="3"/> >>> + >>> +<ProductFeatureAppl productId="SCAN-EC" productFeatureId="ECONOMY" productFeatureApplTypeId="STANDARD_FEATURE" fromDate="2011-08-02 12:00:00.0" sequenceNum="1"/> >>> +<ProductFeatureAppl productId="SCAN-ST" productFeatureId="STANDARD" productFeatureApplTypeId="STANDARD_FEATURE" fromDate="2011-08-02 12:00:00.0" sequenceNum="1"/> >>> +<ProductFeatureAppl productId="SCAN-SU" productFeatureId="SUPERFINE" productFeatureApplTypeId="STANDARD_FEATURE" fromDate="2011-08-02 12:00:00.0" sequenceNum="1"/> >>> + >>> +<ProductPrice productId="CFSV1001" productPricePurposeId="PURCHASE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-08-02 12:00:00.0" price="9.99" createdDate="2011-08-02 12:00:00.0" createdByUserLogin="admin"/> >>> +<ProductPrice productId="SCAN-EC" productPricePurposeId="PURCHASE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="1.00" createdDate="2011-01-01 00:00:00.0"/> >>> +<ProductPrice productId="SCAN-EC" productPricePurposeId="COMPONENT_PRICE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="1.00" createdDate="2011-01-01 00:00:00.0"/> >>> +<ProductPrice productId="SCAN-ST" productPricePurposeId="PURCHASE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="2.00" createdDate="2011-01-01 00:00:00.0"/> >>> +<ProductPrice productId="SCAN-ST" productPricePurposeId="COMPONENT_PRICE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="2.00" createdDate="2011-01-01 00:00:00.0"/> >>> +<ProductPrice productId="SCAN-SU" productPricePurposeId="PURCHASE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="3.00" createdDate="2011-01-01 00:00:00.0"/> >>> +<ProductPrice productId="SCAN-SU" productPricePurposeId="COMPONENT_PRICE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="3.00" createdDate="2011-01-01 00:00:00.0"/> >>> +<ProductPrice productId="EXPRESS" productPricePurposeId="COMPONENT_PRICE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="1.50" createdDate="2011-01-01 00:00:00.0"/> >>> +<ProductPrice productId="SUPER_EXPRESS" productPricePurposeId="COMPONENT_PRICE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="3.00" createdDate="2011-01-01 00:00:00.0"/> >>> +<ProductPrice productId="SCAN_COVER" productPricePurposeId="COMPONENT_PRICE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="1.00" createdDate="2011-01-01 00:00:00.0"/> >>> +<ProductPrice productId="OCR" productPricePurposeId="COMPONENT_PRICE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="2.00" createdDate="2011-01-01 00:00:00.0"/> >>> +<ProductPrice productId="METADATA" productPricePurposeId="COMPONENT_PRICE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="1.00" createdDate="2011-01-01 00:00:00.0"/> >>> +<ProductPrice productId="DVD" productPricePurposeId="COMPONENT_PRICE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="0.25" createdDate="2011-01-01 00:00:00.0"/> >>> + >>> +<ProductConfigItem configItemId="SC00000" configItemTypeId="MULTIPLE" configItemName="Scanning Type" description="Select the scanning type :"/> >>> +<ProductConfigItem configItemId="SCF0001" configItemTypeId="MULTIPLE" configItemName="Scanning Options" description="Scanning options :"/> >>> + >>> +<ProductConfigOption configItemId="SC00000" configOptionId="SCOP001" configOptionName="OPT0001" description="Scanning Type" sequenceNum="10"/> >>> +<ProductConfigOption configItemId="SCF0001" configOptionId="SCOP006" configOptionName="OPT0006" description="Express" sequenceNum="10"/> >>> +<ProductConfigOption configItemId="SCF0001" configOptionId="SCOP007" configOptionName="OPT0007" description="Super Express" sequenceNum="20"/> >>> +<ProductConfigOption configItemId="SCF0001" configOptionId="SCOP008" configOptionName="OPT0008" description="Scan Cover" sequenceNum="30"/> >>> +<ProductConfigOption configItemId="SCF0001" configOptionId="SCOP009" configOptionName="OPT0009" description="OCR" sequenceNum="40"/> >>> +<ProductConfigOption configItemId="SCF0001" configOptionId="SCOP010" configOptionName="OPT0010" description="Metadata" sequenceNum="60"/> >>> +<ProductConfigOption configItemId="SCF0001" configOptionId="SCOP011" configOptionName="OPT0011" description="DVD" sequenceNum="50"/> >>> + >>> +<ProductConfigProduct configItemId="SC00000" configOptionId="SCOP001" productId="SCAN_TYPE" quantity="1"/> >>> +<ProductConfigProduct configItemId="SCF0001" configOptionId="SCOP006" productId="EXPRESS" quantity="1"/> >>> +<ProductConfigProduct configItemId="SCF0001" configOptionId="SCOP007" productId="SUPER_EXPRESS" quantity="1"/> >>> +<ProductConfigProduct configItemId="SCF0001" configOptionId="SCOP008" productId="SCAN_COVER" quantity="1"/> >>> +<ProductConfigProduct configItemId="SCF0001" configOptionId="SCOP009" productId="OCR" quantity="1"/> >>> +<ProductConfigProduct configItemId="SCF0001" configOptionId="SCOP010" productId="METADATA" quantity="1"/> >>> +<ProductConfigProduct configItemId="SCF0001" configOptionId="SCOP011" productId="DVD" quantity="1"/> >>> + >>> +<ProductCategoryMember productCategoryId="SERV-001" productId="CFSV1001" fromDate="2011-08-02 12:00:00.0"/> >>> +<ProductCategoryMember productCategoryId="CATALOG1_SEARCH" productId="CFSV1001" fromDate="2011-08-02 12:00:00.0"/> >>> +<DataResource dataResourceId="CFSV1001-ALT" dataResourceTypeId="LINK" objectInfo="scanning-book-service-CFSV1001-p"/> >>> +<DataResource dataResourceTypeId="ELECTRONIC_TEXT" dataResourceId="CFSV1001-ALT" localeString="en"/> >>> +<DataResource dataResourceTypeId="ELECTRONIC_TEXT" dataResourceId="DRCFSV1001-ALTEN" localeString="en_US"/> >>> +<ElectronicText dataResourceId="CFSV1001-ALT" textData="scanning-book-product"/> >>> +<ElectronicText dataResourceId="DRCFSV1001-ALTEN" textData="scanning-book-product"/> >>> + >>> +<ProductConfig productId="CFSV1001" configItemId="SC00000" sequenceNum="10" fromDate="2011-01-01 00:00:00.0" description="Select the scanning type :" configTypeId="QUESTION" isMandatory="N"/> >>> +<ProductConfig productId="CFSV1001" configItemId="SCF0001" sequenceNum="20" fromDate="2011-01-01 00:00:00.0" description="Scanning options :" configTypeId="QUESTION" isMandatory="N"/> >>> + >>> +<WorkEffort workEffortId="SCTASK01" workEffortTypeId="ROU_TASK" workEffortPurposeTypeId="ROU_ASSEMBLING" currentStatusId="ROU_ACTIVE" workEffortName="Stock out" description="Components" revisionNumber="1" fixedAssetId="DEMO_BOOK_GROUP" estimatedMilliSeconds="600000" estimatedSetupMillis="0"/> >>> +<WorkEffort workEffortId="SCTASK02" workEffortTypeId="ROU_TASK" workEffortPurposeTypeId="ROU_ASSEMBLING" currentStatusId="ROU_ACTIVE" workEffortName="Preparation" description="Preparation" revisionNumber="1" fixedAssetId="DEMO_BOOK_GROUP" estimatedMilliSeconds="900000" estimatedSetupMillis="0"/> >>> +<WorkEffort workEffortId="SCROUT01" workEffortTypeId="ROUTING" currentStatusId="ROU_ACTIVE" workEffortName="Pizza preparation" description="Scanning preparation" revisionNumber="1" quantityToProduce="0"/> >>> +<WorkEffortGoodStandard workEffortId="SCROUT01" productId="CFSV1001" workEffortGoodStdTypeId="ROU_PROD_TEMPLATE" statusId="WEGS_CREATED" fromDate="2011-01-01 00:00:00.0"/> >>> +<WorkEffortAssoc workEffortIdFrom="SCROUT01" workEffortIdTo="SCTASK01" workEffortAssocTypeId="ROUTING_COMPONENT" sequenceNum="10" fromDate="2011-01-01 00:00:00.0"/> >>> +<WorkEffortAssoc workEffortIdFrom="SCROUT01" workEffortIdTo="SCTASK02" workEffortAssocTypeId="ROUTING_COMPONENT" sequenceNum="20" fromDate="2011-01-01 00:00:00.0"/> >>> + >>> +<Content contentId="CFSV1001-ALT" contentTypeId="DOCUMENT" dataResourceId="CFSV1001-ALT" localeString="en"/> >>> +<Content contentId="CCFSV1001-ALTEN" contentTypeId="DOCUMENT" dataResourceId="DRCFSV1001-ALTEN" localeString="en_US"/> >>> +<ContentAssoc contentId="CFSV1001-ALT" contentIdTo="CCFSV1001-ALTEN" contentAssocTypeId="ALTERNATE_LOCALE" fromDate="2011-08-02 12:00:00.0"/> >>> +<ProductContent productId="CFSV1001" contentId="CFSV1001-ALT" productContentTypeId="ALTERNATIVE_URL" fromDate="2011-08-02 12:00:00.0"/> >>> + >>> <ProductFeatureCategory productFeatureCategoryId="8000" description="License Features"/> >>> <ProductFeatureCategoryAppl productFeatureCategoryId="8000" productCategoryId="CATALOG1_SEARCH" fromDate="2001-05-13 12:00:00.0"/> >>> >>> >>> |
In reply to this post by Jacopo Cappellato-4
Hi Jacopo,
thanks for helping me, it is good try to work together instead of personally accusing people. With the amount of commits we produce here at Antwebsystems, it can once in a while go wrong and have errors. I am setting up a Jenkins automated test system in our company to improve on the situation. I join other committers that we also worry about the amount of changes that go into the system which could introduce errors. On the other hand without them, it will quickly kill the OFBiz system. Perhaps in the future we should insist on having junit tests for new functions and enhancements to existing functions. Thanks again for your help, Regards, Hans On 12/19/2011 03:38 PM, Jacopo Cappellato wrote: > Yep, > > the problem was the line: > >>> -<ProductFeatureCategory productFeatureCategoryId="IMAGE" description="Image"/> >>> +<ProductFeatureCategory productFeatureCategoryI="IMAGE" description="Image"/> > I have fixed it. > Even without reviewing this big commit, this kind of errors (that imply that very few tests were done) makes me feel nervous about the quality of the code committed. > > Jacopo > > > On Dec 19, 2011, at 9:24 AM, Adrian Crum wrote: > >> This commit is throwing a lot of exceptions during data loading. See the buildbot report. >> >> -Adrian >> >> On 12/19/2011 6:40 AM, [hidden email] wrote: >>> Author: hansbak >>> Date: Mon Dec 19 06:40:18 2011 >>> New Revision: 1220622 >>> >>> URL: http://svn.apache.org/viewvc?rev=1220622&view=rev >>> Log: >>> new producttype: configurable product service, using inventory >>> >>> Modified: >>> ofbiz/trunk/applications/manufacturing/data/ManufacturingExampleData.xml >>> ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java >>> ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java >>> ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java >>> ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Product.groovy >>> ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl >>> ofbiz/trunk/applications/product/data/ProductTypeData.xml >>> ofbiz/trunk/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml >>> ofbiz/trunk/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml >>> ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java >>> ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java >>> ofbiz/trunk/specialpurpose/ecommerce/data/DemoProduct.xml >>> >>> Modified: ofbiz/trunk/applications/manufacturing/data/ManufacturingExampleData.xml >>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/data/ManufacturingExampleData.xml?rev=1220622&r1=1220621&r2=1220622&view=diff >>> ============================================================================== >>> --- ofbiz/trunk/applications/manufacturing/data/ManufacturingExampleData.xml (original) >>> +++ ofbiz/trunk/applications/manufacturing/data/ManufacturingExampleData.xml Mon Dec 19 06:40:18 2011 >>> @@ -45,6 +45,11 @@ under the License. >>> <FixedAsset fixedAssetId="DEMO_PROD_EQUIPMT_2" fixedAssetName="Demo Production Equipment Two" fixedAssetTypeId="PRODUCTION_EQUIPMENT" dateAcquired="2005-01-01 00:01:00.0" expectedEndOfLife="2010-01-01" calendarId="DEMO_CALENDAR" salvageValue="50" purchaseCost="1000" purchaseCostUomId="USD"/> >>> <FixedAssetGeoPoint fixedAssetId="DEMO_PROD_EQUIPMT_2" geoPointId="9000" fromDate="2009-01-09 00:00:00.000"/> >>> >>> +<FixedAsset fixedAssetId="DEMO_BOOK_GROUP" fixedAssetTypeId="GROUP_EQUIPMENT" fixedAssetName="Demo Book Group"/> >>> +<FixedAssetGeoPoint fixedAssetId="DEMO_BOOK_GROUP" geoPointId="9000" fromDate="2011-08-02 00:00:00.000"/> >>> +<FixedAsset fixedAssetId="DEMO_BOOK" fixedAssetName="Demo Book" fixedAssetTypeId="PRODUCTION_EQUIPMENT" parentFixedAssetId="DEMO_BOOK_GROUP" calendarId="DEMO_CALENDAR" purchaseCost="200" purchaseCostUomId="USD"/> >>> +<FixedAssetGeoPoint fixedAssetId="DEMO_BOOK" geoPointId="9000" fromDate="2011-08-02 00:00:00.000"/> >>> + >>> <FixedAssetDepMethod depreciationCustomMethodId="STR_LINE_DEP_FORMULA" fixedAssetId="DEMO_PROD_EQUIPMT_1"/> >>> <FixedAssetDepMethod depreciationCustomMethodId="DBL_DECL_DEP_FORMULA" fixedAssetId="DEMO_PROD_EQUIPMT_2"/> >>> </entity-engine-xml> >>> >>> Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java >>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java?rev=1220622&r1=1220621&r2=1220622&view=diff >>> ============================================================================== >>> --- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java (original) >>> +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java Mon Dec 19 06:40:18 2011 >>> @@ -1138,7 +1138,7 @@ public class OrderServices { >>> String productId = (String) orderItem.get("productId"); >>> GenericValue product = delegator.getRelatedOne("Product", orderItem); >>> >>> - if("SERVICE_PRODUCT".equals(product.get("productTypeId"))){ >>> + if("SERVICE_PRODUCT".equals(product.get("productTypeId")) || "AGGREGATEDSERV_CONF".equals(product.get("productTypeId"))){ >>> String inventoryFacilityId = null; >>> if ("Y".equals(productStore.getString("oneInventoryFacility"))) { >>> inventoryFacilityId = productStore.getString("inventoryFacilityId"); >>> >>> Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java >>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java?rev=1220622&r1=1220621&r2=1220622&view=diff >>> ============================================================================== >>> --- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java (original) >>> +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/CheckOutHelper.java Mon Dec 19 06:40:18 2011 >>> @@ -644,7 +644,7 @@ public class CheckOutHelper { >>> GenericValue permUserLogin = delegator.findByPrimaryKeyCache("UserLogin", UtilMisc.toMap("userLoginId", "system")); >>> GenericValue productStore = ProductStoreWorker.getProductStore(productStoreId, delegator); >>> GenericValue product = delegator.findByPrimaryKey("Product", UtilMisc.toMap("productId", productId)); >>> - if ("AGGREGATED_CONF".equals(product.getString("productTypeId"))) { >>> + if ("AGGREGATED_CONF".equals(product.getString("productTypeId")) || "AGGREGATEDSERV_CONF".equals(product.getString("productTypeId"))) { >>> org.ofbiz.product.config.ProductConfigWrapper config = this.cart.findCartItem(counter).getConfigWrapper(); >>> Map<String, Object> inputMap = new HashMap<String, Object>(); >>> inputMap.put("config", config); >>> >>> Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java >>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java?rev=1220622&r1=1220621&r2=1220622&view=diff >>> ============================================================================== >>> --- ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java (original) >>> +++ ofbiz/trunk/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCart.java Mon Dec 19 06:40:18 2011 >>> @@ -3430,7 +3430,11 @@ public class ShoppingCart implements Ite >>> serviceContext.put("internalName", internalName); >>> serviceContext.put("productName", productName); >>> serviceContext.put("description", description); >>> - serviceContext.put("productTypeId", "AGGREGATED_CONF"); >>> + if(ProductWorker.isAggregateService(delegator, item.getProductId())) >>> + serviceContext.put("productTypeId", "AGGREGATEDSERV_CONF"); >>> + else >>> + serviceContext.put("productTypeId", "AGGREGATED_CONF"); >>> + >>> serviceContext.put("configId", configId); >>> if (UtilValidate.isNotEmpty(product.getString("requirementMethodEnumId"))) { >>> serviceContext.put("requirementMethodEnumId", product.getString("requirementMethodEnumId")); >>> >>> Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Product.groovy >>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Product.groovy?rev=1220622&r1=1220621&r2=1220622&view=diff >>> ============================================================================== >>> --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Product.groovy (original) >>> +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Product.groovy Mon Dec 19 06:40:18 2011 >>> @@ -124,7 +124,7 @@ if (productId) { >>> } >>> >>> // Set the default template for aggregated product (product component configurator ui) >>> - if (product.productTypeId&& "AGGREGATED".equals(product.productTypeId)&& context.configproductdetailScreen) { >>> + if (product.productTypeId&& ("AGGREGATED".equals(product.productTypeId) || "AGGREGATED_SERVICE".equals(product.productTypeId))&& context.configproductdetailScreen) { >>> detailScreen = context.configproductdetailScreen; >>> } >>> >>> >>> Modified: ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl >>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl?rev=1220622&r1=1220621&r2=1220622&view=diff >>> ============================================================================== >>> --- ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl (original) >>> +++ ofbiz/trunk/applications/order/webapp/ordermgr/entry/catalog/productsummary.ftl Mon Dec 19 06:40:18 2011 >>> @@ -101,7 +101,7 @@ ${virtualJavaScript?if_exists} >>> <#elseif product.productTypeId?if_exists == "ASSET_USAGE"> >>> <a href="${productUrl}" class="buttontext">${uiLabelMap.OrderMakeBooking}...</a> >>> <#-- check to see if it is an aggregated or configurable product; will enter parameters on the detail screen--> >>> -<#elseif product.productTypeId?if_exists == "AGGREGATED"> >>> +<#elseif product.productTypeId?if_exists == "AGGREGATED" || product.productTypeId?if_exists == "AGGREGATED_SERVICE"> >>> <a href="${productUrl}" class="buttontext">${uiLabelMap.OrderConfigure}...</a> >>> <#-- check to see if the product is a virtual product --> >>> <#elseif product.isVirtual?exists&& product.isVirtual == "Y"> >>> >>> Modified: ofbiz/trunk/applications/product/data/ProductTypeData.xml >>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/data/ProductTypeData.xml?rev=1220622&r1=1220621&r2=1220622&view=diff >>> ============================================================================== >>> --- ofbiz/trunk/applications/product/data/ProductTypeData.xml (original) >>> +++ ofbiz/trunk/applications/product/data/ProductTypeData.xml Mon Dec 19 06:40:18 2011 >>> @@ -500,7 +500,9 @@ under the License. >>> <ProductType description="Work In Process" isPhysical="Y" isDigital="N" hasTable="N" parentTypeId="GOOD" productTypeId="WIP"/> >>> <ProductType description="Configurable Good Configuration" isPhysical="Y" isDigital="N" hasTable="N" parentTypeId="AGGREGATED" productTypeId="AGGREGATED_CONF"/> >>> <ProductType description="Fixed Asset Usage For Rental of an asset which is shipped from and returned to inventory" isPhysical="Y" isDigital="N" hasTable="N" parentTypeId="" productTypeId="ASSET_USAGE_OUT_IN"/> >>> -<ProductType description="Service a product which is received to- and shipped from inventory" isPhysical="Y" isDigital="N" hasTable="N" parentTypeId="" productTypeId="SERVICE_PRODUCT"/> >>> +<ProductType description="Service a product using inventory" isPhysical="Y" isDigital="N" hasTable="N" parentTypeId="" productTypeId="SERVICE_PRODUCT"/> >>> +<ProductType description="Configurable Service using inventory" isPhysical="Y" isDigital="N" hasTable="N" parentTypeId="SERVICE_PRODUCT" productTypeId="AGGREGATED_SERVICE"/> >>> +<ProductType description="Configurable Service Configuration" isPhysical="Y" isDigital="N" hasTable="N" parentTypeId="AGGREGATED_SERVICE" productTypeId="AGGREGATEDSERV_CONF"/> >>> >>> <EnumerationType description="Product Requirement Method" enumTypeId="PROD_REQ_METHOD" hasTable="N" parentTypeId=""/> >>> <!-- NONE: no requirement is created (default) --> >>> @@ -618,7 +620,7 @@ under the License. >>> <StatusItem description="Approved" sequenceId="02" statusCode="APPROVED" statusId="IM_APPROVED" statusTypeId="IMAGE_MANAGEMENT_ST"/> >>> <StatusItem description="Rejected" sequenceId="03" statusCode="REJECTED" statusId="IM_REJECTED" statusTypeId="IMAGE_MANAGEMENT_ST"/> >>> >>> -<ProductFeatureCategory productFeatureCategoryId="IMAGE" description="Image"/> >>> +<ProductFeatureCategory productFeatureCategoryI="IMAGE" description="Image"/> >>> <ProductFeatureCategory productFeatureCategoryId="TEXT" description="Text"/> >>> >>> <ProductFeature productFeatureId="IMAGE_AVATAR" productFeatureTypeId="SIZE" productFeatureCategoryId="IMAGE" description="100 X 75 (avatar)" defaultSequenceNum="1"/> >>> >>> Modified: ofbiz/trunk/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml >>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml?rev=1220622&r1=1220621&r2=1220622&view=diff >>> ============================================================================== >>> --- ofbiz/trunk/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml (original) >>> +++ ofbiz/trunk/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml Mon Dec 19 06:40:18 2011 >>> @@ -53,6 +53,7 @@ under the License. >>> <or> >>> <if-compare field="product.productTypeId" operator="equals" value="SERVICE_PRODUCT"/> >>> <if-compare field="product.productTypeId" operator="equals" value="ASSET_USAGE_OUT_IN"/> >>> +<if-compare field="product.productTypeId" operator="equals" value="AGGREGATEDSERV_CONF"/> >>> </or> >>> </condition> >>> <then> >>> >>> Modified: ofbiz/trunk/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml >>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml?rev=1220622&r1=1220621&r2=1220622&view=diff >>> ============================================================================== >>> --- ofbiz/trunk/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml (original) >>> +++ ofbiz/trunk/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml Mon Dec 19 06:40:18 2011 >>> @@ -53,6 +53,7 @@ under the License. >>> <or> >>> <if-compare field="product.productTypeId" operator="equals" value="SERVICE_PRODUCT"/> >>> <if-compare field="product.productTypeId" operator="equals" value="ASSET_USAGE_OUT_IN"/> >>> +<if-compare field="product.productTypeId" operator="equals" value="AGGREGATEDSERV_CONF"/> >>> </or> >>> </condition> >>> <then> >>> >>> Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java >>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java?rev=1220622&r1=1220621&r2=1220622&view=diff >>> ============================================================================== >>> --- ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java (original) >>> +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/config/ProductConfigWrapper.java Mon Dec 19 06:40:18 2011 >>> @@ -97,7 +97,7 @@ public class ProductConfigWrapper implem >>> >>> private void init(Delegator delegator, LocalDispatcher dispatcher, String productId, String productStoreId, String catalogId, String webSiteId, String currencyUomId, Locale locale, GenericValue autoUserLogin) throws Exception { >>> product = delegator.findByPrimaryKey("Product", UtilMisc.toMap("productId", productId)); >>> - if (product == null || !product.getString("productTypeId").equals("AGGREGATED")) { >>> + if (product == null || !product.getString("productTypeId").equals("AGGREGATED")&& !product.getString("productTypeId").equals("AGGREGATED_SERVICE")) { >>> throw new ProductConfigWrapperException("Product " + productId + " is not an AGGREGATED product."); >>> } >>> this.dispatcher = dispatcher; >>> @@ -123,7 +123,7 @@ public class ProductConfigWrapper implem >>> basePrice = price; >>> } >>> questions = FastList.newInstance(); >>> - if ("AGGREGATED".equals(product.getString("productTypeId"))) { >>> + if ("AGGREGATED".equals(product.getString("productTypeId")) || "AGGREGATED_SERVICE".equals(product.getString("productTypeId"))) { >>> List<GenericValue> questionsValues = delegator.findByAnd("ProductConfig", UtilMisc.toMap("productId", productId), UtilMisc.toList("sequenceNum")); >>> questionsValues = EntityUtil.filterByDate(questionsValues); >>> Set<String> itemIds = FastSet.newInstance(); >>> >>> Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java >>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java?rev=1220622&r1=1220621&r2=1220622&view=diff >>> ============================================================================== >>> --- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java (original) >>> +++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductWorker.java Mon Dec 19 06:40:18 2011 >>> @@ -146,7 +146,7 @@ public class ProductWorker { >>> public static String getInstanceAggregatedId(Delegator delegator, String instanceProductId) throws GenericEntityException { >>> GenericValue instanceProduct = delegator.findByPrimaryKey("Product", UtilMisc.toMap("productId", instanceProductId)); >>> >>> - if (UtilValidate.isNotEmpty(instanceProduct)&& "AGGREGATED_CONF".equals(instanceProduct.getString("productTypeId"))) { >>> + if (UtilValidate.isNotEmpty(instanceProduct)&& ("AGGREGATED_CONF".equals(instanceProduct.getString("productTypeId")) || "AGGREGATEDSERV_CONF".equals(instanceProduct.getString("productTypeId")))) { >>> GenericValue productAssoc = EntityUtil.getFirst(EntityUtil.filterByDate(instanceProduct.getRelatedByAnd("AssocProductAssoc", >>> UtilMisc.toMap("productAssocTypeId", "PRODUCT_CONF")))); >>> if (UtilValidate.isNotEmpty(productAssoc)) { >>> @@ -172,7 +172,7 @@ public class ProductWorker { >>> public static List<GenericValue> getAggregatedAssocs(Delegator delegator, String aggregatedProductId) throws GenericEntityException { >>> GenericValue aggregatedProduct = delegator.findByPrimaryKey("Product", UtilMisc.toMap("productId", aggregatedProductId)); >>> >>> - if (UtilValidate.isNotEmpty(aggregatedProduct)&& "AGGREGATED".equals(aggregatedProduct.getString("productTypeId"))) { >>> + if (UtilValidate.isNotEmpty(aggregatedProduct)&& ("AGGREGATED".equals(aggregatedProduct.getString("productTypeId")) || "AGGREGATED_SERVICE".equals(aggregatedProduct.getString("productTypeId")))) { >>> List<GenericValue> productAssocs = EntityUtil.filterByDate(aggregatedProduct.getRelatedByAnd("MainProductAssoc", >>> UtilMisc.toMap("productAssocTypeId", "PRODUCT_CONF"))); >>> return productAssocs; >>> @@ -1193,4 +1193,16 @@ nextProd: >>> return Boolean.TRUE; >>> } >>> >>> + public static boolean isAggregateService(Delegator delegator, String aggregatedProductId) { >>> + try { >>> + GenericValue aggregatedProduct = delegator.findByPrimaryKeyCache("Product", UtilMisc.toMap("productId", aggregatedProductId)); >>> + if (UtilValidate.isNotEmpty(aggregatedProduct)&& "AGGREGATED_SERVICE".equals(aggregatedProduct.getString("productTypeId"))) { >>> + return true; >>> + } >>> + } catch (GenericEntityException e) { >>> + Debug.logWarning(e.getMessage(), module); >>> + } >>> + >>> + return false; >>> + } >>> } >>> >>> Modified: ofbiz/trunk/specialpurpose/ecommerce/data/DemoProduct.xml >>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/data/DemoProduct.xml?rev=1220622&r1=1220621&r2=1220622&view=diff >>> ============================================================================== >>> --- ofbiz/trunk/specialpurpose/ecommerce/data/DemoProduct.xml (original) >>> +++ ofbiz/trunk/specialpurpose/ecommerce/data/DemoProduct.xml Mon Dec 19 06:40:18 2011 >>> @@ -737,6 +737,93 @@ under the License. >>> <ContentAssoc contentId="SV-1001-ALT" contentIdTo="CSV-1001-ALTEN" contentAssocTypeId="ALTERNATE_LOCALE" fromDate="2011-08-02 12:00:00.0"/> >>> <ProductContent productId="SV-1001" contentId="SV-1001-ALT" productContentTypeId="ALTERNATIVE_URL" fromDate="2011-08-02 12:00:00.0"/> >>> >>> +<!-- test for the configurable product type which is received to- and shipped from inventory--> >>> +<Product productId="CFSV1001" productTypeId="AGGREGATED_SERVICE" primaryProductCategoryId="SERV-001" productName="Scanning book service" internalName="The configurable product type which is received to- and shipped from inventory" description="The configurable product type which is received to- and shipped from inventory for demonstration use" taxable="Y" chargeShipping="N" autoCreateKeywords="Y" isVirtual="N" isVariant="N" createdDate="2008-12-02 12:00:00.0" createdByUserLogin="admin" lastModifiedDate="2008-12-02 12:00:00.0" lastModifiedByUserLogin="admin"/> >>> +<Product productId="SCAN_TYPE" productTypeId="SERVICE_PRODUCT" productName="Scanning Type" internalName="Scanning Type" description="Scanning Type" isVirtual="Y" isVariant="N" billOfMaterialLevel="0" createdDate="2004-08-20 12:50:54.794" createdByUserLogin="admin"/> >>> +<Product productId="SCAN-EC" productTypeId="SERVICE_PRODUCT" internalName="Economy Scanning type" productName="Economy Scanning type" description="Economy Scanning type" returnable="N" includeInPromotions="N" taxable="N" chargeShipping="N" isVirtual="N" isVariant="Y" createdDate="2003-11-20 13:48:19.105" createdByUserLogin="admin" lastModifiedDate="2003-11-20 13:48:19.105" lastModifiedByUserLogin="admin"/> >>> +<Product productId="SCAN-ST" productTypeId="SERVICE_PRODUCT" internalName="Standard Scanning type" productName="Standard Scanning type" description="Standard Scanning type" returnable="N" includeInPromotions="N" taxable="N" chargeShipping="N" isVirtual="N" isVariant="Y" createdDate="2003-11-20 13:48:19.105" createdByUserLogin="admin" lastModifiedDate="2003-11-20 13:48:19.105" lastModifiedByUserLogin="admin"/> >>> +<Product productId="SCAN-SU" productTypeId="SERVICE_PRODUCT" internalName="Superfine Scanning type" productName="Superfine Scanning type" description="Superfine Scanning type" returnable="N" includeInPromotions="N" taxable="N" chargeShipping="N" isVirtual="N" isVariant="Y" createdDate="2003-11-20 13:48:19.105" createdByUserLogin="admin" lastModifiedDate="2003-11-20 13:48:19.105" lastModifiedByUserLogin="admin"/> >>> + >>> +<ProductFeatureCategory productFeatureCategoryId="SCAN_TYPE" description="Scanning Type"/> >>> +<ProductFeature productFeatureId="ECONOMY" productFeatureTypeId="TYPE" productFeatureCategoryId="SCAN_TYPE" description="Economy Scan" defaultSequenceNum="1"/> >>> +<ProductFeature productFeatureId="STANDARD" productFeatureTypeId="TYPE" productFeatureCategoryId="SCAN_TYPE" description="Standard Scan" defaultSequenceNum="2"/> >>> +<ProductFeature productFeatureId="SUPERFINE" productFeatureTypeId="TYPE" productFeatureCategoryId="SCAN_TYPE" description="Superfine Scan" defaultSequenceNum="3"/> >>> + >>> +<Product productId="EXPRESS" productTypeId="SERVICE_PRODUCT" productName="Express" internalName="Express" description="Express" isVirtual="N" isVariant="N" billOfMaterialLevel="0" createdDate="2007-12-27 12:00:00.0" createdByUserLogin="admin"/> >>> +<Product productId="SUPER_EXPRESS" productTypeId="SERVICE_PRODUCT" productName="Super Express" internalName="Super Express" description="Super Express" isVirtual="N" isVariant="N" billOfMaterialLevel="0" createdDate="2007-12-27 12:00:00.0" createdByUserLogin="admin"/> >>> +<Product productId="SCAN_COVER" productTypeId="SERVICE_PRODUCT" productName="Scan Cover" internalName="Scan Cover" description="Scan Cover" isVirtual="N" isVariant="N" billOfMaterialLevel="0" createdDate="2007-12-27 12:00:00.0" createdByUserLogin="admin"/> >>> +<Product productId="OCR" productTypeId="SERVICE_PRODUCT" productName="OCR" internalName="OCR" description="OCR" isVirtual="N" isVariant="N" billOfMaterialLevel="0" createdDate="2007-12-27 12:00:00.0" createdByUserLogin="admin"/> >>> +<Product productId="METADATA" productTypeId="SERVICE_PRODUCT" productName="Metadata" internalName="Metadata" description="Metadata" isVirtual="N" isVariant="N" billOfMaterialLevel="0" createdDate="2007-12-27 12:00:00.0" createdByUserLogin="admin"/> >>> +<Product productId="DVD" productTypeId="SERVICE_PRODUCT" productName="DVD" internalName="DVD" description="DVD" isVirtual="N" isVariant="N" billOfMaterialLevel="0" createdDate="2007-12-27 12:00:00.0" createdByUserLogin="admin"/> >>> + >>> +<ProductAssoc productId="SCAN_TYPE" productIdTo="SCAN-EC" productAssocTypeId="PRODUCT_VARIANT" fromDate="2011-08-02 12:00:00.0"/> >>> +<ProductAssoc productId="SCAN_TYPE" productIdTo="SCAN-ST" productAssocTypeId="PRODUCT_VARIANT" fromDate="2011-08-02 12:00:00.0"/> >>> +<ProductAssoc productId="SCAN_TYPE" productIdTo="SCAN-SU" productAssocTypeId="PRODUCT_VARIANT" fromDate="2011-08-02 12:00:00.0"/> >>> + >>> +<ProductFeatureAppl productId="SCAN_TYPE" productFeatureId="ECONOMY" productFeatureApplTypeId="SELECTABLE_FEATURE" fromDate="2011-08-02 12:00:00.0" sequenceNum="1"/> >>> +<ProductFeatureAppl productId="SCAN_TYPE" productFeatureId="STANDARD" productFeatureApplTypeId="SELECTABLE_FEATURE" fromDate="2011-08-02 12:00:00.0" sequenceNum="2"/> >>> +<ProductFeatureAppl productId="SCAN_TYPE" productFeatureId="SUPERFINE" productFeatureApplTypeId="SELECTABLE_FEATURE" fromDate="2011-08-02 12:00:00.0" sequenceNum="3"/> >>> + >>> +<ProductFeatureAppl productId="SCAN-EC" productFeatureId="ECONOMY" productFeatureApplTypeId="STANDARD_FEATURE" fromDate="2011-08-02 12:00:00.0" sequenceNum="1"/> >>> +<ProductFeatureAppl productId="SCAN-ST" productFeatureId="STANDARD" productFeatureApplTypeId="STANDARD_FEATURE" fromDate="2011-08-02 12:00:00.0" sequenceNum="1"/> >>> +<ProductFeatureAppl productId="SCAN-SU" productFeatureId="SUPERFINE" productFeatureApplTypeId="STANDARD_FEATURE" fromDate="2011-08-02 12:00:00.0" sequenceNum="1"/> >>> + >>> +<ProductPrice productId="CFSV1001" productPricePurposeId="PURCHASE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-08-02 12:00:00.0" price="9.99" createdDate="2011-08-02 12:00:00.0" createdByUserLogin="admin"/> >>> +<ProductPrice productId="SCAN-EC" productPricePurposeId="PURCHASE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="1.00" createdDate="2011-01-01 00:00:00.0"/> >>> +<ProductPrice productId="SCAN-EC" productPricePurposeId="COMPONENT_PRICE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="1.00" createdDate="2011-01-01 00:00:00.0"/> >>> +<ProductPrice productId="SCAN-ST" productPricePurposeId="PURCHASE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="2.00" createdDate="2011-01-01 00:00:00.0"/> >>> +<ProductPrice productId="SCAN-ST" productPricePurposeId="COMPONENT_PRICE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="2.00" createdDate="2011-01-01 00:00:00.0"/> >>> +<ProductPrice productId="SCAN-SU" productPricePurposeId="PURCHASE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="3.00" createdDate="2011-01-01 00:00:00.0"/> >>> +<ProductPrice productId="SCAN-SU" productPricePurposeId="COMPONENT_PRICE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="3.00" createdDate="2011-01-01 00:00:00.0"/> >>> +<ProductPrice productId="EXPRESS" productPricePurposeId="COMPONENT_PRICE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="1.50" createdDate="2011-01-01 00:00:00.0"/> >>> +<ProductPrice productId="SUPER_EXPRESS" productPricePurposeId="COMPONENT_PRICE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="3.00" createdDate="2011-01-01 00:00:00.0"/> >>> +<ProductPrice productId="SCAN_COVER" productPricePurposeId="COMPONENT_PRICE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="1.00" createdDate="2011-01-01 00:00:00.0"/> >>> +<ProductPrice productId="OCR" productPricePurposeId="COMPONENT_PRICE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="2.00" createdDate="2011-01-01 00:00:00.0"/> >>> +<ProductPrice productId="METADATA" productPricePurposeId="COMPONENT_PRICE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="1.00" createdDate="2011-01-01 00:00:00.0"/> >>> +<ProductPrice productId="DVD" productPricePurposeId="COMPONENT_PRICE" productPriceTypeId="DEFAULT_PRICE" currencyUomId="USD" productStoreGroupId="_NA_" fromDate="2011-01-01 00:00:00.0" price="0.25" createdDate="2011-01-01 00:00:00.0"/> >>> + >>> +<ProductConfigItem configItemId="SC00000" configItemTypeId="MULTIPLE" configItemName="Scanning Type" description="Select the scanning type :"/> >>> +<ProductConfigItem configItemId="SCF0001" configItemTypeId="MULTIPLE" configItemName="Scanning Options" description="Scanning options :"/> >>> + >>> +<ProductConfigOption configItemId="SC00000" configOptionId="SCOP001" configOptionName="OPT0001" description="Scanning Type" sequenceNum="10"/> >>> +<ProductConfigOption configItemId="SCF0001" configOptionId="SCOP006" configOptionName="OPT0006" description="Express" sequenceNum="10"/> >>> +<ProductConfigOption configItemId="SCF0001" configOptionId="SCOP007" configOptionName="OPT0007" description="Super Express" sequenceNum="20"/> >>> +<ProductConfigOption configItemId="SCF0001" configOptionId="SCOP008" configOptionName="OPT0008" description="Scan Cover" sequenceNum="30"/> >>> +<ProductConfigOption configItemId="SCF0001" configOptionId="SCOP009" configOptionName="OPT0009" description="OCR" sequenceNum="40"/> >>> +<ProductConfigOption configItemId="SCF0001" configOptionId="SCOP010" configOptionName="OPT0010" description="Metadata" sequenceNum="60"/> >>> +<ProductConfigOption configItemId="SCF0001" configOptionId="SCOP011" configOptionName="OPT0011" description="DVD" sequenceNum="50"/> >>> + >>> +<ProductConfigProduct configItemId="SC00000" configOptionId="SCOP001" productId="SCAN_TYPE" quantity="1"/> >>> +<ProductConfigProduct configItemId="SCF0001" configOptionId="SCOP006" productId="EXPRESS" quantity="1"/> >>> +<ProductConfigProduct configItemId="SCF0001" configOptionId="SCOP007" productId="SUPER_EXPRESS" quantity="1"/> >>> +<ProductConfigProduct configItemId="SCF0001" configOptionId="SCOP008" productId="SCAN_COVER" quantity="1"/> >>> +<ProductConfigProduct configItemId="SCF0001" configOptionId="SCOP009" productId="OCR" quantity="1"/> >>> +<ProductConfigProduct configItemId="SCF0001" configOptionId="SCOP010" productId="METADATA" quantity="1"/> >>> +<ProductConfigProduct configItemId="SCF0001" configOptionId="SCOP011" productId="DVD" quantity="1"/> >>> + >>> +<ProductCategoryMember productCategoryId="SERV-001" productId="CFSV1001" fromDate="2011-08-02 12:00:00.0"/> >>> +<ProductCategoryMember productCategoryId="CATALOG1_SEARCH" productId="CFSV1001" fromDate="2011-08-02 12:00:00.0"/> >>> +<DataResource dataResourceId="CFSV1001-ALT" dataResourceTypeId="LINK" objectInfo="scanning-book-service-CFSV1001-p"/> >>> +<DataResource dataResourceTypeId="ELECTRONIC_TEXT" dataResourceId="CFSV1001-ALT" localeString="en"/> >>> +<DataResource dataResourceTypeId="ELECTRONIC_TEXT" dataResourceId="DRCFSV1001-ALTEN" localeString="en_US"/> >>> +<ElectronicText dataResourceId="CFSV1001-ALT" textData="scanning-book-product"/> >>> +<ElectronicText dataResourceId="DRCFSV1001-ALTEN" textData="scanning-book-product"/> >>> + >>> +<ProductConfig productId="CFSV1001" configItemId="SC00000" sequenceNum="10" fromDate="2011-01-01 00:00:00.0" description="Select the scanning type :" configTypeId="QUESTION" isMandatory="N"/> >>> +<ProductConfig productId="CFSV1001" configItemId="SCF0001" sequenceNum="20" fromDate="2011-01-01 00:00:00.0" description="Scanning options :" configTypeId="QUESTION" isMandatory="N"/> >>> + >>> +<WorkEffort workEffortId="SCTASK01" workEffortTypeId="ROU_TASK" workEffortPurposeTypeId="ROU_ASSEMBLING" currentStatusId="ROU_ACTIVE" workEffortName="Stock out" description="Components" revisionNumber="1" fixedAssetId="DEMO_BOOK_GROUP" estimatedMilliSeconds="600000" estimatedSetupMillis="0"/> >>> +<WorkEffort workEffortId="SCTASK02" workEffortTypeId="ROU_TASK" workEffortPurposeTypeId="ROU_ASSEMBLING" currentStatusId="ROU_ACTIVE" workEffortName="Preparation" description="Preparation" revisionNumber="1" fixedAssetId="DEMO_BOOK_GROUP" estimatedMilliSeconds="900000" estimatedSetupMillis="0"/> >>> +<WorkEffort workEffortId="SCROUT01" workEffortTypeId="ROUTING" currentStatusId="ROU_ACTIVE" workEffortName="Pizza preparation" description="Scanning preparation" revisionNumber="1" quantityToProduce="0"/> >>> +<WorkEffortGoodStandard workEffortId="SCROUT01" productId="CFSV1001" workEffortGoodStdTypeId="ROU_PROD_TEMPLATE" statusId="WEGS_CREATED" fromDate="2011-01-01 00:00:00.0"/> >>> +<WorkEffortAssoc workEffortIdFrom="SCROUT01" workEffortIdTo="SCTASK01" workEffortAssocTypeId="ROUTING_COMPONENT" sequenceNum="10" fromDate="2011-01-01 00:00:00.0"/> >>> +<WorkEffortAssoc workEffortIdFrom="SCROUT01" workEffortIdTo="SCTASK02" workEffortAssocTypeId="ROUTING_COMPONENT" sequenceNum="20" fromDate="2011-01-01 00:00:00.0"/> >>> + >>> +<Content contentId="CFSV1001-ALT" contentTypeId="DOCUMENT" dataResourceId="CFSV1001-ALT" localeString="en"/> >>> +<Content contentId="CCFSV1001-ALTEN" contentTypeId="DOCUMENT" dataResourceId="DRCFSV1001-ALTEN" localeString="en_US"/> >>> +<ContentAssoc contentId="CFSV1001-ALT" contentIdTo="CCFSV1001-ALTEN" contentAssocTypeId="ALTERNATE_LOCALE" fromDate="2011-08-02 12:00:00.0"/> >>> +<ProductContent productId="CFSV1001" contentId="CFSV1001-ALT" productContentTypeId="ALTERNATIVE_URL" fromDate="2011-08-02 12:00:00.0"/> >>> + >>> <ProductFeatureCategory productFeatureCategoryId="8000" description="License Features"/> >>> <ProductFeatureCategoryAppl productFeatureCategoryId="8000" productCategoryId="CATALOG1_SEARCH" fromDate="2001-05-13 12:00:00.0"/> >>> >>> >>> |
On 19/12/2011, at 7:14 AM, Hans Bakker wrote:
> Hi Jacopo, > > thanks for helping me, it is good try to work together instead of personally accusing people. With the amount of commits we produce here at Antwebsystems, it can once in a while go wrong and have errors. I am setting up a Jenkins automated test system in our company to improve on the situation. > > I join other committers that we also worry about the amount of changes that go into the system which could introduce errors. On the other hand without them, it will quickly kill the OFBiz system. Personally I believe it is poor design and code quality that will ultimately kill OFBiz. IMO the codebase could see nothing but bug fixes and still be a useful platform 5-10 years into the future unless something equally as flexible and robust comes along. It is the volume of core existing business processes and the speed at which new ones can be implemented into custom deployments that keeps it alive. The more difficult those implementations become because of poor OOTB design is what will see OFBiz usership decline. > Perhaps in the future we should insist on having junit tests for new functions and enhancements to existing functions. > > Thanks again for your help, > > Regards, > Hans > > On 12/19/2011 03:38 PM, Jacopo Cappellato wrote: >> Yep, >> >> the problem was the line: >> >>>> -<ProductFeatureCategory productFeatureCategoryId="IMAGE" description="Image"/> >>>> +<ProductFeatureCategory productFeatureCategoryI="IMAGE" description="Image"/> >> I have fixed it. >> Even without reviewing this big commit, this kind of errors (that imply that very few tests were done) makes me feel nervous about the quality of the code committed. >> >> Jacopo >> >> >> On Dec 19, 2011, at 9:24 AM, Adrian Crum wrote: >> >>> This commit is throwing a lot of exceptions during data loading. See the buildbot report. >>> >>> -Adrian >>> >>> On 12/19/2011 6:40 AM, [hidden email] wrote: >>>> Author: hansbak >>>> Date: Mon Dec 19 06:40:18 2011 >>>> New Revision: 1220622 >>>> >>>> URL: http://svn.apache.org/viewvc?rev=1220622&view=rev >>>> Log: >>>> new producttype: configurable product service, using inventory |
Free forum by Nabble | Edit this page |