Openbravo Issue Tracking System - Retail Modules
View Issue Details
0035485Retail ModulesWeb POSpublic2017-03-10 14:292017-06-29 15:19
gorka_gil 
gorka_gil 
normalminoralways
closedfixed 
5
 
RR17Q3 
Sandrahuguet
No
0035485: Doing login in a multiprice list terminal with remote configured, do a product query without filters that is not needed
When doing login in the web pos should not be needed to do any search of products, especially in remote mode that should not do any background query not needed to increase server load.

Also after the fix of issue 35383, the empty query of products is not allowed in remote configurations, so this makes some selenium tests to fail.
- Configure remote:
http://wiki.openbravo.com/wiki/Retail:Configuration_Guide#Remote_Data_Preferences [^]
- Login in a multiprice list terminal (for example: MPL1)
http://localhost:8080/openbravo/web/org.openbravo.retail.posterminal/?terminal=MPL1 [^]
- In the developers tolls of chrome in network tab can be seen a request like this on login:
http://localhost:8080/openbravo/org.openbravo.mobile.core.service.jsonrest/org.openbravo.retail.posterminal.master.Product?[...] [^]
On login, it is created a new ticket.
If is a multiprice list terminal, this new trigger launch an event price list change.
This triggers a new search, and since is just after login is a search with empty values.

The proposed fix, is in the event of search, check if is remote and if so don't do the search. And do a clear of search, to ensure that don't remains old data.

Other approach could be to also don't do the search in local, but this would break the functionality in local since the empty search is allowed in local.
Performance
related to defect 0035383 closed gorka_gil Magnifying glass in product search should be disabled in remote mode if no filter is applied 
related to defect 0035945 closed jorge-garcia Extra Product requests done using Multipricelist functionality 
has duplicate defect 0031561 closed Retail When multi price list is set an extra product action search is done 
Issue History
2017-03-10 14:29gorka_gilNew Issue
2017-03-10 14:29gorka_gilAssigned To => gorka_gil
2017-03-10 14:29gorka_gilTriggers an Emergency Pack => No
2017-03-10 14:30gorka_gilRelationship addedrelated to 0035383
2017-03-10 14:36gorka_gilStatusnew => scheduled
2017-06-19 18:30gorka_gilRelationship addedrelated to 0036276
2017-06-19 18:30gorka_gilRelationship deletedrelated to 0036276
2017-06-19 18:38gorka_gilNote Added: 0097491
2017-06-19 18:38gorka_gilStatusscheduled => resolved
2017-06-19 18:38gorka_gilResolutionopen => fixed
2017-06-19 18:38gorka_gilFixed in SCM revision => https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/b6c9537cf70812867b38097956f098104ad49293 [^]
2017-06-21 09:25SandrahuguetRelationship addedhas duplicate 0031561
2017-06-21 09:26SandrahuguetReview Assigned To => Sandrahuguet
2017-06-21 17:37SandrahuguetRelationship addedrelated to 0035945
2017-06-21 17:42SandrahuguetNote Added: 0097561
2017-06-21 17:42SandrahuguetStatusresolved => new
2017-06-21 17:42SandrahuguetResolutionfixed => open
2017-06-27 10:51hgbotCheckin
2017-06-27 10:51hgbotNote Added: 0097701
2017-06-27 10:51hgbotStatusnew => resolved
2017-06-27 10:51hgbotResolutionopen => fixed
2017-06-27 10:51hgbotFixed in SCM revisionhttps://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/b6c9537cf70812867b38097956f098104ad49293 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/73887d0c8cffe2e3b47d6798c617ff7bcc00fb89 [^]
2017-06-27 11:59marvintmTag Attached: Performance
2017-06-29 11:04hgbotCheckin
2017-06-29 11:04hgbotNote Added: 0097753
2017-06-29 15:19SandrahuguetNote Added: 0097777
2017-06-29 15:19SandrahuguetStatusresolved => closed
2017-06-29 15:19SandrahuguetFixed in Version => RR17Q3

Notes
(0097491)
gorka_gil   
2017-06-19 18:38   
Fixed in the issue https://issues.openbravo.com/view.php?id=35383 [^]

Now in the change price list event checks if we are in remote, and if so don't execute the search.

This is the diff of the change:

https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/diff/b6c9537cf708/web/org.openbravo.mobile.core/source/retail/component/ob-retail-searchproductcharacteristic.js [^]

[ is a part of this commit https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/b6c9537cf70812867b38097956f098104ad49293 [^] ]
(0097561)
Sandrahuguet   
2017-06-21 17:42   
The fix is not working for all cases:
-Enable all remote preferences
-Login in the webPOS using MPL1 terminal
-Search by "avalanche"
-Change the business partner to "Mara Palliot" , notice that the search is cleaned and in normal mode the search is done again
(0097701)
hgbot   
2017-06-27 10:51   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 73887d0c8cffe2e3b47d6798c617ff7bcc00fb89
Author: Gorka Gil <gorka.gil <at> openbravo.com>
Date: Thu Jun 22 10:19:44 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/73887d0c8cffe2e3b47d6798c617ff7bcc00fb89 [^]

Fixes issue 35485: Doing login in a multiprice list terminal with remote configured, do a product query without filters that is not needed

In the first attempt to fix this issue, in the changePriceList event in remote, it just do a clear of search

In the current attempt it will check if any search filter introduced, if yes will luanch the search,
if no will just do nothing.

For the case of the changePriceList event launched when creating new receipt on login it should avoid the search,
since shouldn't have any search filter

Note: in relation with issue 35383, if less than 3 character in the search, it will do again this no relevant search and will show again
the message to narrow your search

---
M web/org.openbravo.mobile.core/source/retail/component/ob-retail-searchproductcharacteristic.js
---
(0097753)
hgbot   
2017-06-29 11:04   
Repository: tools/automation/pi-mobile
Changeset: 5b04c8155d5841a6642aa8bed752da6f65747bcb
Author: Gorka Gil <gorka.gil <at> openbravo.com>
Date: Wed Jun 28 14:03:41 2017 +0200
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/5b04c8155d5841a6642aa8bed752da6f65747bcb [^]

Related to issue 35485: Doing login in a multiprice list terminal with remote configured, do a product query without filters that is not needed

Added test to check in MPL in remote:
- Create a ticket doesn't launch a empty search (no possible to check only aproximated, just checking the search results table is empty)
- If a search is already done, change the price list doesn't reset it

---
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/highvolume/I35485_MplChangeDoesntTriggersEmptySearchs.java
---
(0097777)
Sandrahuguet   
2017-06-29 15:19   
reviewed and tested