Openbravo Issue Tracking System - Retail Modules
View Issue Details
0036840Retail ModulesWeb POSpublic2017-09-12 12:562017-09-25 11:33
egoitz 
ranjith_qualiantech_com 
normalmajoralways
closedfixed 
5
 
RR17Q4 
marvintm
No
0036840: Unneeded query executed on the orderloader process
During the orderloader process a query to set one attributeset is executed when there is not stock and the product has an attribute set defined.
It is setting on the new shipment line the same attributesetvalue than in the last one, what has not sense.
-Define a product with an attribute set.
-Create on the terminal a ticket with that prodduct.
-Check that a query on the m_inoutline table is executed.
The query:

https://docs.google.com/document/d/1pWsaB-yj2pzBWU3v9R0nGYNpv4k1iXZXmCw6qGJ_kh0/edit [^]
REview the following code on the orderload process:

[12:48:20] Egoitz: if (!foundStockProposed && orderLine.getProduct().getAttributeSet() != null) {
            // M_GetStock couldn't find any valid stock, and the product has an attribute set. We
            // will
            // attempt to find an old transaction for this product, and get the attribute values
            // from
            // there
            OBCriteria<ShipmentInOutLine> oldLines = OBDal.getInstance().createCriteria(
                ShipmentInOutLine.class);
            oldLines
                .add(Restrictions.eq(ShipmentInOutLine.PROPERTY_PRODUCT, orderLine.getProduct()));
            oldLines.setMaxResults(1);
            oldLines.addOrderBy(ShipmentInOutLine.PROPERTY_CREATIONDATE, false);
            List<ShipmentInOutLine> oldLine = oldLines.list();
            if (oldLine.size() > 0) {
              oldAttributeSetValues = oldLine.get(0).getAttributeSetValue();
            }

          }
Performance
depends on backport 0036940RR17Q3.1 closed ranjith_qualiantech_com Unneeded query executed on the orderloader process 
depends on backport 0036941RR17Q2.4 closed ranjith_qualiantech_com Unneeded query executed on the orderloader process 
Issue History
2017-09-12 12:56egoitzNew Issue
2017-09-12 12:56egoitzAssigned To => Retail
2017-09-12 12:56egoitzResolution time => 1505858400
2017-09-12 12:56egoitzTriggers an Emergency Pack => No
2017-09-19 15:27ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2017-09-19 15:28ranjith_qualiantech_comStatusnew => scheduled
2017-09-20 10:37hgbotCheckin
2017-09-20 10:37hgbotNote Added: 0099170
2017-09-20 10:37hgbotStatusscheduled => resolved
2017-09-20 10:37hgbotResolutionopen => fixed
2017-09-20 10:37hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/1aa6dec4e0ad4c1354194ef1796e5d195017920c [^]
2017-09-20 10:46marvintmReview Assigned To => marvintm
2017-09-20 10:46marvintmStatusresolved => closed
2017-09-20 10:46marvintmFixed in Version => RR17Q4
2017-09-24 17:20shuehnerTag Attached: Performance
2017-09-24 17:23shuehnerIssue Monitored: shuehner
2017-09-25 11:33marvintmStatusclosed => new
2017-09-25 11:33marvintmResolutionfixed => open
2017-09-25 11:33marvintmFixed in VersionRR17Q4 =>
2017-09-25 11:33marvintmStatusnew => scheduled
2017-09-25 11:33marvintmStatusscheduled => resolved
2017-09-25 11:33marvintmFixed in Version => RR17Q4
2017-09-25 11:33marvintmResolutionopen => fixed
2017-09-25 11:33marvintmStatusresolved => closed

Notes
(0099170)
hgbot   
2017-09-20 10:37   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 1aa6dec4e0ad4c1354194ef1796e5d195017920c
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Wed Sep 20 13:47:55 2017 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/1aa6dec4e0ad4c1354194ef1796e5d195017920c [^]

Fixed issue 36840 : Removed unused logic in OrderLoader

* Following condition is removed, if the stock is not present and product doesn't have attribute set, then attribute set is fetched from last transaction

---
M src/org/openbravo/retail/posterminal/OrderLoader.java
---