Openbravo Issue Tracking System - Retail Modules
View Issue Details
0042234Retail ModulesWeb POSpublic2019-11-08 12:112019-11-15 08:55
shuehner 
alekosmp86 
normalmajorhave not tried
closedfixed 
5
 
RR20Q1 
marvintm
No
0042234: StockCriteria module queries are very inefficient when not using OBPOS_remote.product at the same time
Contect:
Customer does not use the remote data for product preference but has the StockCriteria module installed.

StockCriteria module is doing remote queries to product (to get uptodate stock information) but inside the code assuming remoteData=false leading to wrong and very inefficient queries.

Technically org.openbravo.retail.posterminal.master.ProductProperties file:

https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/file/tip/src/org/openbravo/retail/posterminal/master/ProductProperties.java#l110 [^]

and

https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/file/tip/src/org/openbravo/retail/posterminal/master/ProductProperties.java#l131 [^]

Enter branch with isRemote false leading to query being built searching remotely using m_product_trl table and having upper(upper(upc)) in their where clauses.

Check query being executed for above Module and notice it filtering (with user search string) in

upper(upper(upc))

and
value of m_product_trl.name
Fix logic so that remote queries if they happen (i.e. stockcriteria) are correctly treated as 'remote queries' independent of the base configuration of that query (i.e. OBPOS_remote.product preference).
No tags attached.
Issue History
2019-11-08 12:11shuehnerNew Issue
2019-11-08 12:11shuehnerAssigned To => Retail
2019-11-08 12:11shuehnerTriggers an Emergency Pack => No
2019-11-08 12:12shuehnerResolution time => 1574982000
2019-11-08 15:31shuehnerResolution time1574982000 => 1573772400
2019-11-13 21:53alekosmp86Assigned ToRetail => alekosmp86
2019-11-14 22:09hgbotCheckin
2019-11-14 22:09hgbotNote Added: 0115613
2019-11-14 22:09hgbotStatusnew => resolved
2019-11-14 22:09hgbotResolutionopen => fixed
2019-11-14 22:09hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/c93c6d284752bb13654889f5d605e5906905f670 [^]
2019-11-15 08:55marvintmReview Assigned To => marvintm
2019-11-15 08:55marvintmStatusresolved => closed
2019-11-15 08:55marvintmFixed in Version => RR20Q1

Notes
(0115613)
hgbot   
2019-11-14 22:09   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: c93c6d284752bb13654889f5d605e5906905f670
Author: Alejandro <alekosmp86 <at> gmail.com>
Date: Wed Nov 13 11:34:33 2019 -0500
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/c93c6d284752bb13654889f5d605e5906905f670 [^]

Fixed issue 42234: When filtering by StockCriteria, always execute remote query.

---
M src/org/openbravo/retail/posterminal/master/Product.java
M src/org/openbravo/retail/posterminal/master/ProductProperties.java
---