svn commit: r1779725 - in /ofbiz/branches/release16.11: ./ applications/order/servicedef/services_return.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1779725 - in /ofbiz/branches/release16.11: ./ applications/order/servicedef/services_return.xml

jleroux@apache.org
Author: jleroux
Date: Sat Jan 21 11:15:58 2017
New Revision: 1779725

URL: http://svn.apache.org/viewvc?rev=1779725&view=rev
Log:
"Applied fix from trunk for revision: 1779724"
------------------------------------------------------------------------
r1779724 | jleroux | 2017-01-21 12:15:17 +0100 (sam. 21 janv. 2017) | 26 lignes

Fixed: "View Order" throws exception in getReturnableQuantity
(OFBIZ-9157)

Steps to Reproduce:
- Create a sales order
- Add 1 orderitem with no unitPrice set (unitPrice = null) for the product
- set the status of the order to completed
- go to order-management and try to open the order for display like:
https://localhost:8443/ordermgr/control/orderview?orderId=XXXXX

Expected:
- the order is displayed with status completed

Actual:
- A groovy exception is displayed.

Analysis:
The service "getReturnableQuantity" throws an exception because it returns the
returnablePrice = null, because the unitPrice of the orderItem was null.
The OUT field returnablePrice is mandatory according to the service-definition.
The return parameter is set but the value is null, hence the exception.

Solution: adjust the service-definition to allow for "null" value
of the returnablePrice OUT parameter.

Thanks: Leonard Lin
------------------------------------------------------------------------


Modified:
    ofbiz/branches/release16.11/   (props changed)
    ofbiz/branches/release16.11/applications/order/servicedef/services_return.xml

Propchange: ofbiz/branches/release16.11/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Jan 21 11:15:58 2017
@@ -10,4 +10,4 @@
 /ofbiz/branches/json-integration-refactoring:1634077-1635900
 /ofbiz/branches/multitenant20100310:921280-927264
 /ofbiz/branches/release13.07:1547657
-/ofbiz/trunk:1770481,1770490,1770540,1771440,1771448,1771516,1771935,1772346,1772880,1774772,1775441
+/ofbiz/trunk:1770481,1770490,1770540,1771440,1771448,1771516,1771935,1772346,1772880,1774772,1775441,1779724

Modified: ofbiz/branches/release16.11/applications/order/servicedef/services_return.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release16.11/applications/order/servicedef/services_return.xml?rev=1779725&r1=1779724&r2=1779725&view=diff
==============================================================================
--- ofbiz/branches/release16.11/applications/order/servicedef/services_return.xml (original)
+++ ofbiz/branches/release16.11/applications/order/servicedef/services_return.xml Sat Jan 21 11:15:58 2017
@@ -297,7 +297,7 @@ under the License.
         <description>Get the quantity allowed for an item to be returned</description>
         <attribute name="orderItem" type="org.apache.ofbiz.entity.GenericValue" mode="IN" optional="false"/>
         <attribute name="returnableQuantity" type="BigDecimal" mode="OUT" optional="false"/>
-        <attribute name="returnablePrice" type="BigDecimal" mode="OUT" optional="false"/>
+        <attribute name="returnablePrice" type="BigDecimal" mode="OUT" optional="true"/>
     </service>
     <service name="getReturnableItems" engine="java"
             location="org.apache.ofbiz.order.order.OrderReturnServices" invoke="getReturnableItems">