You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2014/11/15 22:22:17 UTC
svn commit: r1639922 - in /ofbiz/branches/release12.04: ./
applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/
applications/product/config/
applications/product/script/org/ofbiz/product/store/
Author: jleroux
Date: Sat Nov 15 21:22:16 2014
New Revision: 1639922
URL: http://svn.apache.org/r1639922
Log:
"Applied fix from trunk for revision: 1639841"
------------------------------------------------------------------------
r1639841 | ashish | 2014-11-15 08:07:36 +0100 (sam. 15 nov. 2014) | 2 lignes
Applied patch from jira issue - OFBIZ-904 - Error when "Inventory Facility Id" is left blank in product store settings.
Thanks Michel for creating the issue and Thanks Arun Arun for providing the patch.
------------------------------------------------------------------------
Modified:
ofbiz/branches/release12.04/ (props changed)
ofbiz/branches/release12.04/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductSummary.groovy
ofbiz/branches/release12.04/applications/product/config/ProductUiLabels.xml
ofbiz/branches/release12.04/applications/product/script/org/ofbiz/product/store/ProductStoreServices.xml
Propchange: ofbiz/branches/release12.04/
------------------------------------------------------------------------------
Merged /ofbiz/trunk:r1639841
Modified: ofbiz/branches/release12.04/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductSummary.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/release12.04/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductSummary.groovy?rev=1639922&r1=1639921&r2=1639922&view=diff
==============================================================================
--- ofbiz/branches/release12.04/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductSummary.groovy (original)
+++ ofbiz/branches/release12.04/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/ProductSummary.groovy Sat Nov 15 21:22:16 2014
@@ -24,6 +24,7 @@
import org.ofbiz.base.util.*;
import org.ofbiz.entity.*;
+import org.ofbiz.entity.condition.*;
import org.ofbiz.entity.util.*;
import org.ofbiz.service.*;
import org.ofbiz.product.product.ProductContentWrapper;
@@ -51,6 +52,14 @@ if (cart.isSalesOrder()) {
context.productStoreId = productStoreId;
facilityId = productStore.inventoryFacilityId;
}
+
+if (!facilityId) {
+ productStoreFacility = EntityQuery.use(delegator).select("facilityId").from("ProductStoreFacility").where(UtilMisc.toList(EntityCondition.makeCondition("productStoreId", EntityOperator.EQUALS, productStoreId))).queryFirst();
+ if (productStoreFacility) {
+ facilityId = productStoreFacility.facilityId;
+ }
+}
+
autoUserLogin = session.getAttribute("autoUserLogin");
userLogin = session.getAttribute("userLogin");
Modified: ofbiz/branches/release12.04/applications/product/config/ProductUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release12.04/applications/product/config/ProductUiLabels.xml?rev=1639922&r1=1639921&r2=1639922&view=diff
==============================================================================
--- ofbiz/branches/release12.04/applications/product/config/ProductUiLabels.xml (original)
+++ ofbiz/branches/release12.04/applications/product/config/ProductUiLabels.xml Sat Nov 15 21:22:16 2014
@@ -6176,6 +6176,9 @@
<value xml:lang="th">ยิà¸à¸à¸µà¸à¹à¸à¸à¸£à¸±à¸à¸ªà¸¹à¹à¸£à¸à¸à¸à¸²à¸£à¸à¸±à¸à¸à¸²à¸£à¸£à¸¹à¸à¸ าà¸</value>
<value xml:lang="vi">Chà o mừng Äến vá»i ứng dụng hình ảnh</value>
</property>
+ <property key="InventoryFacilityIdRequired">
+ <value xml:lang="en">"Inventory Facility Id Required"</value>
+ </property>
<property key="MetaDescription">
<value xml:lang="en">Meta Description</value>
<value xml:lang="vi">Mô tả tiá»n tá»</value>
Modified: ofbiz/branches/release12.04/applications/product/script/org/ofbiz/product/store/ProductStoreServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release12.04/applications/product/script/org/ofbiz/product/store/ProductStoreServices.xml?rev=1639922&r1=1639921&r2=1639922&view=diff
==============================================================================
--- ofbiz/branches/release12.04/applications/product/script/org/ofbiz/product/store/ProductStoreServices.xml (original)
+++ ofbiz/branches/release12.04/applications/product/script/org/ofbiz/product/store/ProductStoreServices.xml Sat Nov 15 21:22:16 2014
@@ -25,6 +25,15 @@ under the License.
<fail-property resource="ProductUiLabels" property="ProductCatalogCreatePermissionError"/>
</check-permission>
<check-errors/>
+
+ <if-compare field="parameters.oneInventoryFacility" operator="equals" value="Y">
+ <if-empty field="parameters.inventoryFacilityId">
+ <add-error>
+ <fail-property property="InventoryFacilityIdRequired" resource="ProductUiLabels"/>
+ </add-error>
+ </if-empty>
+ <check-errors/>
+ </if-compare>
<if-compare field="parameters.showPricesWithVatTax" operator="equals" value="Y">
<if-empty field="parameters.vatTaxAuthGeoId">
@@ -65,6 +74,15 @@ under the License.
<fail-property resource="ProductUiLabels" property="ProductCatalogUpdatePermissionError"/>
</check-permission>
<check-errors/>
+
+ <if-compare field="parameters.oneInventoryFacility" operator="equals" value="Y">
+ <if-empty field="parameters.inventoryFacilityId">
+ <add-error>
+ <fail-property property="InventoryFacilityIdRequired" resource="ProductUiLabels"/>
+ </add-error>
+ </if-empty>
+ <check-errors/>
+ </if-compare>
<set from-field="parameters.productStoreId" field="lookupPKMap.productStoreId"/>
<find-by-primary-key entity-name="ProductStore" map="lookupPKMap" value-field="store"/>