Openbravo Issue Tracking System - Retail Modules
View Issue Details
0035040Retail ModulesWeb POSpublic2017-01-24 10:032017-08-22 08:43
aaroncalero 
jorge-garcia 
highmajorsometimes
closedfixed 
5
 
RR17Q2 
marvintm
No
0035040: Web POS can throw a OrgDesynchronization error when changing the role from the pos Edit Profile popup
When a user changes the role from the pos, there is a small interval (a few milliseconds) in which the session in backend doesn't have any variable defined.
During that interval, if there is any request from the pos, the server needs to create a temporal session to handle the request. While creating this temporal session, it might happen that the chosen organization is not the same as the organization for the pos.
If that happens, the request executed with that temporal session will throw an "Organization desynchronization" error, and the pos will be forced to log out.
Using livebuilds:
1. Backend configuration
*Go to the Role window and create a new record.
-Check the Manual checkbox.
-Add the organizations Mandatory Services Store and Vall blanca Store
-Add the Form Access Web POS.
-Assign this new role to the Vall Blanca Store User
*Go to the User window, find the Vall Blanca Store User record and remove the default role.
2. Web pos.
*Log in in web pos with the user vallblanca
*Since the only way to have a request to the server while changing the role is to have an automatic request, open the browser console and execute the following to generate a repeated request:
var int = setInterval(function(){
  new OB.DS.Request('org.openbravo.retail.posterminal.term.RejectReason').exec(null, function(){});
}, 200);
*Go to the Menu > User > Profile
*There will be 2 roles available: VallBlancaUser and Manual. Change the role and click on Apply.
The webpos will start reloading, and then the error will be thrown.
No tags attached.
Issue History
2017-01-24 10:03aaroncaleroNew Issue
2017-01-24 10:03aaroncaleroAssigned To => Retail
2017-01-24 10:03aaroncaleroResolution time => 1486422000
2017-01-24 10:03aaroncaleroTriggers an Emergency Pack => No
2017-01-26 09:31jorge-garciaStatusnew => scheduled
2017-01-26 09:31jorge-garciaAssigned ToRetail => jorge-garcia
2017-02-01 08:39hgbotCheckin
2017-02-01 08:39hgbotNote Added: 0093970
2017-02-01 08:39hgbotStatusscheduled => resolved
2017-02-01 08:39hgbotResolutionopen => fixed
2017-02-01 08:39hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/7162b5054a86fbc6ae1ce40052d30ed5282facfe [^]
2017-02-01 08:40hgbotCheckin
2017-02-01 08:40hgbotNote Added: 0093971
2017-02-01 08:40hgbotCheckin
2017-02-01 08:40hgbotNote Added: 0093972
2017-02-01 08:40hgbotCheckin
2017-02-01 08:40hgbotNote Added: 0093973
2017-02-02 09:29marvintmNote Added: 0094006
2017-02-02 09:29marvintmStatusresolved => new
2017-02-02 09:29marvintmResolutionfixed => open
2017-02-02 12:12jorge-garciaStatusnew => scheduled
2017-02-02 12:12hgbotCheckin
2017-02-02 12:12hgbotNote Added: 0094017
2017-02-02 12:12jorge-garciaStatusscheduled => resolved
2017-02-02 12:12jorge-garciaResolutionopen => fixed
2017-02-03 08:55marvintmReview Assigned To => marvintm
2017-02-03 08:55marvintmStatusresolved => closed
2017-02-03 08:55marvintmFixed in Version => RR17Q2
2017-08-21 14:07hgbotCheckin
2017-08-21 14:07hgbotNote Added: 0098556
2017-08-22 08:43hgbotCheckin
2017-08-22 08:43hgbotNote Added: 0098570

Notes
(0093970)
hgbot   
2017-02-01 08:39   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 7162b5054a86fbc6ae1ce40052d30ed5282facfe
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Thu Jan 26 15:20:29 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/7162b5054a86fbc6ae1ce40052d30ed5282facfe [^]

Fixed issue 35040: Web POS can throw a OrgDesynchronization error when
changing the role from the pos Edit Profile popup

The solution is to block executions of request and process during the change
of role done in the WebPOS.

