Openbravo Issue Tracking System - Retail Modules
View Issue Details
0034887Retail ModulesWeb POSpublic2017-01-03 17:062017-01-16 13:56
Pre packaging ( pi )
main [^]
0034887: Scanning could not work if the model has change but cache is not deleted
When we use findUsingCache, the result of the search is cached in memory.

This is working fine until a new incremental refresh is done and the model of Product has change (for example, changing the UPC/EAN code associated). If the cache is not deleted, the result returned will not change.
1) Go to backend and add/change the UPC/EAN code
2) Clean the cache of the browser and log in the webpos
3) Scan that UPC/EAN code and check the product is added to the receipt.
4) Clean this receipt
5) Go again to backend, and change the UPC/EAN code of that product again
6) Wait until the incremental refresh is done (don't do a browser refresh nor clean the cache).
7) Scan the new UPC/EAN code and check no products is added.
In OB.DAL.findUsingCache from 'productSearch' and 'productPrice' should have a parameter after the error callback like this

{modelsAffectedByCache: ['Product']} --> This is for 'productSearch' part.
No tags attached.
blocks defect 0034846pi closed jorge-garcia Scanning could not work if the model has change but cache is not deleted 
Issue History
2017-01-10 12:10jorge-garciaTypedefect => backport
2017-01-10 12:10jorge-garciaTarget Versionpi => RR17Q1
2017-01-11 12:22hgbotCheckin
2017-01-11 12:22hgbotNote Added: 0093348
2017-01-11 12:22hgbotStatusscheduled => resolved
2017-01-11 12:22hgbotResolutionopen => fixed
2017-01-11 12:22hgbotFixed in SCM revision => [^]
2017-01-16 13:56marvintmReview Assigned To => marvintm
2017-01-16 13:56marvintmStatusresolved => closed
2017-01-16 13:56marvintmFixed in Version => RR17Q1

2017-01-11 12:22   
Repository: retail/backports/3.0RR17Q1/org.openbravo.retail.posterminal
Changeset: e2bc60cb2fc0d85de69fadb7ebb52f8afc76ca79
Author: Jorge Garcia <jorge.garcia <at>>
Date: Tue Jan 10 12:39:06 2017 +0100
URL: [^]

Fixed issue 34887: Scanning could not work if the model has change but
cache is not deleted

Added logic to manage find models using cache for these models:
* Find product.
* Find product price.
* Find product service.

M web/org.openbravo.retail.posterminal/js/model/order.js
M web/org.openbravo.retail.posterminal/js/pointofsale/view/keyboardorder.js