Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0028565Openbravo ERP04. Warehouse managementpublic2015-01-12 12:232015-02-04 20:34
umartirena 
umartirena 
highmajoralways
closedfixed 
5
 
3.0PR15Q2 
Sandrahuguet
Core
No
0028565: not possible to filter by LineNo field in Match LC Cost
It is not possible to filter by LineNo field in Match LC Cost. While trying to filter a column of this type no data is displayed in the grid and an error appears in console.

ERROR org.openbravo.client.kernel.KernelUtils - java.lang.Long cannot be cast to java.math.BigDecimal
java.lang.ClassCastException: java.lang.Long cannot be cast to java.math.BigDecimal
    at org.hibernate.type.descriptor.java.BigDecimalTypeDescriptor.unwrap(BigDecimalTypeDescriptor.java:36)
    at org.hibernate.type.descriptor.sql.DecimalTypeDescriptor$1.doBind(DecimalTypeDescriptor.java:53)
    at org.hibernate.type.descriptor.sql.BasicBinder.bind(BasicBinder.java:91)
    at org.hibernate.type.AbstractStandardBasicType.nullSafeSet(AbstractStandardBasicType.java:282)
    at org.hibernate.type.AbstractStandardBasicType.nullSafeSet(AbstractStandardBasicType.java:277)
    at org.hibernate.param.NamedParameterSpecification.bind(NamedParameterSpecification.java:67)
    at org.hibernate.loader.hql.QueryLoader.bindParameterValues(QueryLoader.java:571)
    at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1716)
    at org.hibernate.loader.Loader.doQuery(Loader.java:801)
    at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
    at org.hibernate.loader.Loader.doList(Loader.java:2533)
    at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
    at org.hibernate.loader.Loader.list(Loader.java:2271)
    at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:452)
    at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:363)
    at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
    at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1268)
    at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
    at org.openbravo.service.datasource.HQLDataSourceService.getData(HQLDataSourceService.java:179)
    at org.openbravo.service.datasource.ReadOnlyDataSourceService.fetchJSONObject(ReadOnlyDataSourceService.java:137)
    at org.openbravo.service.datasource.ReadOnlyDataSourceService.fetch(ReadOnlyDataSourceService.java:70)
    at org.openbravo.service.datasource.DataSourceServlet.doFetch(DataSourceServlet.java:261)
    at org.openbravo.service.datasource.DataSourceServlet.doPost(DataSourceServlet.java:747)
In QA Testing Client navigate to Landed Cost window, create a new one for "Spain" organization dated on 07/01/2015.

Go to "Cost" tab and create a new record.
Select a landed cost type (of "Product" type), for instance "Transportation Cost", enter an Amount of 140.00
Create a new record, select same landed cost type and enter a new amount for instance of 50.00
Repeat above step 2 times more.

Go to "Receipt" tab and create a new record. Select a receipt in the field "Goods Receipt". Save.

Go back to the Landed Cost header and process and post landed cost document.

Go to Purchase Invoice window and create a new one. Select the product set as product landed cost type and enter an invoiced quatity = 1, Net Unit Price = 290. Complete the invoice.

In the line click on "Match LC Cost" process button.

Try to filter by "Line No.". See that no data is displayed and the above error is triggered in the log.
No tags attached.
related to defect 0028545 closed alostale Some filters in Grids built on HQL Based Table they don't work any more 
related to defect 0028530 closed alostale Not possible to enter a matched amount while clicking on second landed cost line in "Match LC Costs" window. 
related to defect 0028600 closed umartirena API Break on Cost Adjustments Project (try-api 1152) 
? issue-28565.export (1,653) 2015-01-13 10:59
https://issues.openbravo.com/file_download.php?file_id=7672&type=bug
Issue History
2015-01-12 12:23umartirenaNew Issue
2015-01-12 12:23umartirenaAssigned To => AugustoMauch
2015-01-12 12:23umartirenaModules => Core
2015-01-12 12:23umartirenaTriggers an Emergency Pack => No
2015-01-12 13:18alostaleRelationship addedrelated to 0028545
2015-01-12 13:29alostaleRelationship addedrelated to 0028530
2015-01-13 10:47alostaleNote Added: 0073449
2015-01-13 10:47alostaleSummaryIs not possible to filter Integer type columns on HQL Based Tables => not possible to filter by LineNo field in Match LC Cost
2015-01-13 10:47alostaleDescription Updatedbug_revision_view_page.php?rev_id=7431#r7431
2015-01-13 10:47alostaleSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=7433#r7433
2015-01-13 10:47alostaleNote Edited: 0073449bug_revision_view_page.php?bugnote_id=0073449#r7435
2015-01-13 10:59alostaleFile Added: issue-28565.export
2015-01-13 11:00alostaleNote Added: 0073450
2015-01-13 11:01alostaleAssigned ToAugustoMauch => umartirena
2015-01-13 20:02umartirenaRelationship addedrelated to 0028600
2015-01-19 09:59hgbotCheckin
2015-01-19 09:59hgbotNote Added: 0073590
2015-01-19 09:59hgbotStatusnew => resolved
2015-01-19 09:59hgbotResolutionopen => fixed
2015-01-19 09:59hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/f6d8164e0577b2a7b2535571d66042f5778f9199 [^]
2015-01-19 18:24SandrahuguetReview Assigned To => Sandrahuguet
2015-01-19 18:24SandrahuguetCategoryA. Platform => 04. Warehouse management
2015-01-19 18:25SandrahuguetNote Added: 0073621
2015-01-19 18:25SandrahuguetStatusresolved => closed
2015-01-19 18:25SandrahuguetFixed in Version => 3.0PR15Q2
2015-02-04 20:34hudsonbotCheckin
2015-02-04 20:34hudsonbotNote Added: 0074155

Notes
(0073449)
alostale   
2015-01-13 10:47   
This is not a generic HQL Query based tables problem but an incorrect definition for this concrete case.

(0073450)
alostale   
2015-01-13 11:00   
Attached fix. As it changes a column reference, an API change is expected, the changeset is sent to try to get the API change to properly handle it. Awaiting for try execution, it should be in https://ci.openbravo.com/view/try/job/try-api/1152/ [^] when completed.
(0073590)
hgbot   
2015-01-19 09:59   
Repository: erp/devel/pi
Changeset: f6d8164e0577b2a7b2535571d66042f5778f9199
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Jan 13 10:50:29 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/f6d8164e0577b2a7b2535571d66042f5778f9199 [^]

fixed bug 28565: not possible to filter by LineNo field in Match LC Cost

  The problem was caused by a reference mistmatch between lineNo property in HQL
  table, which was correctly Integer, and the reference for the M_LC_Cost.lineNo
  which was Number.

  Fixed M_LC_Cost.lineNo to be Integer.

---
M src-db/database/sourcedata/AD_COLUMN.xml
---
(0073621)
Sandrahuguet   
2015-01-19 18:25   
Code review + testing OK
(0074155)
hudsonbot   
2015-02-04 20:34   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/f36c91d0ad63 [^]
Maturity status: Test