You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ja...@apache.org on 2007/03/11 18:32:07 UTC

svn commit: r516965 - /ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java

Author: jacopoc
Date: Sun Mar 11 10:32:06 2007
New Revision: 516965

URL: http://svn.apache.org/viewvc?view=rev&rev=516965
Log:
Fixed bug: attempt to retrieve a field from a wrong entity (ProductAssoc instead of Product).

Modified:
    ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java

Modified: ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java?view=diff&rev=516965&r1=516964&r2=516965
==============================================================================
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java (original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java Sun Mar 11 10:32:06 2007
@@ -1197,7 +1197,12 @@
                         Debug.logError(e, "Problem getting virtual product");
                     }
                     if (virtual != null) {
-                        pieces = virtual.getLong("piecesIncluded");
+                        try {
+                            GenericValue virtualProduct = virtual.getRelatedOne("MainProduct");
+                            pieces = virtualProduct.getLong("piecesIncluded");
+                        } catch (GenericEntityException e) {
+                            Debug.logError(e, "Problem getting virtual product");
+                        }
                     }
                 }