Notes |
|
|
Reported case is not standard: quantiy on hand column is already a sum in the query.
The SQL to get the total should look like
select sum(qtyOnHand)
from (select sum(qtyOnHand)
from ...)
which is not feasible with HQL (subqueries are not supported in the from clause).
Even this concrete case worked before fix for 0026992 when all records were in client, it didn't when other case.
Please provide actual customer's widget definition to understand the real case and decide on a possible solution. |
|
|
(0075698)
|
hgbot
|
2015-03-17 18:53
|
|
Repository: erp/devel/pi
Changeset: 7c384195efacec360a20e17531acf50aaacf1038
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Mar 17 18:43:56 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/7c384195efacec360a20e17531acf50aaacf1038 [^]
Fixes issue 29174: Changes the way summary fields work in widgets
Before this issue [1] was fixed, widget summary fields were computed in the front end, even if the grid had not loaded all the records. This behaviour was wrong, and to fix that issue i
t was decided to compute the summary fields in the backend, the same way it is done in standard grids.
The problem is that widget summary fields that used to show results before fixing [1] (remember that the result that were shown were not valid) do no longer work now, as it is not possi
ble to create a HQL to compute them in the server side. There were three types of summary fields that were not working:
a) Those based on columns that had an alias in the HQL clause
b) Those based on columns defined by a subquery
c) Those based on columns defined in the HQL clase with a summary function
Columns defined like a) are now supported. In order to work they must have a proper value in its Where Clause Left Part field. Columns defined like b) and c) are now no longer supported
. If there is a column of these types in a widget, none of its summary fields will be shown, and a message will be shown in the log.
[1] https://issues.openbravo.com/view.php?id=26992 [^]
---
M modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_FIELD.xml
M modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListDataSource.java
---
|
|
|
(0075699)
|
hgbot
|
2015-03-17 18:56
|
|
Repository: erp/mods/com.openbravo.support.test
Changeset: 04f7dd013730a799821fbf55b395804fa9c81ca4
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Mar 17 18:55:08 2015 +0100
URL: http://code.openbravo.com/erp/mods/com.openbravo.support.test/rev/04f7dd013730a799821fbf55b395804fa9c81ca4 [^]
Adds two widgets to test issue 29174
The first widget, called Test WIdget: Proper summary field, contains a supported summary field. The second widget, called Test Widget: Not proper summary field, conaints an unsupported sumary field, based on a subquery. When this widget is displayed the summary field is not shown and an error message is shown in the log.
---
M src-db/database/sourcedata/OBUIAPP_PARAMETER.xml
A src-db/database/sourcedata/OBCQL_QUERY_COLUMN.xml
A src-db/database/sourcedata/OBCQL_WIDGET_QUERY.xml
A src-db/database/sourcedata/OBKMO_WIDGET_CLASS.xml
---
|
|
|
|
|
|
|
|
|
|
|