Openbravo Issue Tracking System - Retail Modules
View Issue Details
0036428Retail ModulesWeb POSpublic2017-06-05 11:302017-08-02 12:35
egoitz 
ebecerra 
normalmajoralways
closedfixed 
5
 
RR17Q1.3 
migueldejuana
No
0036428: Perforamnce problems loading the master data for discounts.
On environment with a lot of product characteristics, the load of the
DiscountFiltercharactaritic model takes long.
-Login on webpos on an environment with a big amount of characteristics
*The query of the DiscountFiltercharactaritic model takes long.
ON modules/org.openbravo.retail.posterminal/src/org/openbravo/retail/posterminal/master/DiscountFilterCharacteristic.java
replace
hql += " left join c.characteristic.productCharacteristicValueList cvl ";
with
hql += " left join c.characteristic.characteristicValueList cvl ";

and
hql += " and m_isparent_ch_value(cvl.characteristicValue.id, c.chValue.id, c.characteristic.id) != -1 ";
with
 hql += " and m_isparent_ch_value(cvl.id, c.chValue.id, c.characteristic.id) != -1 ";


Also edit the file
modules/org.openbravo.retail.posterminal/src/org/openbravo/retail/posterminal/master/DiscountFilterCharacteristicProperties.java
by replacing
add(new HQLProperty("distinct(coalesce(c.id,cvl.characteristicValue.id))", "id"));
with
add(new HQLProperty("distinct(coalesce(c.id,cvl.id))", "id"));

and
add(new HQLProperty("cvl.characteristicValue.id", "chValue"));
with
add(new HQLProperty("cvl.id", "chValue"));
No tags attached.
blocks defect 0036175 closed ebecerra Perforamnce problems loading the master data for discounts. 
Issue History
2017-07-06 08:47marvintmTypedefect => backport
2017-07-06 08:47marvintmTarget Version => RR17Q1.3
2017-08-01 12:11hgbotCheckin
2017-08-01 12:11hgbotNote Added: 0098304
2017-08-01 12:11hgbotStatusscheduled => resolved
2017-08-01 12:11hgbotResolutionopen => fixed
2017-08-01 12:11hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/31e4ae9b1728a4afcccb7c391392124513dcdb2f [^] => http://code.openbravo.com/retail/backports/3.0RR17Q1.3/org.openbravo.retail.posterminal/rev/b70e20066cd2837ce8576e4fed8fda718570e2f5 [^]
2017-08-02 12:35migueldejuanaReview Assigned To => migueldejuana
2017-08-02 12:35migueldejuanaNote Added: 0098330
2017-08-02 12:35migueldejuanaStatusresolved => closed

Notes
(0098304)
hgbot   
2017-08-01 12:11   
Repository: retail/backports/3.0RR17Q1.3/org.openbravo.retail.posterminal
Changeset: b70e20066cd2837ce8576e4fed8fda718570e2f5
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Tue Aug 01 12:11:20 2017 +0200
URL: http://code.openbravo.com/retail/backports/3.0RR17Q1.3/org.openbravo.retail.posterminal/rev/b70e20066cd2837ce8576e4fed8fda718570e2f5 [^]

Fixed issue 36428. Optimize loading the master data for discounts

---
M src/org/openbravo/retail/posterminal/master/DiscountFilterCharacteristic.java
M src/org/openbravo/retail/posterminal/master/DiscountFilterCharacteristicProperties.java
---
(0098330)
migueldejuana   
2017-08-02 12:35   
Reviewed