Openbravo Issue Tracking System - Retail Modules
View Issue Details
0030410Retail ModulesWeb POSpublic2015-07-22 18:172015-10-26 10:51
migueldejuana 
Sandrahuguet 
normalmajoralways
closedfixed 
5
 
RR16Q1RR16Q1 
marvintm
No
0030410: [Stock Criteria] Products out of the limit will not be filtered by stock
Stock criteria flow:

- Search by filters entered by user and limit defined in product model (100 by default).
- Filter by stock in the result of product of previous filter.

First query has a limit and will not show products that fulfill the filters, so we will not be able to apply stock filter to some products.
- Search products without filter and choose a product outside the shown list.
- Update the stock of that product to 123456.
- Search again and add stock filter equals '123456'.

The choosen product will not appear in the list.
Include stockfilter using addWhereFilter function.
No tags attached.
related to defect 0032834 closed Sandrahuguet Generic products should not be shown in search view 
blocks defect 0032866 closed Sandrahuguet Characteristics that filtering the product search must be in yellow 
Issue History
2015-07-22 18:17migueldejuanaNew Issue
2015-07-22 18:17migueldejuanaAssigned To => Retail
2015-07-22 18:17migueldejuanaTriggers an Emergency Pack => No
2015-09-29 15:21OrekariaTarget VersionRR15Q4 => RR16Q1
2015-09-30 16:44adrianromeroNote Added: 0080757
2015-09-30 16:48adrianromeroNote Edited: 0080757bug_revision_view_page.php?bugnote_id=0080757#r9546
2015-10-07 11:01avicenteIssue Monitored: avicente
2015-10-07 12:12ageteIssue Monitored: agete
2015-10-07 13:47OrekariaNote Added: 0080859
2015-10-07 13:47OrekariaStatusnew => feedback
2015-10-07 16:32networkbResolution time => 1445292000
2015-10-07 16:32networkbStatusfeedback => new
2015-10-07 16:32OrekariaStatusnew => acknowledged
2015-10-07 17:18SandrahuguetAssigned ToRetail => Sandrahuguet
2015-10-07 17:18SandrahuguetStatusacknowledged => scheduled
2015-10-13 10:38hgbotCheckin
2015-10-13 10:38hgbotNote Added: 0080950
2015-10-14 16:18SandrahuguetNote Added: 0081017
2015-10-14 16:18SandrahuguetStatusscheduled => resolved
2015-10-14 16:18SandrahuguetResolutionopen => fixed
2015-10-14 16:19SandrahuguetFixed in SCM revision => https://code.openbravo.com/erp/pmods/org.openbravo.retail.stockcriteria/rev/585f5d75379d4e1f4308ec370b9cb4abb1a776e1 [^]
2015-10-15 09:45hgbotCheckin
2015-10-15 09:45hgbotNote Added: 0081031
2015-10-15 09:45SandrahuguetReview Assigned To => marvintm
2015-10-19 13:32hgbotCheckin
2015-10-19 13:32hgbotNote Added: 0081086
2015-10-20 13:49adrianromeroNote Added: 0081135
2015-10-20 13:49adrianromeroStatusresolved => new
2015-10-20 13:49adrianromeroResolutionfixed => open
2015-10-20 14:27OrekariaStatusnew => acknowledged
2015-10-20 15:16OrekariaStatusacknowledged => scheduled
2015-10-21 11:30hgbotCheckin
2015-10-21 11:30hgbotNote Added: 0081169
2015-10-21 11:30hgbotStatusscheduled => resolved
2015-10-21 11:30hgbotResolutionopen => fixed
2015-10-21 11:30hgbotFixed in SCM revisionhttps://code.openbravo.com/erp/pmods/org.openbravo.retail.stockcriteria/rev/585f5d75379d4e1f4308ec370b9cb4abb1a776e1 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/16c1cef39f5c6af8117b7fc070ea5df3bedbbd58 [^]
2015-10-26 10:51marvintmStatusresolved => closed
2015-10-26 10:51marvintmFixed in Version => RR16Q1
2016-05-18 16:51SandrahuguetRelationship addedrelated to 0032834
2016-05-18 16:59SandrahuguetRelationship addedblocks 0032866

Notes
(0080757)
adrianromero   
2015-09-30 16:44   
(edited on: 2015-09-30 16:48)
The problem is in function *postProcess: function (collection, callback)* of the filter component in module org.openbravo.retail.stockcriteria.

