Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0029585
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Openbravo ERP] 04. Warehouse managementmajoralways2015-04-13 16:542015-04-14 19:18
ReporterVictorVillarView Statuspublic 
Assigned Tojorge-garcia 
PriorityimmediateResolutionfixedFixed in Version3.0PR15Q1.3
StatusclosedFix in branchFixed in SCM revisione2d5539a097b
ProjectionnoneETAnoneTarget Version3.0PR15Q1.3
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionpiSCM revision 
Review Assigned Toumartirena
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0029585: It is not possible to reactivate a Landed Cost under some circumstancies

DescriptionIt is not possible to reactivate a Landed Cost under some circumstancies. Necessary to have more than 100 registers in M_LC_ReceiptLine_Amt table. For instance, 1 Goods receipt with 200 lines and one landed cost affecting to this Landed Cost.
Steps To ReproduceNecessary to have more than 100 registers in M_LC_ReceiptLine_Amt table. For instance, 1 Goods receipt with 200 lines and one landed cost affecting to this Landed Cost.
Once you have completed it and you try to reactivate it, you receive the following error:

'a different object with the same identifier value was already associated with the session: [LandedCostReceiptLineAmt#38B8F2EA56834B20A02AB4C111E5903D]'

It seems that the problem is in LandedCostDistributionAlgorithm.java -- method: cancelDistributeAmount.

OBDal.getInstance().save(lcCost);

Proposed SolutionWe have checked in the client's environment that the following change is fixing the problem.

List<String> idList = OBDao.getIDListFromOBObject(lcCost.getLandedCostReceiptLineAmtList());
++++ OBDal.getInstance().save(lcCost);

      for (String id : idList) {
        i++;
        LCReceiptLineAmt lcrla = OBDal.getInstance().get(LCReceiptLineAmt.class, id);
        lcCost.getLandedCostReceiptLineAmtList().remove(lcrla);
        OBDal.getInstance().remove(lcrla);
               if (i % 100 == 0) {
----- OBDal.getInstance().save(lcCost);
          OBDal.getInstance().flush();
          OBDal.getInstance().getSession().clear();
TagsApproved
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 0029574 closedjorge-garcia It is not possible to reactivate a Landed Cost under some circumstancies 

-  Notes
(0076539)
hgbot (developer)
2015-04-14 19:15

Repository: erp/backports/3.0PR15Q1.3
Changeset: e2d5539a097b16901f6e481c38fa0f48fe1726f6
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Tue Apr 14 18:18:57 2015 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR15Q1.3/rev/e2d5539a097b16901f6e481c38fa0f48fe1726f6 [^]

Fixed issue 29585: It is not possible to reactivate a Landed Cost

It is not possible to reactivate a Landed Cost under some circunstances.
The problem was fixed from the LandedCostDistributionAlgorithm.java

When you try to reactivate a Landed Cost, an error message appears and
the process was cancelled

Now the process is done succesfully and the Landed Cost can be reactivated.

---
M src/org/openbravo/costing/LandedCostDistributionAlgorithm.java
---
(0076541)
umartirena (developer)
2015-04-14 19:18

Code Review + Testing OK

- Issue History
Date Modified Username Field Change
2015-04-14 17:17 umartirena Type defect => backport
2015-04-14 17:17 umartirena Target Version => 3.0PR15Q1.3
2015-04-14 17:20 dmitry_mezentsev Tag Attached: Approved
2015-04-14 17:23 eduardo_Argal Assigned To Triage Finance => jorge-garcia
2015-04-14 19:15 hgbot Checkin
2015-04-14 19:15 hgbot Note Added: 0076539
2015-04-14 19:15 hgbot Status scheduled => resolved
2015-04-14 19:15 hgbot Resolution open => fixed
2015-04-14 19:15 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR15Q1.3/rev/e2d5539a097b16901f6e481c38fa0f48fe1726f6 [^]
2015-04-14 19:18 umartirena Review Assigned To => umartirena
2015-04-14 19:18 umartirena Note Added: 0076541
2015-04-14 19:18 umartirena Status resolved => closed
2015-04-14 19:18 umartirena Fixed in Version => 3.0PR15Q1.3


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker