Openbravo Issue Tracking System - Retail Modules
View Issue Details
0032442Retail ModulesWeb POSpublic2016-03-09 11:302016-03-16 16:46
mtaal 
migueldejuana 
normalminorhave not tried
closedfixed 
5
 
RR16Q2RR16Q2 
mtaal
No
0032442: Prevent sourceversion check in case of multi-server when doing requests on other server
When doing datasource requests from WebPOS to the server the server will compute the sourceversion:
https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/b085729eb10c/src/org/openbravo/mobile/core/process/JSONProcessSimple.java#l62 [^]

When there are multiple servers it is possible that the store server has a different js version than the server. This can happen when updating the central server before the store server. As we only can support backward compatible changes this is not a problem by itself.

Therefore the source version check should only be done on the server from which the client side code is loaded.
1) install multiple servers
http://wiki.openbravo.com/wiki/Retail:Store_Server#Developer_Guide [^]

2) set all remote prefs
http://wiki.openbravo.com/wiki/Retail:Configuration_Guide#Remote_Data_Preferences [^]
3) set the central server to be the one which provides ticket loading
4) login to webpos
5) query for tickets
6) check that the central server requests contain the sourceversion in the json
I think that we should compute the sourceversion less often in case of remote prefs. For example we can only compute it once for each session. That could be a change on the server side code in JSONProcessSimple.

On the client side in ob-datasource.js the context check is fine that should happen. However, sourceversion check ([1]) should only happen for the requests which are going to the same location from which the code was loaded.

[1]
https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/file/b085729eb10c/web/org.openbravo.mobile.core/source/data/ob-datasource.js#l36 [^]
No tags attached.
Issue History
2016-03-09 11:30mtaalNew Issue
2016-03-09 11:30mtaalAssigned To => migueldejuana
2016-03-09 11:30mtaalTriggers an Emergency Pack => No
2016-03-15 15:57hgbotCheckin
2016-03-15 15:57hgbotNote Added: 0084991
2016-03-15 15:57hgbotStatusnew => resolved
2016-03-15 15:57hgbotResolutionopen => fixed
2016-03-15 15:57hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/2bc0dbcc2429c27370f69b0c888ec1a3b19c2095 [^]
2016-03-16 11:43mtaalReview Assigned To => mtaal
2016-03-16 16:46mtaalNote Added: 0085013
2016-03-16 16:46mtaalStatusresolved => closed
2016-03-16 16:46mtaalFixed in Version => RR16Q2

Notes
(0084991)
hgbot   
2016-03-15 15:57   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 2bc0dbcc2429c27370f69b0c888ec1a3b19c2095
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Tue Mar 15 12:10:37 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/2bc0dbcc2429c27370f69b0c888ec1a3b19c2095 [^]

Fixed issue 0032442: Prevent sourceversion check in case of multi-server when doing requests on other server

- the source version check is only done on the server from which the client side code is loaded.
- only compute sourceVersion once for each session

---
M src/org/openbravo/mobile/core/process/JSONProcessSimple.java
M web/org.openbravo.mobile.core/source/data/ob-datasource.js
M web/org.openbravo.mobile.core/source/model/ob-terminal-model.js
---
(0085013)
mtaal   
2016-03-16 16:46   
Reviewed and tested