Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0032604Openbravo ERPA. Platformpublic2016-04-05 16:072016-06-17 19:36
alostale 
alostale 
normalminorhave not tried
closedfixed 
5
 
3.0PR16Q3 
caristu
Core
No
0032604: Stock by Warehouse widget logs error message
Whenever Stock by Warehouse widget is shown in workspace, an error message is logged in openbravo.log.

The problem is caused by an incorrect definition of quantity on hand summary function.
Add Stock by Warehouse widget to workspace
  -> check log:
ERROR org.openbravo.client.querylist.QueryListDataSource - Exception while fetching the summary columns of the widget Stock by Warehouse. It is not supported using as summaries columns that are defined using a subquery, or that are defined using a summary function.
 Query = select sum(qtyonhand)
from ProductStockView ps left outer join ps.product as Product
left outer join ps.storageBin as Locator
left outer join Locator.warehouse as Warehouse
left outer join Product.productCategory as ProductCategory
left outer join Warehouse.organization as Organization
left outer join ps.uOM as UOM
left outer join ps.attributeSetValue as AttributeSetInstance
where ps.client.id=:client
and ps.organization.id IN (:organizationList)
and Product.stocked='Y'
and 1=1
group by Organization.name, Warehouse.name, Organization.id, Product.searchKey, Product.name, Product.id, ProductCategory.name, ProductCategory.id, UOM.name, AttributeSetInstance.description,Warehouse.id
Do not define summary function for quantity on hand because:
* does it make any sense to sum up quantities of different products?
* it has a performance penalty to do this calculation:
  - extra request is performed to calculate it
  - query can be expensive
No tags attached.
related to defect 00291743.0PR15Q2 closed AugustoMauch Openbravo ERP Summarize fields are not displayed in widgets 
related to defect 0034014 closed AtulOpenbravo Openbravo ERP Slow behavior of widget "Stock by Warehouse" 
related to defect 0036024 new Retail Retail Modules Error in Best Selling Store widget 
Issue History
2016-04-05 16:07alostaleNew Issue
2016-04-05 16:07alostaleAssigned To => platform
2016-04-05 16:07alostaleModules => Core
2016-04-05 16:07alostaleTriggers an Emergency Pack => No
2016-04-05 16:09alostaleRelationship addedrelated to 0029174
2016-04-05 16:09alostaleAssigned Toplatform => alostale
2016-04-05 16:09alostaleStatusnew => scheduled
2016-04-05 16:09alostaleReview Assigned To => caristu
2016-04-05 16:21alostaleProposed Solution updated
2016-04-05 16:30hgbotCheckin
2016-04-05 16:30hgbotNote Added: 0085447
2016-04-05 16:30hgbotStatusscheduled => resolved
2016-04-05 16:30hgbotResolutionopen => fixed
2016-04-05 16:30hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/2c4101ab3ad83e2858914e203696731c8b7198bd [^]
2016-04-08 10:30caristuNote Added: 0085511
2016-04-08 10:30caristuStatusresolved => closed
2016-04-08 10:30caristuFixed in Version => 3.0PR16Q3
2016-06-17 19:36hudsonbotCheckin
2016-06-17 19:36hudsonbotNote Added: 0087422
2016-09-22 17:01aferrazRelationship addedrelated to 0034014
2017-05-17 13:30aferrazRelationship addedrelated to 0036024

Notes
(0085447)
hgbot   
2016-04-05 16:30   
Repository: erp/devel/pi
Changeset: 2c4101ab3ad83e2858914e203696731c8b7198bd
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Apr 05 16:26:21 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/2c4101ab3ad83e2858914e203696731c8b7198bd [^]

fixed bug 32604: Stock by Warehouse widget logs error message

  Quantiy on hand summary was incorrectly defined.

  This summary has been removed because functionally it does not make sense to
  sum quantities of different products and it would add performance degradation.

---
M modules/org.openbravo.client.widgets/src-db/database/sourcedata/OBCQL_QUERY_COLUMN.xml
---
(0085511)
caristu   
2016-04-08 10:30   
Verified
(0087422)
hudsonbot   
2016-06-17 19:36   
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/0dc7be081b1c [^]
Maturity status: Test