You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by nm...@apache.org on 2025/04/22 16:25:02 UTC

(ofbiz-framework) branch trunk updated: Fixed: ClassCastException on PO Receipt in OFBiz (OFBIZ-13225)

This is an automated email from the ASF dual-hosted git repository.

nmalin pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 890590d6aa Fixed: ClassCastException on PO Receipt in OFBiz (OFBIZ-13225)
890590d6aa is described below

commit 890590d6aa6cabc4b90fc18bd663abcfc93c680f
Author: Nicolas Malin <ni...@nereide.fr>
AuthorDate: Tue Apr 22 18:23:29 2025 +0200

    Fixed: ClassCastException on PO Receipt in OFBiz (OFBIZ-13225)
    
    When you realize a purchase order receipt the service receiveInventoryProduct return a success list with a message formatted by GString that raise an exception : 'GStringImpl cannot be cast to String'.
    
    The service finish as success but the screen behind failed due to this exception.
    
    To solve it we force the message as String
    
    Thanks to Yashwant Dhakad for raise this issue
---
 .../org/apache/ofbiz/product/shipment/ShipmentReceiptServices.groovy   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/applications/product/src/main/groovy/org/apache/ofbiz/product/shipment/ShipmentReceiptServices.groovy b/applications/product/src/main/groovy/org/apache/ofbiz/product/shipment/ShipmentReceiptServices.groovy
index 800784d943..09789c4d23 100644
--- a/applications/product/src/main/groovy/org/apache/ofbiz/product/shipment/ShipmentReceiptServices.groovy
+++ b/applications/product/src/main/groovy/org/apache/ofbiz/product/shipment/ShipmentReceiptServices.groovy
@@ -170,7 +170,8 @@ Map receiveInventoryProduct () {
         serviceInMap.inventoryItemId = currentInventoryItemId
         run service: 'balanceInventoryItems', with: serviceInMap
 
-        successMessageList << "Received ${parameters.quantityAccepted} of ${parameters.productId} in inventory item ${currentInventoryItemId}."
+        successMessageList << "Received ${parameters.quantityAccepted} of ${parameters.productId}"
+                .concat(" in inventory item ${currentInventoryItemId}.") as String
     }
     // return the last inventory item received
     result.inventoryItemId = currentInventoryItemId