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

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


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

commit e81d46e979d64f288b50da2f15c531b18b387cd8
Author: Nicolas Malin <nicolas.ma...@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

Reply via email to