You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by sa...@apache.org on 2011/09/20 19:46:24 UTC
svn commit: r1173274 [6/13] - in /ofbiz/branches/jackrabbit20100709: ./
applications/accounting/config/ applications/accounting/entitydef/
applications/accounting/script/org/ofbiz/accounting/invoice/
applications/accounting/script/org/ofbiz/accounting/...
Modified: ofbiz/branches/jackrabbit20100709/applications/party/src/org/ofbiz/party/party/PartyServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/party/src/org/ofbiz/party/party/PartyServices.java?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/party/src/org/ofbiz/party/party/PartyServices.java (original)
+++ ofbiz/branches/jackrabbit20100709/applications/party/src/org/ofbiz/party/party/PartyServices.java Tue Sep 20 17:46:13 2011
@@ -1113,6 +1113,8 @@ public class PartyServices {
dynamicView.addAlias("PT", "partyId");
dynamicView.addAlias("PT", "statusId");
dynamicView.addAlias("PT", "partyTypeId");
+ dynamicView.addAlias("PT", "createdDate");
+ dynamicView.addAlias("PT", "lastModifiedDate");
dynamicView.addRelation("one-nofk", "", "PartyType", ModelKeyMap.makeKeyMapList("partyTypeId"));
dynamicView.addRelation("many", "", "UserLogin", ModelKeyMap.makeKeyMapList("partyId"));
@@ -1126,6 +1128,8 @@ public class PartyServices {
fieldsToSelect.add("partyId");
fieldsToSelect.add("statusId");
fieldsToSelect.add("partyTypeId");
+ fieldsToSelect.add("createdDate");
+ fieldsToSelect.add("lastModifiedDate");
// filter on parties that have relationship with logged in user
String partyRelationshipTypeId = (String) context.get("partyRelationshipTypeId");
@@ -1433,6 +1437,11 @@ public class PartyServices {
Debug.logInfo("In findParty mainCond=" + mainCond, module);
+ String sortField = (String) context.get("sortField");
+ if(UtilValidate.isNotEmpty(sortField)){
+ orderBy.add(sortField);
+ }
+
// do the lookup
if (mainCond != null || "Y".equals(showAll)) {
try {
Propchange: ofbiz/branches/jackrabbit20100709/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Sep 20 17:46:13 2011
@@ -2,4 +2,4 @@
/ofbiz/branches/dojo1.4/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy:951708-952957
/ofbiz/branches/jquery/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy:952958-1044489
/ofbiz/branches/multitenant20100310/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy:921280-927264
-/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy:962442-1156267
+/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/party/PartyFinancialHistory.groovy:962442-1173263
Modified: ofbiz/branches/jackrabbit20100709/applications/party/webapp/partymgr/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/party/webapp/partymgr/WEB-INF/controller.xml?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/party/webapp/partymgr/WEB-INF/controller.xml (original)
+++ ofbiz/branches/jackrabbit20100709/applications/party/webapp/partymgr/WEB-INF/controller.xml Tue Sep 20 17:46:13 2011
@@ -1137,9 +1137,9 @@ under the License.
<security https="true" auth="true"/>
<response name="success" type="view" value="Preferences"/>
</request-map>
- <request-map uri="updatePreference">
+ <request-map uri="removePreference">
<security https="true" auth="true"/>
- <event type="service" invoke="setUserPreference"/>
+ <event type="service" invoke="removeUserPreference"/>
<response name="success" type="view" value="Preferences"/>
<response name="error" type="view" value="Preferences"/>
</request-map>
Modified: ofbiz/branches/jackrabbit20100709/applications/party/webapp/partymgr/party/findparty.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/party/webapp/partymgr/party/findparty.ftl?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/party/webapp/partymgr/party/findparty.ftl (original)
+++ ofbiz/branches/jackrabbit20100709/applications/party/webapp/partymgr/party/findparty.ftl Tue Sep 20 17:46:13 2011
@@ -20,6 +20,7 @@ under the License.
<#assign inventoryItemId = parameters.inventoryItemId?default("")>
<#assign serialNumber = parameters.serialNumber?default("")>
<#assign softIdentifier = parameters.softIdentifier?default("")>
+<#assign sortField = parameters.sortField?if_exists/>
<#-- Only allow the search fields to be hidden when we have some results -->
<#if partyList?has_content>
<#assign hideFields = parameters.hideFields?default("N")>
@@ -40,9 +41,9 @@ under the License.
<#if partyList?has_content>
<ul>
<#if hideFields == "Y">
- <li class="collapsed"><a href="<@o...@ofbizUrl>" title="${uiLabelMap.CommonShowLookupFields}"> </a></li>
+ <li class="collapsed"><a href="<@o...@ofbizUrl>" title="${uiLabelMap.CommonShowLookupFields}"> </a></li>
<#else>
- <li class="expanded"><a href="<@o...@ofbizUrl>" title="${uiLabelMap.CommonHideFields}"> </a></li>
+ <li class="expanded"><a href="<@o...@ofbizUrl>" title="${uiLabelMap.CommonHideFields}"> </a></li>
</#if>
</ul>
<br class="clear"/>
@@ -208,7 +209,7 @@ under the License.
<#if partyList?has_content>
<#-- Pagination -->
<#include "component://common/webcommon/includes/htmlTemplate.ftl"/>
- <#assign commonUrl = "findparty?hideFields=" + hideFields + paramList + "&"/>
+ <#assign commonUrl = "findparty?hideFields=" + hideFields + paramList + "&sortField=" + sortField?if_exists + "&"/>
<#assign viewIndexFirst = 0/>
<#assign viewIndexPrevious = viewIndex - 1/>
<#assign viewIndexNext = viewIndex + 1/>
@@ -242,6 +243,16 @@ under the License.
<td>${uiLabelMap.PartyRelatedCompany}</td>
<td>${uiLabelMap.PartyType}</td>
<td>${uiLabelMap.PartyMainRole}</td>
+ <td>
+ <a href="<@o...@ofbizUrl>?<#if sortField?has_content><#if sortField == "createdDate">sortField=-createdDate<#elseif sortField == "-createdDate">sortField=createdDate<#else>sortField=createdDate</#if><#else>sortField=createdDate</#if>${paramList?if_exists}&VIEW_SIZE=${viewSize?if_exists}&VIEW_INDEX=${viewIndex?if_exists}"
+ <#if sortField?has_content><#if sortField == "createdDate">class="sort-order-desc"<#elseif sortField == "-createdDate">class="sort-order-asc"<#else>class="sort-order"</#if><#else>class="sort-order"</#if>>${uiLabelMap.FormFieldTitle_createdDate}
+ </a>
+ </td>
+ <td>
+ <a href="<@o...@ofbizUrl>?<#if sortField?has_content><#if sortField == "lastModifiedDate">sortField=-lastModifiedDate<#elseif sortField == "-lastModifiedDate">sortField=lastModifiedDate<#else>sortField=lastModifiedDate</#if><#else>sortField=lastModifiedDate</#if>${paramList?if_exists}&VIEW_SIZE=${viewSize?if_exists}&VIEW_INDEX=${viewIndex?if_exists}"
+ <#if sortField?has_content><#if sortField == "lastModifiedDate">class="sort-order-desc"<#elseif sortField == "-lastModifiedDate">class="sort-order-asc"<#else>class="sort-order"</#if><#else>class="sort-order"</#if>>${uiLabelMap.FormFieldTitle_lastModifiedDate}
+ </a>
+ </td>
<td> </td>
</tr>
<#assign alt_row = false>
@@ -321,6 +332,9 @@ under the License.
<#assign mainRole = dispatcher.runSync("getPartyMainRole", Static["org.ofbiz.base.util.UtilMisc"].toMap("partyId", partyRow.partyId, "userLogin", userLogin))/>
${mainRole.description?if_exists}
</td>
+ <#assign partyDate = delegator.findOne("Party", {"partyId":partyRow.partyId}, true)/>
+ <td>${partyDate.createdDate?if_exists}</td>
+ <td>${partyDate.lastModifiedDate?if_exists}</td>
<td class="button-col align-float">
<a href="<@o...@ofbizUrl>">${uiLabelMap.CommonDetails}</a>
<#if security.hasRolePermission("ORDERMGR", "_VIEW", "", "", session)>
Modified: ofbiz/branches/jackrabbit20100709/applications/party/widget/partymgr/PartyForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/party/widget/partymgr/PartyForms.xml?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/party/widget/partymgr/PartyForms.xml (original)
+++ ofbiz/branches/jackrabbit20100709/applications/party/widget/partymgr/PartyForms.xml Tue Sep 20 17:46:13 2011
@@ -1025,7 +1025,7 @@ under the License.
<field name="description" title="${uiLabelMap.CommonDescription}" required-field="true"><text/></field>
<field name="save" title="${uiLabelMap.CommonSave}"><submit/></field>
</form>
- <form name="ListPreference" type="list" target="updatePreference" list-name="userPreferenceList"
+ <form name="ListPreference" type="list" target="removePreference" list-name="enumTypeChildAndEnums"
odd-row-style="alternate-row" default-table-style="basic-table hover-bar" separate-columns="true" use-row-submit="true" >
<row-actions>
<service service-name="getUserPreference" result-map="values">
@@ -1034,23 +1034,13 @@ under the License.
<set field="userPrefValue" from-field="values.userPrefValue"/>
</row-actions>
<field name="enumId" parameter-name="userPrefTypeId"><hidden value="${enumId}"/></field>
- <field name="enumTypeId" parameter-name="userPrefGroupTypeId"><hidden value="${enumTypeId}"/></field>
- <field name="description" title="${uiLabelMap.CommonDescription}"><display/></field>
+ <field name="childEnumTypeId" parameter-name="userPrefGroupTypeId"><hidden value="${enumTypeId}"/></field>
+ <field name="childDescription" title="${uiLabelMap.CommonPreferenceGroup}"><display/></field>
+ <field name="description" title="${uiLabelMap.CommonPreferenceName}"><display/></field>
<field name="partyId"><hidden/></field>
- <field name="userPrefValue" title="${uiLabelMap.CommonValue}" use-when="enumId.equals("ORGANIZATION_PARTY")" parameter-name="userPrefValue" >
- <drop-down current="selected" no-current-selected-key="defaultOrganizationPartyId">
- <entity-options entity-name="PartyAcctgPrefAndGroup" description="${groupName}" key-field-name="partyId"/>
- </drop-down>
- </field>
- <field name="userPrefValue" title="${uiLabelMap.CommonValue}" use-when="enumId.equals("VISUAL_THEME")" parameter-name="userPrefValue">
- <drop-down current="selected">
- <entity-options key-field-name="visualThemeId" description="${visualThemeId} - ${description}" entity-name="VisualTheme">
- <entity-constraint name="visualThemeSetId" operator="equals" value="BACKOFFICE"/>
- </entity-options>
- </drop-down>
- </field>
-
- <field name="submit" title="${uiLabelMap.CommonSubmit}"><submit/></field>
+ <field name="userPrefUserLoginId"><hidden/></field>
+ <field name="userPrefValue" title="${uiLabelMap.CommonValue}"><display/></field>
+ <field name="submit" title="${uiLabelMap.CommonRemove}" use-when="userPrefValue!=null"><submit/></field>
</form>
<form name="PartyBillingAccount" type="list" list-name="billingAccounts" default-table-style="basic-table hover-bar">
<field name="billingAccountId"><display/></field>
Modified: ofbiz/branches/jackrabbit20100709/applications/party/widget/partymgr/PartyScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/party/widget/partymgr/PartyScreens.xml?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/party/widget/partymgr/PartyScreens.xml (original)
+++ ofbiz/branches/jackrabbit20100709/applications/party/widget/partymgr/PartyScreens.xml Tue Sep 20 17:46:13 2011
@@ -1099,16 +1099,28 @@ under the License.
<set field="headerItem" value="find"/>
<set field="tabButtonItem" value="preferences"/>
<set field="partyId" from-field="parameters.partyId"/>
- <entity-and entity-name="Enumeration" list="userPreferenceList">
- <field-map field-name="enumTypeId" value="GLOBAL_PREFERENCES"/>
+ <entity-and entity-name="EnumTypeChildAndEnum" list="enumTypeChildAndEnums">
+ <field-map field-name="parentEnumTypeId" value="USER_PREF_GROUPS"/>
+ </entity-and>
+ <entity-and entity-name="UserLogin" list="userLogins">
+ <field-map field-name="partyId" from-field="parameters.partyId"/>
</entity-and>
</actions>
<widgets>
<decorator-screen name="CommonPartyDecorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
- <screenlet title="${uiLabelMap.CommonPreferences}" >
- <include-form name="ListPreference" location="component://party/widget/partymgr/PartyForms.xml"/>
- </screenlet>
+ <iterate-section entry="userLogin" list="userLogins">
+ <section>
+ <actions>
+ <set field="userPrefUserLoginId" from-field="userLogin.userLoginId"/>
+ </actions>
+ <widgets>
+ <screenlet title="${uiLabelMap.CommonPreferences} ${uiLabelMap.CommonFor} userLogin: ${userPrefUserLoginId}" >
+ <include-form name="ListPreference" location="component://party/widget/partymgr/PartyForms.xml"/>
+ </screenlet>
+ </widgets>
+ </section>
+ </iterate-section>
</decorator-section>
</decorator-screen>
</widgets>
Modified: ofbiz/branches/jackrabbit20100709/applications/product/config/ProductUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/config/ProductUiLabels.xml?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/product/config/ProductUiLabels.xml (original)
+++ ofbiz/branches/jackrabbit20100709/applications/product/config/ProductUiLabels.xml Tue Sep 20 17:46:13 2011
@@ -1951,9 +1951,6 @@
<value xml:lang="zh">èªå¨æ¹åè¯ä»·</value>
<value xml:lang="zh_TW">èªåæ ¸åè©è«</value>
</property>
- <property key="FormFieldTitle_automaticExtend">
- <value xml:lang="en">Automatic Extend</value>
- </property>
<property key="FormFieldTitle_autoInvoiceDigitalItems">
<value xml:lang="de">Automatische Rechnungsstellung Digitaler Produkte</value>
<value xml:lang="en">Auto Invoice Digital Items</value>
Modified: ofbiz/branches/jackrabbit20100709/applications/product/data/ProductHelpData.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/data/ProductHelpData.xml?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/product/data/ProductHelpData.xml (original)
+++ ofbiz/branches/jackrabbit20100709/applications/product/data/ProductHelpData.xml Tue Sep 20 17:46:13 2011
@@ -24,11 +24,11 @@ under the License.
<DataResource dataResourceId="PRODCATALOG_main" localeString="en" dataResourceTypeId="OFBIZ_FILE" objectInfo="applications/product/data/helpdata/HELP_PRODCATALOG_main.xml" dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS" dataResourceName="Accounting Help" mimeTypeId="text/xml" isPublic="Y" />
<Content contentId="PRODCATALOG_main" contentTypeId="DOCUMENT" contentName="Main Catalog Help" templateDataResourceId="HELP_TEMPL" dataResourceId="PRODCATALOG_main" statusId="CTNT_IN_PROGRESS" mimeTypeId="text/html"/>
- <ContentAssoc contentId="HELP_PRODUCT" contentIdTo="PRODCATALOG_main" contentAssocTypeId="TREE_CHILD" fromDate="2006-01-12 01:01:01" sequenceNum="000" mapKey="PRODCATALOG_main"/>
+ <ContentAssoc contentId="HELP_PRODUCT" contentIdTo="PRODCATALOG_main" contentAssocTypeId="TREE_CHILD" fromDate="2006-01-12 01:01:01" sequenceNum="000" mapKey="PRODUCT_main"/>
<!-- Image Management -->
<DataResource dataResourceId="IMAGEMANAGEMENT_MAIN" localeString="en" dataResourceTypeId="OFBIZ_FILE" objectInfo="applications/product/data/helpdata/HELP_IMAGEMANAGEMENT.xml" dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS" dataResourceName="Image Management" mimeTypeId="text/xml" isPublic="Y" />
<Content contentId="IMAGEMANAGEMENT_MAIN" contentTypeId="DOCUMENT" contentName="Image Management" templateDataResourceId="HELP_TEMPL" dataResourceId="IMAGEMANAGEMENT_MAIN" statusId="CTNT_IN_PROGRESS" mimeTypeId="text/html"/>
- <ContentAssoc contentId="PRODCATALOG_main" contentIdTo="IMAGEMANAGEMENT_MAIN" contentAssocTypeId="TREE_CHILD" fromDate="2006-01-12 01:01:01" sequenceNum="01" mapKey="PRODCATALOG_Imagemanagement"/>
+ <ContentAssoc contentId="PRODCATALOG_main" contentIdTo="IMAGEMANAGEMENT_MAIN" contentAssocTypeId="TREE_CHILD" fromDate="2006-01-12 01:01:01" sequenceNum="01" mapKey="PRODUCT_Imagemanagement"/>
</entity-engine-xml>
Modified: ofbiz/branches/jackrabbit20100709/applications/product/data/ProductTypeData.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/data/ProductTypeData.xml?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/product/data/ProductTypeData.xml (original)
+++ ofbiz/branches/jackrabbit20100709/applications/product/data/ProductTypeData.xml Tue Sep 20 17:46:13 2011
@@ -498,7 +498,9 @@ under the License.
<ProductType description="Marketing Package: Pick Assembly" isPhysical="Y" isDigital="N" hasTable="N" parentTypeId="MARKETING_PKG" productTypeId="MARKETING_PKG_PICK"/>
<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"/>
+
<EnumerationType description="Product Requirement Method" enumTypeId="PROD_REQ_METHOD" hasTable="N" parentTypeId=""/>
<!-- NONE: no requirement is created (default) -->
<Enumeration description="No Requirement Created" enumCode="NONE" enumId="PRODRQM_NONE" sequenceId="01" enumTypeId="PROD_REQ_METHOD"/>
Propchange: ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/product/test/InventoryTests.xml
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Sep 20 17:46:13 2011
@@ -2,4 +2,4 @@
/ofbiz/branches/dojo1.4/applications/product/script/org/ofbiz/product/test/InventoryTests.xml:951708-952957
/ofbiz/branches/jquery/applications/product/script/org/ofbiz/product/test/InventoryTests.xml:952958-1044489
/ofbiz/branches/multitenant20100310/applications/product/script/org/ofbiz/product/test/InventoryTests.xml:921280-927264
-/ofbiz/trunk/applications/product/script/org/ofbiz/product/test/InventoryTests.xml:962442-1156267
+/ofbiz/trunk/applications/product/script/org/ofbiz/product/test/InventoryTests.xml:962442-1173263
Modified: ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml (original)
+++ ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml Tue Sep 20 17:46:13 2011
@@ -35,6 +35,7 @@ under the License.
</if-empty>
<create-value value-field="newEntity"/>
+ <set field="affectAccounting" type="Boolean" value="true"/>
<!-- if the InventoryItem issued is serialized, then change its status to DELIVERED -->
<get-related-one value-field="newEntity" relation-name="InventoryItem" to-value-field="inventoryItem"/>
@@ -43,8 +44,24 @@ under the License.
<set field="updateContext.inventoryItemId" from-field="inventoryItem.inventoryItemId"/>
<set field="updateContext.statusId" value="INV_DELIVERED"/>
<call-service service-name="updateInventoryItem" in-map-name="updateContext"/>
+
+ <entity-one value-field="product" entity-name="Product">
+ <field-map field-name="productId" from-field="inventoryItem.productId"/>
+ </entity-one>
+ <if>
+ <condition>
+ <or>
+ <if-compare field="product.productTypeId" operator="equals" value="SERVICE_PRODUCT"/>
+ <if-compare field="product.productTypeId" operator="equals" value="ASSET_USAGE_OUT_IN"/>
+ </or>
+ </condition>
+ <then>
+ <set field="affectAccounting" type="Boolean" value="false"/>
+ </then>
+ </if>
</if-compare>
</if-not-empty>
+ <field-to-result field="affectAccounting" result-name="affectAccounting"/>
</simple-method>
<simple-method method-name="updateItemIssuance" short-description="Update ItemIssuance">
<set value="Update ItemIssuance" field="operationName"/>
@@ -211,6 +228,7 @@ under the License.
<!--<call-simple-method method-name="findCreateIssueShipmentItem"/>-->
<set field="eventDate" from-field="parameters.eventDate"/>
+ <set field="shipmentId" from-field="parameters.shipmentId"/>
<call-simple-method method-name="findCreateItemIssuance"/>
<call-simple-method method-name="associateIssueRoles"/>
@@ -368,6 +386,7 @@ under the License.
<set from-field="itemIssuanceId" field="itemIssuanceRoleCreate.itemIssuanceId"/>
<set from-field="userLogin.partyId" field="itemIssuanceRoleCreate.partyId"/>
<set value="PACKER" field="itemIssuanceRoleCreate.roleTypeId"/>
+ <set from-field="shipmentId" field="itemIssuanceRoleCreate.shipmentId"/>
<call-service service-name="createItemIssuanceRole" in-map-name="itemIssuanceRoleCreate"/>
</if-empty>
</simple-method>
Modified: ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml (original)
+++ ofbiz/branches/jackrabbit20100709/applications/product/script/org/ofbiz/shipment/receipt/ShipmentReceiptServices.xml Tue Sep 20 17:46:13 2011
@@ -45,6 +45,21 @@ under the License.
<set field="invDet.receiptId" from-field="receiptId"/>
<store-value value-field="invDet"/>
</if-not-empty>
+ <set field="affectAccounting" type="Boolean" value="true"/>
+
+ <entity-one value-field="product" entity-name="Product"/>
+ <if>
+ <condition>
+ <or>
+ <if-compare field="product.productTypeId" operator="equals" value="SERVICE_PRODUCT"/>
+ <if-compare field="product.productTypeId" operator="equals" value="ASSET_USAGE_OUT_IN"/>
+ </or>
+ </condition>
+ <then>
+ <set field="affectAccounting" type="Boolean" value="false"/>
+ </then>
+ </if>
+ <field-to-result field="affectAccounting" result-name="affectAccounting"/>
</simple-method>
<simple-method method-name="createShipmentReceiptRole" short-description="Create a ShipmentReceipt Role">
Modified: ofbiz/branches/jackrabbit20100709/applications/product/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/servicedef/services.xml?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/product/servicedef/services.xml (original)
+++ ofbiz/branches/jackrabbit20100709/applications/product/servicedef/services.xml Tue Sep 20 17:46:13 2011
@@ -1641,4 +1641,25 @@ under the License.
<attribute name="productsNotUpdated" mode="OUT" type="Integer" optional="true"/>
<attribute name="productsUpdated" mode="OUT" type="Integer" optional="true"/>
</service>
+
+ <service name="createMarketInterest" default-entity-name="MarketInterest" engine="entity-auto" invoke="create" auth="true">
+ <description>Create a Market Interest</description>
+ <permission-service service-name="productGenericPermission" main-action="CREATE"/>
+ <auto-attributes include="pk" mode="IN" optional="false"/>
+ <auto-attributes include="nonpk" mode="IN" optional="true"/>
+ </service>
+
+ <service name="updateMarketInterest" default-entity-name="MarketInterest" engine="entity-auto" invoke="update" auth="true">
+ <description>Update a Market Interest</description>
+ <permission-service service-name="productGenericPermission" main-action="UPDATE"/>
+ <auto-attributes include="pk" mode="IN" optional="false"/>
+ <auto-attributes include="nonpk" mode="IN" optional="true"/>
+ </service>
+
+ <service name="deleteMarketInterest" default-entity-name="MarketInterest" engine="entity-auto" invoke="delete" auth="true">
+ <description>Delete a Market Interest</description>
+ <permission-service service-name="productGenericPermission" main-action="DELETE"/>
+ <auto-attributes include="pk" mode="IN" optional="false"/>
+ </service>
+
</services>
Modified: ofbiz/branches/jackrabbit20100709/applications/product/servicedef/services_shipment.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/servicedef/services_shipment.xml?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/product/servicedef/services_shipment.xml (original)
+++ ofbiz/branches/jackrabbit20100709/applications/product/servicedef/services_shipment.xml Tue Sep 20 17:46:13 2011
@@ -397,6 +397,7 @@ under the License.
<permission-service service-name="facilityGenericPermission" main-action="CREATE"/>
<auto-attributes include="pk" mode="OUT" optional="false"/>
<auto-attributes include="nonpk" mode="IN" optional="true"/>
+ <attribute name="affectAccounting" type="Boolean" mode="OUT" optional="true"/>
</service>
<service name="updateItemIssuance" default-entity-name="ItemIssuance" engine="simple"
location="component://product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml" invoke="updateItemIssuance" auth="true">
@@ -418,12 +419,16 @@ under the License.
<description>Create ItemIssuanceRole</description>
<permission-service service-name="facilityGenericPermission" main-action="CREATE"/>
<auto-attributes include="pk" mode="IN" optional="false"/>
+ <!-- Will check if OK to change status of shipment, so Shipment PK is needed -->
+ <auto-attributes entity-name="Shipment" include="pk" mode="IN" optional="false"/>
</service>
<service name="deleteItemIssuanceRole" default-entity-name="ItemIssuanceRole" engine="simple"
location="component://product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml" invoke="deleteItemIssuanceRole" auth="true">
<description>Delete ItemIssuanceRole</description>
<permission-service service-name="facilityGenericPermission" main-action="DELETE"/>
<auto-attributes include="pk" mode="IN" optional="false"/>
+ <!-- Will check if OK to change status of shipment, so Shipment PK is needed -->
+ <auto-attributes entity-name="Shipment" include="pk" mode="IN" optional="false"/>
</service>
<service name="issueOrderItemToShipment" engine="simple"
@@ -731,6 +736,7 @@ under the License.
<permission-service service-name="facilityGenericPermission" main-action="CREATE"/>
<implements service="interfaceShipmentReceipt"/>
<attribute name="receiptId" type="String" mode="OUT" optional="false"/>
+ <attribute name="affectAccounting" type="Boolean" mode="OUT" optional="true"/>
</service>
<service name="updatePurchaseShipmentFromReceipt" engine="java"
location="org.ofbiz.shipment.shipment.ShipmentServices" invoke="updatePurchaseShipmentFromReceipt" auth="true">
Modified: ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/category/CatalogUrlFilter.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/category/CatalogUrlFilter.java?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/category/CatalogUrlFilter.java (original)
+++ ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/category/CatalogUrlFilter.java Tue Sep 20 17:46:13 2011
@@ -341,16 +341,17 @@ public class CatalogUrlFilter extends Co
try {
GenericValue productCategory = delegator.findOne("ProductCategory", UtilMisc.toMap("productCategoryId", productCategoryId), true);
CategoryContentWrapper wrapper = new CategoryContentWrapper(productCategory, request);
- return makeCategoryUrl(delegator, wrapper, request.getSession().getServletContext().getContextPath(), previousCategoryId, productCategoryId, productId, viewSize, viewIndex, viewSort, searchString);
+ List<String> trail = CategoryWorker.getTrail(request);
+ return makeCategoryUrl(delegator, wrapper, trail, request.getSession().getServletContext().getContextPath(), previousCategoryId, productCategoryId, productId, viewSize, viewIndex, viewSort, searchString);
} catch (GenericEntityException e) {
Debug.logWarning(e, "Cannot create category's URL for: " + productCategoryId, module);
return redirectUrl;
}
}
- public static String makeCategoryUrl(Delegator delegator, CategoryContentWrapper wrapper, String contextPath, String previousCategoryId, String productCategoryId, String productId, String viewSize, String viewIndex, String viewSort, String searchString) {
- String url = "";
- StringWrapper alternativeUrl = wrapper.get("ALTERNATIVE_URL");
+ public static String makeCategoryUrl(Delegator delegator, CategoryContentWrapper wrapper, List<String> trail, String contextPath, String previousCategoryId, String productCategoryId, String productId, String viewSize, String viewIndex, String viewSort, String searchString) {
+ String url = "";
+ StringWrapper alternativeUrl = wrapper.get("ALTERNATIVE_URL");
if (UtilValidate.isNotEmpty(alternativeUrl) && UtilValidate.isNotEmpty(alternativeUrl.toString())) {
StringBuilder urlBuilder = new StringBuilder();
@@ -400,20 +401,23 @@ public class CatalogUrlFilter extends Co
url = urlBuilder.toString();
} else {
- List<String> crumb = FastList.newInstance();
- String currentCategoryId = null;
- url = CatalogUrlServlet.makeCatalogUrl(contextPath, crumb, productId, currentCategoryId, previousCategoryId);
+ if(UtilValidate.isEmpty(trail)){
+ trail = FastList.newInstance();
+ }
+ url = CatalogUrlServlet.makeCatalogUrl(contextPath, trail, productId, productCategoryId, previousCategoryId);
}
- return url;
+
+ return url;
}
public static String makeProductUrl(HttpServletRequest request, String previousCategoryId, String productCategoryId, String productId) {
Delegator delegator = (Delegator) request.getAttribute("delegator");
String url = null;
try {
- GenericValue product = delegator.findOne("Product", UtilMisc.toMap("productId", productId), true);
- ProductContentWrapper wrapper = new ProductContentWrapper(product, request);
- url = makeProductUrl(delegator, wrapper, request.getSession().getServletContext().getContextPath(), previousCategoryId, productCategoryId, productId);
+ GenericValue product = delegator.findOne("Product", UtilMisc.toMap("productId", productId), true);
+ ProductContentWrapper wrapper = new ProductContentWrapper(product, request);
+ List<String> trail = CategoryWorker.getTrail(request);
+ url = makeProductUrl(delegator, wrapper, trail, request.getSession().getServletContext().getContextPath(), previousCategoryId, productCategoryId, productId);
} catch (GenericEntityException e) {
Debug.logWarning(e, "Cannot create product's URL for: " + productId, module);
return redirectUrl;
@@ -421,7 +425,7 @@ public class CatalogUrlFilter extends Co
return url;
}
- public static String makeProductUrl(Delegator delegator, ProductContentWrapper wrapper, String contextPath, String previousCategoryId, String productCategoryId, String productId) {
+ public static String makeProductUrl(Delegator delegator, ProductContentWrapper wrapper,List<String> trail, String contextPath, String previousCategoryId, String productCategoryId, String productId) {
String url = "";
StringWrapper alternativeUrl = wrapper.get("ALTERNATIVE_URL");
if (UtilValidate.isNotEmpty(alternativeUrl) && UtilValidate.isNotEmpty(alternativeUrl.toString())) {
@@ -440,9 +444,10 @@ public class CatalogUrlFilter extends Co
}
url = urlBuilder.toString();
} else {
- List<String> crumb = FastList.newInstance();
- String currentCategoryId = null;
- url = CatalogUrlServlet.makeCatalogUrl(contextPath, crumb, productId, currentCategoryId, previousCategoryId);
+ if(UtilValidate.isEmpty(trail)){
+ trail = FastList.newInstance();
+ }
+ url = CatalogUrlServlet.makeCatalogUrl(contextPath, trail, productId, productCategoryId, previousCategoryId);
}
return url;
}
Modified: ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/category/CategoryServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/category/CategoryServices.java?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/category/CategoryServices.java (original)
+++ ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/category/CategoryServices.java Tue Sep 20 17:46:13 2011
@@ -440,7 +440,7 @@ public class CategoryServices {
childOfCats = EntityUtil.filterByDate(delegator.findByAnd("ProdCatalogCategory", UtilMisc.toMap("prodCatalogId", productCategoryId)));
}
if (UtilValidate.isNotEmpty(childOfCats)) {
-
+
for (GenericValue childOfCat : childOfCats ) {
Object catId = null;
@@ -506,12 +506,14 @@ public class CategoryServices {
@SuppressWarnings("unchecked")
public static void toJsonObjectList(List attrList, HttpServletResponse response){
- String jsonStr = "[";
+ StringBuilder jsonBuilder = new StringBuilder("[");
for (Object attrMap : attrList) {
JSONObject json = JSONObject.fromObject(attrMap);
- jsonStr = jsonStr + json.toString() + ',';
+ jsonBuilder.append(json.toString());
+ jsonBuilder.append(',');
}
- jsonStr = jsonStr + "{ } ]";
+ jsonBuilder.append("{ } ]");
+ String jsonStr = jsonBuilder.toString();
if (UtilValidate.isEmpty(jsonStr)) {
Debug.logError("JSON Object was empty; fatal error!",module);
}
Modified: ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/category/CategoryWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/category/CategoryWorker.java?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/category/CategoryWorker.java (original)
+++ ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/category/CategoryWorker.java Tue Sep 20 17:46:13 2011
@@ -87,8 +87,7 @@ public class CategoryWorker {
for (GenericValue curCat: allCategories) {
Collection<GenericValue> parentCats = curCat.getRelatedCache("CurrentProductCategoryRollup");
- if (parentCats.isEmpty())
- results.add(curCat);
+ if (parentCats.isEmpty()) results.add(curCat);
}
} catch (GenericEntityException e) {
Debug.logWarning(e, module);
@@ -116,8 +115,7 @@ public class CategoryWorker {
public static void getRelatedCategories(ServletRequest request, String attributeName, String parentId, boolean limitView, boolean excludeEmpty) {
List<GenericValue> categories = getRelatedCategoriesRet(request, attributeName, parentId, limitView, excludeEmpty);
- if (!categories.isEmpty())
- request.setAttribute(attributeName, categories);
+ if (!categories.isEmpty()) request.setAttribute(attributeName, categories);
}
public static List<GenericValue> getRelatedCategoriesRet(ServletRequest request, String attributeName, String parentId, boolean limitView) {
Modified: ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/category/OfbizCatalogAltUrlTransform.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/category/OfbizCatalogAltUrlTransform.java?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/category/OfbizCatalogAltUrlTransform.java (original)
+++ ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/category/OfbizCatalogAltUrlTransform.java Tue Sep 20 17:46:13 2011
@@ -109,7 +109,6 @@ public class OfbizCatalogAltUrlTransform
String viewSort = getStringArg(args, "viewSort");
String searchString = getStringArg(args, "searchString");
if (req != null) {
-
HttpServletRequest request = (HttpServletRequest) req.getWrappedObject();
StringBuilder newURL = new StringBuilder();
if (UtilValidate.isNotEmpty(productId)) {
@@ -131,11 +130,11 @@ public class OfbizCatalogAltUrlTransform
if (UtilValidate.isNotEmpty(productId)) {
GenericValue product = delegator.findOne("Product", UtilMisc.toMap("productId", productId), false);
ProductContentWrapper wrapper = new ProductContentWrapper(dispatcher, product, locale, "text/html");
- url = CatalogUrlFilter.makeProductUrl(delegator, wrapper, ((StringModel) prefix).getAsString(), previousCategoryId, productCategoryId, productId);
+ url = CatalogUrlFilter.makeProductUrl(delegator, wrapper, null, ((StringModel) prefix).getAsString(), previousCategoryId, productCategoryId, productId);
} else {
GenericValue productCategory = delegator.findOne("ProductCategory", UtilMisc.toMap("productCategoryId", productCategoryId), false);
CategoryContentWrapper wrapper = new CategoryContentWrapper(dispatcher, productCategory, locale, "text/html");
- url = CatalogUrlFilter.makeCategoryUrl(delegator, wrapper, ((StringModel) prefix).getAsString(), previousCategoryId, productCategoryId, productId, viewSize, viewIndex, viewSort, searchString);
+ url = CatalogUrlFilter.makeCategoryUrl(delegator, wrapper, null, ((StringModel) prefix).getAsString(), previousCategoryId, productCategoryId, productId, viewSize, viewIndex, viewSort, searchString);
}
out.write(url.toString());
} else {
Modified: ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java (original)
+++ ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/imagemanagement/ImageManagementServices.java Tue Sep 20 17:46:13 2011
@@ -104,7 +104,7 @@ public class ImageManagementServices {
if (!rootTargetDir.exists()) {
boolean created = rootTargetDir.mkdirs();
if (!created) {
- String errMsg = "Not create target directory";
+ String errMsg = "Cannot create the target directory";
Debug.logFatal(errMsg, module);
return ServiceUtil.returnError(errMsg);
}
@@ -187,7 +187,7 @@ public class ImageManagementServices {
if (!targetDir.exists()) {
boolean created = targetDir.mkdirs();
if (!created) {
- String errMsg = "Not create target directory";
+ String errMsg = "Cannot create the target directory";
Debug.logFatal(errMsg, module);
return ServiceUtil.returnError(errMsg);
}
Modified: ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/price/PriceServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/price/PriceServices.java?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/price/PriceServices.java (original)
+++ ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/price/PriceServices.java Tue Sep 20 17:46:13 2011
@@ -229,17 +229,9 @@ public class PriceServices {
productPrices = EntityUtil.filterByDate(productPrices, true);
// ===== get the prices we need: list, default, average cost, promo, min, max =====
- List<GenericValue> listPrices = EntityUtil.filterByAnd(productPrices, UtilMisc.toMap("productPriceTypeId", "LIST_PRICE"));
- GenericValue listPriceValue = EntityUtil.getFirst(listPrices);
- if (listPrices != null && listPrices.size() > 1) {
- if (Debug.infoOn()) Debug.logInfo("There is more than one LIST_PRICE with the currencyUomId " + currencyDefaultUomId + " and productId " + productId + ", using the latest found with price: " + listPriceValue.getBigDecimal("price"), module);
- }
-
- List<GenericValue> defaultPrices = EntityUtil.filterByAnd(productPrices, UtilMisc.toMap("productPriceTypeId", "DEFAULT_PRICE"));
- GenericValue defaultPriceValue = EntityUtil.getFirst(defaultPrices);
- if (defaultPrices != null && defaultPrices.size() > 1) {
- if (Debug.infoOn()) Debug.logInfo("There is more than one DEFAULT_PRICE with the currencyUomId " + currencyDefaultUomId + " and productId " + productId + ", using the latest found with price: " + defaultPriceValue.getBigDecimal("price"), module);
- }
+ // if any of these prices is missing and this product is a variant, default to the corresponding price on the virtual product
+ GenericValue listPriceValue = getPriceValueForType("LIST_PRICE", productPrices, virtualProductPrices);
+ GenericValue defaultPriceValue = getPriceValueForType("DEFAULT_PRICE", productPrices, virtualProductPrices);
// If there is an agreement between the company and the client, and there is
// a price for the product in it, it will override the default price of the
@@ -258,107 +250,13 @@ public class PriceServices {
}
}
- List<GenericValue> competitivePrices = EntityUtil.filterByAnd(productPrices, UtilMisc.toMap("productPriceTypeId", "COMPETITIVE_PRICE"));
- GenericValue competitivePriceValue = EntityUtil.getFirst(competitivePrices);
- if (competitivePrices != null && competitivePrices.size() > 1) {
- if (Debug.infoOn()) Debug.logInfo("There is more than one COMPETITIVE_PRICE with the currencyUomId " + currencyDefaultUomId + " and productId " + productId + ", using the latest found with price: " + competitivePriceValue.getBigDecimal("price"), module);
- }
-
- List<GenericValue> averageCosts = EntityUtil.filterByAnd(productPrices, UtilMisc.toMap("productPriceTypeId", "AVERAGE_COST"));
- GenericValue averageCostValue = EntityUtil.getFirst(averageCosts);
- if (averageCosts != null && averageCosts.size() > 1) {
- if (Debug.infoOn()) Debug.logInfo("There is more than one AVERAGE_COST with the currencyUomId " + currencyDefaultUomId + " and productId " + productId + ", using the latest found with price: " + averageCostValue.getBigDecimal("price"), module);
- }
-
- List<GenericValue> promoPrices = EntityUtil.filterByAnd(productPrices, UtilMisc.toMap("productPriceTypeId", "PROMO_PRICE"));
- GenericValue promoPriceValue = EntityUtil.getFirst(promoPrices);
- if (promoPrices != null && promoPrices.size() > 1) {
- if (Debug.infoOn()) Debug.logInfo("There is more than one PROMO_PRICE with the currencyUomId " + currencyDefaultUomId + " and productId " + productId + ", using the latest found with price: " + promoPriceValue.getBigDecimal("price"), module);
- }
-
- List<GenericValue> minimumPrices = EntityUtil.filterByAnd(productPrices, UtilMisc.toMap("productPriceTypeId", "MINIMUM_PRICE"));
- GenericValue minimumPriceValue = EntityUtil.getFirst(minimumPrices);
- if (minimumPrices != null && minimumPrices.size() > 1) {
- if (Debug.infoOn()) Debug.logInfo("There is more than one MINIMUM_PRICE with the currencyUomId " + currencyDefaultUomId + " and productId " + productId + ", using the latest found with price: " + minimumPriceValue.getBigDecimal("price"), module);
- }
-
- List<GenericValue> maximumPrices = EntityUtil.filterByAnd(productPrices, UtilMisc.toMap("productPriceTypeId", "MAXIMUM_PRICE"));
- GenericValue maximumPriceValue = EntityUtil.getFirst(maximumPrices);
- if (maximumPrices != null && maximumPrices.size() > 1) {
- if (Debug.infoOn()) Debug.logInfo("There is more than one MAXIMUM_PRICE with the currencyUomId " + currencyDefaultUomId + " and productId " + productId + ", using the latest found with price: " + maximumPriceValue.getBigDecimal("price"), module);
- }
-
- List<GenericValue> wholesalePrices = EntityUtil.filterByAnd(productPrices, UtilMisc.toMap("productPriceTypeId", "WHOLESALE_PRICE"));
- GenericValue wholesalePriceValue = EntityUtil.getFirst(wholesalePrices);
- if (wholesalePrices != null && wholesalePrices.size() > 1) {
- if (Debug.infoOn()) Debug.logInfo("There is more than one WHOLESALE_PRICE with the currencyUomId " + currencyDefaultUomId + " and productId " + productId + ", using the latest found with price: " + wholesalePriceValue.getBigDecimal("price"), module);
- }
-
- List<GenericValue> specialPromoPrices = EntityUtil.filterByAnd(productPrices, UtilMisc.toMap("productPriceTypeId", "SPECIAL_PROMO_PRICE"));
- GenericValue specialPromoPriceValue = EntityUtil.getFirst(specialPromoPrices);
- if (specialPromoPrices != null && specialPromoPrices.size() > 1) {
- if (Debug.infoOn()) Debug.logInfo("There is more than one SPECIAL_PROMO_PRICE with the currencyUomId " + currencyDefaultUomId + " and productId " + productId + ", using the latest found with price: " + specialPromoPriceValue.getBigDecimal("price"), module);
- }
-
- // if any of these prices is missing and this product is a variant, default to the corresponding price on the virtual product
- if (UtilValidate.isNotEmpty(virtualProductPrices)) {
- if (listPriceValue == null) {
- List<GenericValue> virtualTempPrices = EntityUtil.filterByAnd(virtualProductPrices, UtilMisc.toMap("productPriceTypeId", "LIST_PRICE"));
- listPriceValue = EntityUtil.getFirst(virtualTempPrices);
- if (virtualTempPrices != null && virtualTempPrices.size() > 1) {
- if (Debug.infoOn()) Debug.logInfo("There is more than one LIST_PRICE with the currencyUomId " + currencyDefaultUomId + " and productId " + virtualProductId + ", using the latest found with price: " + listPriceValue.getBigDecimal("price"), module);
- }
- }
- if (defaultPriceValue == null) {
- List<GenericValue> virtualTempPrices = EntityUtil.filterByAnd(virtualProductPrices, UtilMisc.toMap("productPriceTypeId", "DEFAULT_PRICE"));
- defaultPriceValue = EntityUtil.getFirst(virtualTempPrices);
- if (virtualTempPrices != null && virtualTempPrices.size() > 1) {
- if (Debug.infoOn()) Debug.logInfo("There is more than one DEFAULT_PRICE with the currencyUomId " + currencyDefaultUomId + " and productId " + virtualProductId + ", using the latest found with price: " + defaultPriceValue.getBigDecimal("price"), module);
- }
- }
- if (averageCostValue == null) {
- List<GenericValue> virtualTempPrices = EntityUtil.filterByAnd(virtualProductPrices, UtilMisc.toMap("productPriceTypeId", "AVERAGE_COST"));
- averageCostValue = EntityUtil.getFirst(virtualTempPrices);
- if (virtualTempPrices != null && virtualTempPrices.size() > 1) {
- if (Debug.infoOn()) Debug.logInfo("There is more than one AVERAGE_COST with the currencyUomId " + currencyDefaultUomId + " and productId " + virtualProductId + ", using the latest found with price: " + averageCostValue.getBigDecimal("price"), module);
- }
- }
- if (promoPriceValue == null) {
- List<GenericValue> virtualTempPrices = EntityUtil.filterByAnd(virtualProductPrices, UtilMisc.toMap("productPriceTypeId", "PROMO_PRICE"));
- promoPriceValue = EntityUtil.getFirst(virtualTempPrices);
- if (virtualTempPrices != null && virtualTempPrices.size() > 1) {
- if (Debug.infoOn()) Debug.logInfo("There is more than one PROMO_PRICE with the currencyUomId " + currencyDefaultUomId + " and productId " + virtualProductId + ", using the latest found with price: " + promoPriceValue.getBigDecimal("price"), module);
- }
- }
- if (minimumPriceValue == null) {
- List<GenericValue> virtualTempPrices = EntityUtil.filterByAnd(virtualProductPrices, UtilMisc.toMap("productPriceTypeId", "MINIMUM_PRICE"));
- minimumPriceValue = EntityUtil.getFirst(virtualTempPrices);
- if (virtualTempPrices != null && virtualTempPrices.size() > 1) {
- if (Debug.infoOn()) Debug.logInfo("There is more than one MINIMUM_PRICE with the currencyUomId " + currencyDefaultUomId + " and productId " + virtualProductId + ", using the latest found with price: " + minimumPriceValue.getBigDecimal("price"), module);
- }
- }
- if (maximumPriceValue == null) {
- List<GenericValue> virtualTempPrices = EntityUtil.filterByAnd(virtualProductPrices, UtilMisc.toMap("productPriceTypeId", "MAXIMUM_PRICE"));
- maximumPriceValue = EntityUtil.getFirst(virtualTempPrices);
- if (virtualTempPrices != null && virtualTempPrices.size() > 1) {
- if (Debug.infoOn()) Debug.logInfo("There is more than one MAXIMUM_PRICE with the currencyUomId " + currencyDefaultUomId + " and productId " + virtualProductId + ", using the latest found with price: " + maximumPriceValue.getBigDecimal("price"), module);
- }
- }
- if (wholesalePriceValue == null) {
- List<GenericValue> virtualTempPrices = EntityUtil.filterByAnd(virtualProductPrices, UtilMisc.toMap("productPriceTypeId", "WHOLESALE_PRICE"));
- wholesalePriceValue = EntityUtil.getFirst(virtualTempPrices);
- if (virtualTempPrices != null && virtualTempPrices.size() > 1) {
- if (Debug.infoOn()) Debug.logInfo("There is more than one WHOLESALE_PRICE with the currencyUomId " + currencyDefaultUomId + " and productId " + virtualProductId + ", using the latest found with price: " + wholesalePriceValue.getBigDecimal("price"), module);
- }
- }
- if (specialPromoPriceValue == null) {
- List<GenericValue> virtualTempPrices = EntityUtil.filterByAnd(virtualProductPrices, UtilMisc.toMap("productPriceTypeId", "SPECIAL_PROMO_PRICE"));
- specialPromoPriceValue = EntityUtil.getFirst(virtualTempPrices);
- if (virtualTempPrices != null && virtualTempPrices.size() > 1) {
- if (Debug.infoOn()) Debug.logInfo("There is more than one SPECIAL_PROMO_PRICE with the currencyUomId " + currencyDefaultUomId + " and productId " + virtualProductId + ", using the latest found with price: " + specialPromoPriceValue.getBigDecimal("price"), module);
- }
- }
- }
+ GenericValue competitivePriceValue = getPriceValueForType("COMPETITIVE_PRICE", productPrices, virtualProductPrices);
+ GenericValue averageCostValue = getPriceValueForType("AVERAGE_COST", productPrices, virtualProductPrices);
+ GenericValue promoPriceValue = getPriceValueForType("PROMO_PRICE", productPrices, virtualProductPrices);
+ GenericValue minimumPriceValue = getPriceValueForType("MINIMUM_PRICE", productPrices, virtualProductPrices);
+ GenericValue maximumPriceValue = getPriceValueForType("MAXIMUM_PRICE", productPrices, virtualProductPrices);
+ GenericValue wholesalePriceValue = getPriceValueForType("WHOLESALE_PRICE", productPrices, virtualProductPrices);
+ GenericValue specialPromoPriceValue = getPriceValueForType("SPECIAL_PROMO_PRICE", productPrices, virtualProductPrices);
// now if this is a virtual product check each price type, if doesn't exist get from variant with lowest DEFAULT_PRICE
if ("Y".equals(product.getString("isVirtual"))) {
@@ -398,67 +296,31 @@ public class PriceServices {
if (variantProductPrices != null) {
// we have some other options, give 'em a go...
if (listPriceValue == null) {
- List<GenericValue> virtualTempPrices = EntityUtil.filterByAnd(variantProductPrices, UtilMisc.toMap("productPriceTypeId", "LIST_PRICE"));
- listPriceValue = EntityUtil.getFirst(virtualTempPrices);
- if (virtualTempPrices != null && virtualTempPrices.size() > 1) {
- if (Debug.infoOn()) Debug.logInfo("There is more than one LIST_PRICE with the currencyUomId " + currencyDefaultUomId + " and productId " + variantProductId + ", using the latest found with price: " + listPriceValue.getBigDecimal("price"), module);
- }
+ listPriceValue = getPriceValueForType("LIST_PRICE", variantProductPrices, null);
}
if (defaultPriceValue == null) {
- List<GenericValue> virtualTempPrices = EntityUtil.filterByAnd(variantProductPrices, UtilMisc.toMap("productPriceTypeId", "DEFAULT_PRICE"));
- defaultPriceValue = EntityUtil.getFirst(virtualTempPrices);
- if (virtualTempPrices != null && virtualTempPrices.size() > 1) {
- if (Debug.infoOn()) Debug.logInfo("There is more than one DEFAULT_PRICE with the currencyUomId " + currencyDefaultUomId + " and productId " + variantProductId + ", using the latest found with price: " + defaultPriceValue.getBigDecimal("price"), module);
- }
+ defaultPriceValue = getPriceValueForType("DEFAULT_PRICE", variantProductPrices, null);
}
if (competitivePriceValue == null) {
- List<GenericValue> virtualTempPrices = EntityUtil.filterByAnd(variantProductPrices, UtilMisc.toMap("productPriceTypeId", "COMPETITIVE_PRICE"));
- competitivePriceValue = EntityUtil.getFirst(virtualTempPrices);
- if (virtualTempPrices != null && virtualTempPrices.size() > 1) {
- if (Debug.infoOn()) Debug.logInfo("There is more than one COMPETITIVE_PRICE with the currencyUomId " + currencyDefaultUomId + " and productId " + variantProductId + ", using the latest found with price: " + competitivePriceValue.getBigDecimal("price"), module);
- }
+ competitivePriceValue = getPriceValueForType("COMPETITIVE_PRICE", variantProductPrices, null);
}
if (averageCostValue == null) {
- List<GenericValue> virtualTempPrices = EntityUtil.filterByAnd(variantProductPrices, UtilMisc.toMap("productPriceTypeId", "AVERAGE_COST"));
- averageCostValue = EntityUtil.getFirst(virtualTempPrices);
- if (virtualTempPrices != null && virtualTempPrices.size() > 1) {
- if (Debug.infoOn()) Debug.logInfo("There is more than one AVERAGE_COST with the currencyUomId " + currencyDefaultUomId + " and productId " + variantProductId + ", using the latest found with price: " + averageCostValue.getBigDecimal("price"), module);
- }
+ averageCostValue = getPriceValueForType("AVERAGE_COST", variantProductPrices, null);
}
if (promoPriceValue == null) {
- List<GenericValue> virtualTempPrices = EntityUtil.filterByAnd(variantProductPrices, UtilMisc.toMap("productPriceTypeId", "PROMO_PRICE"));
- promoPriceValue = EntityUtil.getFirst(virtualTempPrices);
- if (virtualTempPrices != null && virtualTempPrices.size() > 1) {
- if (Debug.infoOn()) Debug.logInfo("There is more than one PROMO_PRICE with the currencyUomId " + currencyDefaultUomId + " and productId " + variantProductId + ", using the latest found with price: " + promoPriceValue.getBigDecimal("price"), module);
- }
+ promoPriceValue = getPriceValueForType("PROMO_PRICE", variantProductPrices, null);
}
if (minimumPriceValue == null) {
- List<GenericValue> virtualTempPrices = EntityUtil.filterByAnd(variantProductPrices, UtilMisc.toMap("productPriceTypeId", "MINIMUM_PRICE"));
- minimumPriceValue = EntityUtil.getFirst(virtualTempPrices);
- if (virtualTempPrices != null && virtualTempPrices.size() > 1) {
- if (Debug.infoOn()) Debug.logInfo("There is more than one MINIMUM_PRICE with the currencyUomId " + currencyDefaultUomId + " and productId " + variantProductId + ", using the latest found with price: " + minimumPriceValue.getBigDecimal("price"), module);
- }
+ minimumPriceValue = getPriceValueForType("MINIMUM_PRICE", variantProductPrices, null);
}
if (maximumPriceValue == null) {
- List<GenericValue> virtualTempPrices = EntityUtil.filterByAnd(variantProductPrices, UtilMisc.toMap("productPriceTypeId", "MAXIMUM_PRICE"));
- maximumPriceValue = EntityUtil.getFirst(virtualTempPrices);
- if (virtualTempPrices != null && virtualTempPrices.size() > 1) {
- if (Debug.infoOn()) Debug.logInfo("There is more than one MAXIMUM_PRICE with the currencyUomId " + currencyDefaultUomId + " and productId " + variantProductId + ", using the latest found with price: " + maximumPriceValue.getBigDecimal("price"), module);
- }
+ maximumPriceValue = getPriceValueForType("MAXIMUM_PRICE", variantProductPrices, null);
}
if (wholesalePriceValue == null) {
- List<GenericValue> virtualTempPrices = EntityUtil.filterByAnd(variantProductPrices, UtilMisc.toMap("productPriceTypeId", "WHOLESALE_PRICE"));
- wholesalePriceValue = EntityUtil.getFirst(virtualTempPrices);
- if (virtualTempPrices != null && virtualTempPrices.size() > 1) {
- if (Debug.infoOn()) Debug.logInfo("There is more than one WHOLESALE_PRICE with the currencyUomId " + currencyDefaultUomId + " and productId " + variantProductId + ", using the latest found with price: " + wholesalePriceValue.getBigDecimal("price"), module);
- }
+ wholesalePriceValue = getPriceValueForType("WHOLESALE_PRICE", variantProductPrices, null);
}
if (specialPromoPriceValue == null) {
- List<GenericValue> virtualTempPrices = EntityUtil.filterByAnd(variantProductPrices, UtilMisc.toMap("productPriceTypeId", "SPECIAL_PROMO_PRICE"));
- specialPromoPriceValue = EntityUtil.getFirst(virtualTempPrices);
- if (virtualTempPrices != null && virtualTempPrices.size() > 1) {
- if (Debug.infoOn()) Debug.logInfo("There is more than one SPECIAL_PROMO_PRICE with the currencyUomId " + currencyDefaultUomId + " and productId " + variantProductId + ", using the latest found with price: " + wholesalePriceValue.getBigDecimal("price"), module);
- }
+ specialPromoPriceValue = getPriceValueForType("SPECIAL_PROMO_PRICE", variantProductPrices, null);
}
}
} catch (GenericEntityException e) {
@@ -715,6 +577,18 @@ public class PriceServices {
return result;
}
+ private static GenericValue getPriceValueForType(String productPriceTypeId, List<GenericValue> productPriceList, List<GenericValue> secondaryPriceList) {
+ List<GenericValue> filteredPrices = EntityUtil.filterByAnd(productPriceList, UtilMisc.toMap("productPriceTypeId", productPriceTypeId));
+ GenericValue priceValue = EntityUtil.getFirst(filteredPrices);
+ if (filteredPrices != null && filteredPrices.size() > 1) {
+ if (Debug.infoOn()) Debug.logInfo("There is more than one " + productPriceTypeId + " with the currencyUomId " + priceValue.getString("currencyUomId") + " and productId " + priceValue.getString("productId") + ", using the latest found with price: " + priceValue.getBigDecimal("price"), module);
+ }
+ if (priceValue == null && secondaryPriceList != null) {
+ return getPriceValueForType(productPriceTypeId, secondaryPriceList, null);
+ }
+ return priceValue;
+ }
+
public static Map<String, Object> addGeneralResults(Map<String, Object> result, GenericValue competitivePriceValue, GenericValue specialPromoPriceValue, GenericValue productStore,
String checkIncludeVat, String currencyUomId, String productId, BigDecimal quantity, String partyId, LocalDispatcher dispatcher, Locale locale) {
result.put("competitivePrice", competitivePriceValue != null ? competitivePriceValue.getBigDecimal("price") : null);
Modified: ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java (original)
+++ ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/product/ProductSearchEvents.java Tue Sep 20 17:46:13 2011
@@ -314,7 +314,7 @@ public class ProductSearchEvents {
pfa.create();
numAdded++;
}
- Map<String, String> messageMap = UtilMisc.toMap("numAdded", Integer.valueOf(numAdded), "productFeatureId", productFeatureId);
+ Map<String, Object> messageMap = UtilMisc.toMap("numAdded", Integer.valueOf(numAdded), "productFeatureId", productFeatureId);
String eventMsg = UtilProperties.getMessage(resource, "productSearchEvents.added_param_features", messageMap, locale) + ".";
request.setAttribute("_EVENT_MESSAGE_", eventMsg);
eli.close();
@@ -364,7 +364,7 @@ public class ProductSearchEvents {
String productId = searchResultView.getString("mainProductId");
numRemoved += delegator.removeByAnd("ProductFeatureAppl", UtilMisc.toMap("productId", productId, "productFeatureId", productFeatureId));
}
- Map<String, String> messageMap = UtilMisc.toMap("numRemoved", Integer.valueOf(numRemoved), "productFeatureId", productFeatureId);
+ Map<String, Object> messageMap = UtilMisc.toMap("numRemoved", Integer.valueOf(numRemoved), "productFeatureId", productFeatureId);
String eventMsg = UtilProperties.getMessage(resource, "productSearchEvents.removed_param_features", messageMap, locale) + ".";
request.setAttribute("_EVENT_MESSAGE_", eventMsg);
eli.close();
Modified: ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/product/ProductWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/product/ProductWorker.java?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/product/ProductWorker.java (original)
+++ ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/product/product/ProductWorker.java Tue Sep 20 17:46:13 2011
@@ -62,7 +62,7 @@ public class ProductWorker {
String errMsg = "";
if (product != null) {
String productTypeId = product.getString("productTypeId");
- if ("SERVICE".equals(productTypeId) || (ProductWorker.isDigital(product) && !ProductWorker.isPhysical(product))) {
+ if ("SERVICE".equals(productTypeId) || "SERVICE_PRODUCT".equals(productTypeId) || (ProductWorker.isDigital(product) && !ProductWorker.isPhysical(product))) {
// don't charge shipping on services or digital goods
return false;
}
Modified: ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java (original)
+++ ofbiz/branches/jackrabbit20100709/applications/product/src/org/ofbiz/shipment/shipment/ShipmentServices.java Tue Sep 20 17:46:13 2011
@@ -1030,7 +1030,7 @@ public class ShipmentServices {
// TODO: This may not need to be done asynchronously. The reason it's done that way right now is that calling it synchronously means that
// if we can't confirm a single shipment, then all shipment route segments in a multi-form are rolled back.
try {
- Map<String, String> input = UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId, "userLogin", userLogin);
+ Map<String, Object> input = UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", shipmentRouteSegmentId, "userLogin", userLogin);
// for DHL, we just need to confirm the shipment to get the label. Other carriers may have more elaborate requirements.
if (carrierPartyId.equals("DHL")) {
dispatcher.runAsync("dhlShipmentConfirm", input);
Modified: ofbiz/branches/jackrabbit20100709/applications/product/webapp/catalog/WEB-INF/actions/category/CategoryTree.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/webapp/catalog/WEB-INF/actions/category/CategoryTree.groovy?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/product/webapp/catalog/WEB-INF/actions/category/CategoryTree.groovy (original)
+++ ofbiz/branches/jackrabbit20100709/applications/product/webapp/catalog/WEB-INF/actions/category/CategoryTree.groovy Tue Sep 20 17:46:13 2011
@@ -22,69 +22,44 @@
* should not contain order component's specific code.
*/
import org.ofbiz.entity.util.EntityUtil;
-import org.ofbiz.base.util.*;
-import org.ofbiz.product.catalog.*;
-import org.ofbiz.product.category.*;
import javolution.util.FastMap;
import javolution.util.FastList;
-import javolution.util.FastList.*;
-import org.ofbiz.entity.*;
-import java.util.List;
// Put the result of CategoryWorker.getRelatedCategories into the separateRootType function as attribute.
// The separateRootType function will return the list of category of given catalog.
// PLEASE NOTE : The structure of the list of separateRootType function is according to the JSON_DATA plugin of the jsTree.
-completedTree = FastList.newInstance();
-
List separateRootType(roots) {
if(roots) {
- prodRootTypeTree = FastList.newInstance();
- def i = 0;
- for(root in roots) {
- prodCatalogMap2 = FastMap.newInstance();
- prodCatalogTree2 = FastList.newInstance();
- prodCatalogCategories = FastList.newInstance();
- prodCatalog = root.getRelatedOne("ProductCategory");
-
- productCat = root.getRelatedOne("ProductCategory");
- prodCatalogId = productCat.getString("productCategoryId");
- prodCatalogMap2.put("productCategoryId", prodCatalogId);
- prodCatalogMap2.put("categoryName", productCat.getString("categoryName"));
- prodCatalogMap2.put("isCatalog", false)
- prodCatalogMap.put("isCategoryType", true);
-
- i++;
-
- prodRootTypeTree.add(prodCatalogMap2);
+ prodRootTypeTree = [];
+ roots.each { root ->
+ prodCateMap = [:];
+ productCategory = root.getRelatedOne("ProductCategory");
+ prodCateMap.productCategoryId = productCategory.getString("productCategoryId");
+ prodCateMap.categoryName = productCategory.getString("categoryName");
+ prodCateMap.isCatalog = false;
+ prodCateMap.isCategoryType = true;
+ prodRootTypeTree.add(prodCateMap);
}
return prodRootTypeTree;
}
}
+completedTree = [];
// Get the Catalogs
prodCatalogs = delegator.findByAnd("ProdCatalog");
-
-if (prodCatalogs.size() > 0) {
- for (i = 0; i < prodCatalogs.size(); i++) {
-
- prodCatalogMap = FastMap.newInstance();
- prodCatalog = prodCatalogs[i];
- prodCatalogId = prodCatalog.getString("prodCatalogId");
- prodCatalogMap.put("productCategoryId", prodCatalogId);
- prodCatalogMap.put("categoryName", prodCatalog.getString("catalogName"));
- prodCatalogMap.put("isCatalog", true);
- prodCatalogMap.put("isCategoryType", false);
-
+if (prodCatalogs) {
+ prodCatalogs.each { prodCatalog ->
+ prodCatalogMap = [:];
+ prodCatalogMap.productCategoryId = prodCatalog.getString("prodCatalogId");
+ prodCatalogMap.categoryName = prodCatalog.getString("catalogName");
+ prodCatalogMap.isCatalog = true;
+ prodCatalogMap.isCategoryType = false;
prodCatalogCategories = EntityUtil.filterByDate(delegator.findByAnd("ProdCatalogCategory", ["prodCatalogId" : prodCatalog.prodCatalogId]));
-
- prodCatalogTree = FastList.newInstance();
-
if (prodCatalogCategories) {
- prodCatalogTree = separateRootType(prodCatalogCategories);
- prodCatalogMap.put("child", prodCatalogTree);
- completedTree.add(prodCatalogMap);
+ prodCatalogMap.child = separateRootType(prodCatalogCategories);
}
+ completedTree.add(prodCatalogMap);
}
}
// The complete tree list for the category tree
Modified: ofbiz/branches/jackrabbit20100709/applications/product/webapp/catalog/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/webapp/catalog/WEB-INF/controller.xml?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/product/webapp/catalog/WEB-INF/controller.xml (original)
+++ ofbiz/branches/jackrabbit20100709/applications/product/webapp/catalog/WEB-INF/controller.xml Tue Sep 20 17:46:13 2011
@@ -344,52 +344,6 @@ under the License.
<response name="error" type="view" value="EditCategoryParties"/>
</request-map>
- <!-- ================ Category Content Requests ================= -->
- <request-map uri="EditCategoryContent">
- <security https="true" auth="true"/>
- <response name="success" type="view" value="EditCategoryContent"/>
- </request-map>
- <request-map uri="updateCategoryContent">
- <security https="true" auth="true"/>
- <event type="service" path="" invoke="updateCategory"/>
- <response name="success" type="view" value="EditCategoryContent"/>
- <response name="error" type="view" value="EditCategoryContent"/>
- </request-map>
-
- <!-- ================ Category Content Assoc Requests ================= -->
- <request-map uri="EditCategoryContentContent">
- <security https="true" auth="true"/>
- <response name="success" type="view" value="EditCategoryContentContent"/>
- </request-map>
- <request-map uri="prepareAddContentToCategory">
- <security https="true" auth="true"/>
- <response name="success" type="view" value="EditCategoryContentContent"/>
- </request-map>
- <request-map uri="addContentToCategory">
- <security https="true" auth="true"/>
- <event type="service" path="" invoke="createCategoryContent"/>
- <response name="success" type="view" value="EditCategoryContent"/>
- <response name="error" type="view" value="EditCategoryContent"/>
- </request-map>
- <request-map uri="updateContentToCategory">
- <security https="true" auth="true"/>
- <event type="service" path="" invoke="updateCategoryContent"/>
- <response name="success" type="view" value="EditCategoryContent"/>
- <response name="error" type="view" value="EditCategoryContent"/>
- </request-map>
- <request-map uri="removeContentFromCategory">
- <security https="true" auth="true"/>
- <event type="service" path="" invoke="removeCategoryContent"/>
- <response name="success" type="view" value="EditCategoryContent"/>
- <response name="error" type="view" value="EditCategoryContent"/>
- </request-map>
- <request-map uri="createSimpleTextContentForAlternateLocaleInCategory">
- <security https="true" auth="true"/>
- <event type="service" path="" invoke="createSimpleTextContentForAlternateLocale"/>
- <response name="success" type="view" value="EditCategoryContent"/>
- <response name="error" type="view" value="EditCategoryContentContent"/>
- </request-map>
-
<!-- ================ Product Category Attribute Requests ================= -->
<request-map uri="EditCategoryAttributes">
<security https="true" auth="true"/>
@@ -674,6 +628,12 @@ under the License.
<response name="success" type="view" value="EditProductContent"/>
<response name="error" type="view" value="EditProductContentContent"/>
</request-map>
+ <request-map uri="createSimpleTextContentForAlternateLocaleInCategory">
+ <security https="true" auth="true"/>
+ <event type="service" path="" invoke="createSimpleTextContentForAlternateLocale"/>
+ <response name="success" type="view" value="EditCategoryContent"/>
+ <response name="error" type="view" value="EditCategoryContentContent"/>
+ </request-map>
<!-- ================ Product Content Assoc Requests ================= -->
<request-map uri="EditProductContentContent">
@@ -2879,10 +2839,6 @@ under the License.
<response name="success" type="view" value="viewPreviewImage"/>
<response name="error" type="view" value="viewPreviewImage"/>
</request-map>
- <request-map uri="LookupProduct">
- <security auth="true" https="true"/>
- <response name="success" type="view" value="LookupProduct"/>
- </request-map>
<request-map uri="LookupImage">
<security https="true" auth="true"/>
<response name="success" type="view" value="LookupImage"/>
Modified: ofbiz/branches/jackrabbit20100709/applications/product/widget/catalog/CatalogMenus.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/widget/catalog/CatalogMenus.xml?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/product/widget/catalog/CatalogMenus.xml (original)
+++ ofbiz/branches/jackrabbit20100709/applications/product/widget/catalog/CatalogMenus.xml Tue Sep 20 17:46:13 2011
@@ -156,7 +156,7 @@ under the License.
<not><if-empty field="productCategory"/></not>
</condition>
<link target="createProductInCategoryStart">
- <parameter param-name="prodCatalogId"/>
+ <parameter param-name="productCategoryId"/>
</link>
</menu-item>
<menu-item name="AdvancedSearch" title="${uiLabelMap.ProductSearchInCategory}" widget-style="buttontext search">
@@ -471,7 +471,10 @@ under the License.
</menu-item>
<menu-item name="EditProductAssetUsage" title="${uiLabelMap.ProductAssetUsage}">
<condition>
- <if-compare field="product.productTypeId" operator="equals" value="ASSET_USAGE"/>
+ <or>
+ <if-compare field="product.productTypeId" operator="equals" value="ASSET_USAGE"/>
+ <if-compare field="product.productTypeId" operator="equals" value="ASSET_USAGE_OUT_IN"/>
+ </or>
</condition>
<link target="EditProductAssetUsage">
<parameter param-name="productId"/>
Modified: ofbiz/branches/jackrabbit20100709/applications/product/widget/catalog/ProductForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jackrabbit20100709/applications/product/widget/catalog/ProductForms.xml?rev=1173274&r1=1173273&r2=1173274&view=diff
==============================================================================
--- ofbiz/branches/jackrabbit20100709/applications/product/widget/catalog/ProductForms.xml (original)
+++ ofbiz/branches/jackrabbit20100709/applications/product/widget/catalog/ProductForms.xml Tue Sep 20 17:46:13 2011
@@ -47,7 +47,7 @@ under the License.
<parameter param-name="productId"/>
</hyperlink>
</field>
-
+ <field name="productTypeId" sort-field="true"><display-entity entity-name="ProductType" description="${description}"/></field>
<field name="internalName" sort-field="true"><display/></field>
<field name="brandName" sort-field="true"><display/></field>
<field name="productName" sort-field="true"><display/></field>