details:   https://code.openbravo.com/erp/devel/pi/rev/f6988eb821e2
changeset: 32614:f6988eb821e2
user:      Atul Gaware <atul.gaware <at> openbravo.com>
date:      Mon Sep 04 11:38:56 2017 +0530
summary:   Fixes issue 36760: Error when running a Landing Cost

To avoid org.hibernate.LazyInitializationException Landed Cost Cost Object
is re-initialized

diffstat:

 src/org/openbravo/costing/LandedCostProcess.java |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (20 lines):

diff -r 11df05ad2807 -r f6988eb821e2 
src/org/openbravo/costing/LandedCostProcess.java
--- a/src/org/openbravo/costing/LandedCostProcess.java  Mon Sep 04 09:23:10 
2017 +0200
+++ b/src/org/openbravo/costing/LandedCostProcess.java  Mon Sep 04 11:38:56 
2017 +0530
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2014-2015 Openbravo SLU
+ * All portions are Copyright (C) 2014-2017 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  *************************************************************************
@@ -183,6 +183,7 @@
     criteria.add(Restrictions.eq(LandedCostCost.PROPERTY_LANDEDCOST, 
landedCost));
     criteria.addOrderBy(LandedCostCost.PROPERTY_LINENO, true);
     for (LandedCostCost lcCost : criteria.list()) {
+      lcCost = OBDal.getInstance().get(LandedCostCost.class, lcCost.getId());
       log.debug("Start Distributing lcCost {}", lcCost.getIdentifier());
       // Load distribution algorithm
       LandedCostDistributionAlgorithm lcDistAlg = 
getDistributionAlgorithm(lcCost

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to