Openbravo Issue Tracking System - Modules
View Issue Details
0040353ModulesFIFO Costing Algorithmpublic2019-03-11 18:452019-03-22 09:28
ngarcia 
AtulOpenbravo 
immediatemajoralways
closedfixed 
5
 
 
dmiguelez
0040353: Costing Background process finishes with error in 18Q4 as the module has not been adapted to new Hibernate version
Costing Background process finishes with error in 18Q4 as the module has not been adapted to new Hibernate version
Having some transactions whose cost is pending to be calculated launch the Costing Background process and check it finishes with the following error:

org.openbravo.model.common.plm.Product$HibernateProxy$3txKOgXY cannot be cast to java.base/java.lang.String

After fixing the code of that part, the next error shown was:

org.openbravo.model.common.enterprise.Organization$HibernateProxy$Fs9TMriZ cannot be cast to java.base/java.lang.String
Add the .getId() function to the objects pass through in the setNamedParameter functions such as


inputQry.setNamedParameter("client", costOrg.getClient());
inputQry.setNamedParameter("org", costOrg);
outputQry.setNamedParameter("product", product);
No tags attached.
caused by feature request 0037064 closed caristu Openbravo ERP upgrade hibernate to 5.3.2 
Issue History
2019-03-11 18:45ngarciaNew Issue
2019-03-11 18:45ngarciaAssigned To => Triage Finance
2019-03-11 18:45ngarciaResolution time => 1554069600
2019-03-11 18:45ngarciaRelationship addedcaused by 0037064
2019-03-11 18:45ngarciaIssue Monitored: networkb
2019-03-12 08:17SandrahuguetAssigned ToTriage Finance => AtulOpenbravo
2019-03-12 15:17AtulOpenbravoStatusnew => scheduled
2019-03-13 09:59AtulOpenbravoNote Added: 0110398
2019-03-22 09:27hgbotCheckin
2019-03-22 09:27hgbotNote Added: 0110563
2019-03-22 09:27hgbotStatusscheduled => resolved
2019-03-22 09:27hgbotResolutionopen => fixed
2019-03-22 09:27hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.costing.algorithm.fifo/rev/2a2221958894c456e3d8fd0ed21a8aa34f7218e0 [^]
2019-03-22 09:27hgbotCheckin
2019-03-22 09:27hgbotNote Added: 0110564
2019-03-22 09:28dmiguelezReview Assigned To => dmiguelez
2019-03-22 09:28dmiguelezNote Added: 0110565
2019-03-22 09:28dmiguelezStatusresolved => closed

Notes
(0110398)
AtulOpenbravo   
2019-03-13 09:59   
Test Plan

- Install FIFO Costing Algorithm module.
- Make sure that there is no transaction whose cost is not yet calculated.
- Navigate to Costing Rule, create one for FIFO Costing Algorithm for F&B US Inc organization.
- Validate rule.
- Create a new Product. Set Purchase Price and Sales Price to it.
- Add a Goods Receipt for above product in F&B US Inc Organization.
- Add a Goods Shipment for above product in F&B US Inc Organization.
- Run Costing Backgroung process and realize that process is completed successfully and no error were logged.
(0110563)
hgbot   
2019-03-22 09:27   
Repository: erp/pmods/org.openbravo.costing.algorithm.fifo
Changeset: 2a2221958894c456e3d8fd0ed21a8aa34f7218e0
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Wed Mar 13 14:22:44 2019 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.costing.algorithm.fifo/rev/2a2221958894c456e3d8fd0ed21a8aa34f7218e0 [^]

Fixes Issue 40353:Costing Background process finishes with error
in 18Q4 as the module has not been adapted to new Hibernate version

After the hibernate upgrade, the correct parameter value should be
provided i.e the business object ID

---
M src/org/openbravo/costing/algorithm/fifo/FifoAlgorithm.java
---
(0110564)
hgbot   
2019-03-22 09:27   
Repository: erp/pmods/org.openbravo.costing.algorithm.fifo
Changeset: 6740981d2883e1a8841c92212df0d59d7b93da89
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Fri Mar 22 09:26:58 2019 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.costing.algorithm.fifo/rev/6740981d2883e1a8841c92212df0d59d7b93da89 [^]

Related to Issue 40353: Updated Module version

---
M src-db/database/sourcedata/AD_MODULE.xml
---
(0110565)
dmiguelez   
2019-03-22 09:28   
Code Review + Testing Ok