This function is invoked after all the SQL filters of the criteria selected by the cashier. This *postProcess* function receives as a parameter all the products that returns the SQL filters and calculates the stock for each product and returns the products filtered by the stock criteria.

This stock calculation is performed in the server side by the process org.openbravo.retail.stockcriteria.Stockcriteria that performs a query for each product and returns only the products that fulfills the stock criteria.

The problem is that if the result of the execution of the SQL filters has been cropped because the SQL limi, there can be products that fulfills the whole criteria selected by the cashier but are never sent to the Stockcriteria process.

A fix of this problem will probably require a refactor of the base criteria functionality and also a rewrite of the stock criteria filter functionality.

(0080859)
Orekaria   
2015-10-07 13:47   
missing resolution time and OBNetwork customer mark
(0080950)
hgbot   
2015-10-13 10:38   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: ef886e7af50cfd9ae5c68bf497d4546647fc0991
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Thu Oct 08 16:07:55 2015 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/ef886e7af50cfd9ae5c68bf497d4546647fc0991 [^]

related to issue 30410 ability to force remote in normal mode

---
M web/org.openbravo.mobile.core/source/data/ob-dal.js
M web/org.openbravo.mobile.core/source/retail/component/ob-retail-searchproductcharacteristic.js
---
(0081017)
Sandrahuguet   
2015-10-14 16:18   
Repository: erp/pmods/org.openbravo.retail.stockcriteria
Changeset: 585f5d75379d4e1f4308ec370b9cb4abb1a776e1
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Wed Oct 14 11:25:50 2015 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.stockcriteria/rev/585f5d75379d4e1f4308ec370b9cb4abb1a776e1 [^] [^]

Fixed bug 30401 Products out of the limit will not be filtered by stock

---
M web/org.openbravo.retail.stockcriteria/js/hookStockCriteria.js
A src/org/openbravo/retail/stockcriteria/ProductProperties.java
A src/org/openbravo/retail/stockcriteria/StockChHQLCriteria.java
A src/org/openbravo/retail/stockcriteria/StockChValueHQLCriteria.java
A src/org/openbravo/retail/stockcriteria/StockHQLCriteria.java
R src/org/openbravo/retail/stockcriteria/MGetStock.java
R src/org/openbravo/retail/stockcriteria/StockCondition.java
R src/org/openbravo/retail/stockcriteria/StockFilters.java
R src/org/openbravo/retail/stockcriteria/StockInfo.java
R src/org/openbravo/retail/stockcriteria/Stockcriteria.java
(0081031)
hgbot   
2015-10-15 09:45   
Repository: tools/automation/pi-mobile
Changeset: c02c2bb550c2401ef7a2b9ea13b380162eaded6c
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Thu Oct 15 09:44:02 2015 +0200
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/c02c2bb550c2401ef7a2b9ea13b380162eaded6c [^]

Related to issue 30410 Added automatic test

---
A src-test/org/openbravo/test/mobile/retail/extmodules/selenium/tests/stockcriteria/Issue30410_CheckStockCriteria.java
---
(0081086)
hgbot   
2015-10-19 13:32   
Repository: erp/pmods/org.openbravo.retail.stockcriteria
Changeset: 6b0d96d6a2899cbf23a50e2ec2d28206b2e73383
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Mon Oct 19 13:31:36 2015 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.stockcriteria/rev/6b0d96d6a2899cbf23a50e2ec2d28206b2e73383 [^]

related to issue 30410 fixed filter by more than one criteria

---
M src/org/openbravo/retail/stockcriteria/StockChHQLCriteria.java
M src/org/openbravo/retail/stockcriteria/StockChValueHQLCriteria.java
M web/org.openbravo.retail.stockcriteria/js/hookStockCriteria.js
---
(0081135)
adrianromero   
2015-10-20 13:49   
Products with stock "null" appear when filtering by stock.

For example, create a new product without any movement transaction
Go to web pos and in the search panel add a filter by stock: For example with stock greater than 0 and less than 10
Check that this product appears with label stock: null
(0081169)
hgbot   
2015-10-21 11:30   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 16c1cef39f5c6af8117b7fc070ea5df3bedbbd58
Author: Sandra Huguet <sandra.huguet <at> openbravo.com>
Date: Wed Oct 21 11:29:23 2015 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/16c1cef39f5c6af8117b7fc070ea5df3bedbbd58 [^]

fixed issue 30410 added forceremote deleted by mistake

---
M web/org.openbravo.mobile.core/source/retail/component/ob-retail-searchproductcharacteristic.js
---