Openbravo Issue Tracking System - Retail Modules
View Issue Details
0040955Retail ModulesWeb POSpublic2019-05-27 12:442019-06-06 11:44
ucarrion 
javierRodriguez 
highmajoralways
closedfixed 
5
 
RR19Q3 
marvintm
No
0040955: 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.
depends on backport 0041018RR19Q2.1 closed javierRodriguez Javascript error when changing terminal in synchronized mode 
Issue History
2019-05-27 12:44ucarrionNew Issue
2019-05-27 12:44ucarrionAssigned To => Retail
2019-05-27 12:44ucarrionResolution time => 1560549600
2019-05-27 12:44ucarrionTriggers an Emergency Pack => No
2019-05-27 13:11javierRodriguezAssigned ToRetail => javierRodriguez
2019-05-29 09:10guillermogilSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=18838#r18838
2019-06-04 09:56hgbotCheckin
2019-06-04 09:56hgbotNote Added: 0112367
2019-06-04 09:56hgbotStatusnew => resolved
2019-06-04 09:56hgbotResolutionopen => fixed
2019-06-04 09:56hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/5baff72ff876f7c729ed08f18f09f2156b81bd2d [^]
2019-06-04 09:57hgbotCheckin
2019-06-04 09:57hgbotNote Added: 0112368
2019-06-04 10:29javierRodriguezStatusresolved => new
2019-06-04 10:29javierRodriguezResolutionfixed => open
2019-06-04 10:29javierRodriguezStatusnew => scheduled
2019-06-04 10:29javierRodriguezStatusscheduled => resolved
2019-06-04 10:29javierRodriguezResolutionopen => fixed
2019-06-06 11:44marvintmReview Assigned To => marvintm
2019-06-06 11:44marvintmStatusresolved => closed
2019-06-06 11:44marvintmFixed in Version => RR19Q3

Notes
(0112367)
hgbot   
2019-06-04 09:56   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 5baff72ff876f7c729ed08f18f09f2156b81bd2d
Author: Javier Rodriguez <javier.rodriguez <at> openbravo.com>
Date: Wed May 29 10:12:29 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/5baff72ff876f7c729ed08f18f09f2156b81bd2d [^]

Fixed issue 40955: 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.

---
M web/org.openbravo.mobile.core/source/model/ob-terminal-model.js
---
(0112368)
hgbot   
2019-06-04 09:57   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 717d79f11cb9b8948aa4e159e7a69372fbfd1c7f
Author: Javier Rodriguez <javier.rodriguez <at> openbravo.com>
Date: Wed May 29 10:15:21 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/717d79f11cb9b8948aa4e159e7a69372fbfd1c7f [^]

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

---
M web/org.openbravo.retail.posterminal/js/login/model/login-model.js
---