Openbravo Issue Tracking System - Retail Modules
View Issue Details
0035195Retail ModulesWeb POSpublic2017-02-08 12:332017-03-08 15:49
aaroncalero 
migueldejuana 
normalmajoralways
closedfixed 
5
 
RR17Q2 
marvintm
No
0035195: OBSecurity exception thrown when a cashup is processed
It is possible the login in a web pos terminal, having the cashup from a different store. When this cashup is processed, an OBSecurityException is thrown, because at some point during the cashup processing, a FIN_Finacc_Transaction is created pointing to a cashup from a different organization.
Login in web pos in terminal VBS-1.
Verify the value of OB.UTIL.localStorage.getItem('loggedTerminalName') on the browser console. It should be VBS-1.
Logout. The value of OB.UTIL.localStorage.getItem('loggedTerminalName') should still be VBS-1.
Change the url of the terminal to PS-1. The value of OB.UTIL.localStorage.getItem('loggedTerminalName') should still be VBS-1.
Login in the PS-1 terminal.
Verify the value of OB.UTIL.localStorage.getItem('loggedTerminalName') on the browser console. Now it will be null.
Change the url of the terminal to VBS-1.
The application will reload, the url will point to VBS-1, but the loaded application will point to PS-1 (verify the documentNo of the open receipt).
Create a new ticket, add a product, and pay it.
Lock screen. The login screen will show the VBS-1 terminal users.
Login.
Do a cashup.
Go to the backend and verify the Errors While Importing POS Data window. There will be a new cashup entry with the following error:
org.openbravo.base.exception.OBSecurityException: Entity Cashbook - Vall Blanca Store - EUR - - 10234 - 350 (FIN_Finacc_Transaction) with organization Vall Blanca Store references an entity Vall Blanca Store User - 08-02-2017 11:51:22 through its property obposAppCashup but this referenced entity belongs to an organization Posets Store which is not part of the natural tree of Vall Blanca Store
No tags attached.
? issue35195_MobileCore.commit (1,518) 2017-02-24 10:22
https://issues.openbravo.com/file_download.php?file_id=10482&type=bug
? issue35195PiMobile.commit (3,282) 2017-02-24 10:22
https://issues.openbravo.com/file_download.php?file_id=10483&type=bug
Issue History
2017-02-08 12:33aaroncaleroNew Issue
2017-02-08 12:33aaroncaleroAssigned To => Retail
2017-02-08 12:33aaroncaleroResolution time => 1487718000
2017-02-08 12:33aaroncaleroTriggers an Emergency Pack => No
2017-02-09 15:20migueldejuanaAssigned ToRetail => migueldejuana
2017-02-09 15:20migueldejuanaStatusnew => scheduled
2017-02-24 10:22migueldejuanaFile Added: issue35195_MobileCore.commit
2017-02-24 10:22migueldejuanaFile Added: issue35195PiMobile.commit
2017-03-08 12:37hgbotCheckin
2017-03-08 12:37hgbotNote Added: 0094826
2017-03-08 12:37hgbotStatusscheduled => resolved
2017-03-08 12:37hgbotResolutionopen => fixed
2017-03-08 12:37hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/fbcd9a9beb28e2d3a6022448d0d29b85894cdf33 [^]
2017-03-08 12:38hgbotCheckin
2017-03-08 12:38hgbotNote Added: 0094827
2017-03-08 12:38hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/fbcd9a9beb28e2d3a6022448d0d29b85894cdf33 [^] => http://code.openbravo.com/tools/automation/pi-mobile/rev/1274265bf27efca1c78ff639864b5132664af260 [^]
2017-03-08 15:49marvintmReview Assigned To => marvintm
2017-03-08 15:49marvintmStatusresolved => closed
2017-03-08 15:49marvintmFixed in Version => RR17Q2

Notes
(0094826)
hgbot   
2017-03-08 12:37   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: fbcd9a9beb28e2d3a6022448d0d29b85894cdf33
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Thu Feb 23 09:21:12 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/fbcd9a9beb28e2d3a6022448d0d29b85894cdf33 [^]

Fixed issue 0035195: OBSecurity exception thrown when a cashup is processed

- Loading the login window, check if terminal changed and in case, clean the terminal

---
M web/org.openbravo.mobile.core/source/component/ob-login.js
---
(0094827)
hgbot   
2017-03-08 12:38   
Repository: tools/automation/pi-mobile
Changeset: 1274265bf27efca1c78ff639864b5132664af260
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Thu Feb 23 09:22:46 2017 +0100
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/1274265bf27efca1c78ff639864b5132664af260 [^]

Fixed issue 0035195: OBSecurity exception thrown when a cashup is processed

- Loading the login window, check if terminal changed and in case, clean the terminal
- Add a test for this issue

---
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/loginout/I35195_TerminalChangeAllowed.java
---