---
M web/org.openbravo.mobile.core/source/component/dialog/ob-profile.js
M web/org.openbravo.mobile.core/source/data/ob-datasource.js
---
(0093971)
hgbot   
2017-02-01 08:40   
Repository: erp/pmods/org.openbravo.retail.sampledata
Changeset: c36ce03d32dded19f761b467a5c3694cb1326b66
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Thu Jan 26 16:04:04 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.sampledata/rev/c36ce03d32dded19f761b467a5c3694cb1326b66 [^]

Related to issue 35040: Web POS can throw a OrgDesynchronization error when
changing the role from the pos Edit Profile popup

Added new manual role to vall blanca user.

---
M referencedata/sampledata/The_White_Valley_Group/AD_FORM_ACCESS.xml
M referencedata/sampledata/The_White_Valley_Group/AD_ROLE.xml
M referencedata/sampledata/The_White_Valley_Group/AD_ROLE_ORGACCESS.xml
M referencedata/sampledata/The_White_Valley_Group/AD_USER_ROLES.xml
---
(0093972)
hgbot   
2017-02-01 08:40   
Repository: tools/automation/pi-mobile
Changeset: c55edf72b9aa97d805b2661a6a16200bcb3e8563
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Fri Jan 27 11:14:11 2017 +0100
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/c55edf72b9aa97d805b2661a6a16200bcb3e8563 [^]

Related to issue 35040: Web POS can throw a OrgDesynchronization error when
changing the role from the pos Edit Profile popup

Change some test due to the new user added to VallBlanca user.

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/loginout/I33730_VerifyRoleOrgAccess.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/loginout/I33737_VerifyLogInForPortalUser.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/loginout/I34424_VerifyRoleOrgAccessPaymentMethod.java
---
(0093973)
hgbot   
2017-02-01 08:40   
Repository: tools/automation/pi-mobile
Changeset: 31e278b5adb4dfb5b5e277b7d318d13aba2ebd59
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Tue Jan 31 08:53:49 2017 +0100
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/31e278b5adb4dfb5b5e277b7d318d13aba2ebd59 [^]

Verifies issue 35040: Web POS can throw a OrgDesynchronization error when
changing the role from the pos Edit Profile popup

Added test I35040_RequestDuringChangeRoleAction.

---
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/system/I35040_RequestDuringChangeRoleAction.java
---
(0094006)
marvintm   
2017-02-02 09:29   
Functions should start in lower case, so OB.DS.AllowRequests should be changed to OB.DS.allowRequests
(0094017)
hgbot   
2017-02-02 12:12   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: d22a83158c1ce33e8001d96eceed934a793f0041
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Thu Feb 02 12:11:48 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/d22a83158c1ce33e8001d96eceed934a793f0041 [^]

Related to issue 35040: Web POS can throw a OrgDesynchronization error when
changing the role from the pos Edit Profile popup

Change function uppercase to lowercase.

---
M web/org.openbravo.mobile.core/source/component/dialog/ob-profile.js
M web/org.openbravo.mobile.core/source/data/ob-datasource.js
---
(0098556)
hgbot   
2017-08-21 14:07   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 30531d74b4a22d24c59975eba5636cd6b695c5ed
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Mon Aug 21 14:07:29 2017 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/30531d74b4a22d24c59975eba5636cd6b695c5ed [^]

Related to issue 0035040: Web POS can throw a OrgDesynchronization error when changing the role from the pos Edit Profile popup

- Add disabled property because the test is giving a Warning

---
M web/org.openbravo.mobile.core/source/component/dialog/ob-profile.js
---
(0098570)
hgbot   
2017-08-22 08:43   
Repository: tools/automation/pi-mobile
Changeset: 92a989e655dc8d3397180c418cb7bdaa16d3d3bb
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Mon Aug 21 14:08:46 2017 +0200
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/92a989e655dc8d3397180c418cb7bdaa16d3d3bb [^]

Related to issue 0035040: Web POS can throw a OrgDesynchronization error when changing the role from the pos Edit Profile popup

- Add a verification to ensure the combo is filled

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/system/I35040_RequestDuringChangeRoleAction.java
---