Openbravo Issue Tracking System - Retail Modules
View Issue Details
0041018Retail ModulesWeb POSpublic2019-05-27 12:442019-06-06 11:44
ucarrion 
javierRodriguez 
highmajoralways
closedfixed 
5
 
RR19Q2.1RR19Q2.1 
marvintm
No
0041018: Javascript error when changing terminal in synchronized mode
A javascript error raises when changing terminal being activated the synchronized mode

video --> https://drive.google.com/file/d/1J8aFztVl8AhLR0uS42_k_nPWueNHm7Dh/view [^]
-Set 'WebPOS Synchronized Mode' preference to 'Y'
-Login a terminal
-Logout and change the URL to another one
-Login the new terminal
-The loading is locked
-After refreshing the javascript error raises
No tags attached.
blocks defect 0040955 closed javierRodriguez Javascript error when changing terminal in synchronized mode 
Issue History
2019-06-04 10:29javierRodriguezTypedefect => backport
2019-06-04 10:29javierRodriguezTarget Version => RR19Q2.1
2019-06-04 10:35hgbotCheckin
2019-06-04 10:35hgbotNote Added: 0112371
2019-06-04 10:35hgbotCheckin
2019-06-04 10:35hgbotNote Added: 0112372
2019-06-04 10:35hgbotStatusscheduled => resolved
2019-06-04 10:35hgbotResolutionopen => fixed
2019-06-04 10:35hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/5baff72ff876f7c729ed08f18f09f2156b81bd2d [^] => http://code.openbravo.com/retail/backports/3.0RR19Q2.1/org.openbravo.mobile.core/rev/cb05245f0385af5f8ad1c81f4fa1c39302c895b0 [^]
2019-06-06 11:44marvintmReview Assigned To => marvintm
2019-06-06 11:44marvintmStatusresolved => closed
2019-06-06 11:44marvintmFixed in Version => RR19Q2.1

Notes
(0112371)
hgbot   
2019-06-04 10:35   
Repository: retail/backports/3.0RR19Q2.1/org.openbravo.retail.posterminal
Changeset: 4d1401f84fb12d12a658ab0e21f62f91e87993b3
Author: Javier Rodriguez <javier.rodriguez <at> openbravo.com>
Date: Tue Jun 04 10:35:13 2019 +0200
URL: http://code.openbravo.com/retail/backports/3.0RR19Q2.1/org.openbravo.retail.posterminal/rev/4d1401f84fb12d12a658ab0e21f62f91e87993b3 [^]

Related to issue 41018: Javascript error when changing terminal in synchronized mode

---
M web/org.openbravo.retail.posterminal/js/login/model/login-model.js
---
(0112372)
hgbot   
2019-06-04 10:35   
Repository: retail/backports/3.0RR19Q2.1/org.openbravo.mobile.core
Changeset: cb05245f0385af5f8ad1c81f4fa1c39302c895b0
Author: Javier Rodriguez <javier.rodriguez <at> openbravo.com>
Date: Tue Jun 04 10:34:06 2019 +0200
URL: http://code.openbravo.com/retail/backports/3.0RR19Q2.1/org.openbravo.mobile.core/rev/cb05245f0385af5f8ad1c81f4fa1c39302c895b0 [^]

Fixed issue 41018: Javascript error when changing terminal in synchronized mode

When we login and logout in WebPOS with an specific terminal and then we change teh terminal,
the application force us to clean cache. This clean cache just delete all localstorage data, but
it does not delete the local database.

Finally, when we do login again in the new terminal, the application is going to recreate the localdatabase
because the is not any checksum in localstorage. Due to we have synchronized mode, WebPOS will try sync all
synchronized models that we have. The real issue is WebPOS do not have set the terminal and it try to take the terminal
id.

This fix consist in just put the terminal id if it is set in the applicaton. If it does not, the application
set the terminal id in teh data to sync as null. There is not any problem to fix this issue with this solution because
the backend does not expect a terminal id in the json that receive.

This fix consist in just put the terminal id if it is set in the applicaton. If it does not, the application
set the terminal id in teh data to sync as null. There is not any problem to fix this issue with this solution because
the backend does not expect a terminal id in the json that receive.

---
M web/org.openbravo.mobile.core/source/model/ob-terminal-model.js
---