Openbravo Issue Tracking System - Retail Modules
View Issue Details
0039774Retail ModulesWeb POSpublic2018-12-10 14:042019-01-08 10:12
marvintm 
marvintm 
normalmajoralways
closedfixed 
5
 
 
migueldejuana
No
0039774: ExternalOrderLoader should establish the context according to the POS Terminal specified in the request
Currently the ExternalOrderLoader is establishing the context according to the default organization and default role of the specified user. This behaviour means that it is not possible to use the same user for requests to terminals belonging to different clients, or even different organizations if the assortment is not commonly accesible by all of them.

Instead, the context should be established according to the same rules of the POSLoginHandler, so the current client and organization should be the ones to which the specified POS Terminal belongs to.
Configure different clients (or organizations), and create terminals for each of them.
Execute ExternalOrderLoader requests to both terminals.
Verify that the context is set according to the user, which means that the client/organization is not properly set when the terminal specified belongs to a client/organization.
- ExternalOrderLoader should first validate that the specified user has access to the client and org of the specified POS Terminal (same validation currently done in the POSLoginHandler)
- If it has, then the context should be reset to this client/org, before executing the rest of the process
No tags attached.
related to defect 0039813 closed ranjith_qualiantech_com ExternalOrderLoader DefaultDataResolver does not filter by client id 
related to defect 0033307 closed guilleaer Unable to do login in POS Terminal with one user with two distinct roles 
related to defect 0039879 closed rqueralta ExternalOrderLoader should search entities based on POS Terminal Org instead of user readable orgs 
Issue History
2018-12-10 14:04marvintmNew Issue
2018-12-10 14:04marvintmAssigned To => Retail
2018-12-10 14:04marvintmResolution time => 1545606000
2018-12-10 14:04marvintmTriggers an Emergency Pack => No
2018-12-10 14:09rafarodaIssue Monitored: rafaroda
2018-12-10 15:28javierRodriguezAssigned ToRetail => javierRodriguez
2018-12-10 15:28javierRodriguezStatusnew => scheduled
2018-12-14 15:25hgbotCheckin
2018-12-14 15:25hgbotNote Added: 0108621
2018-12-14 15:25hgbotStatusscheduled => resolved
2018-12-14 15:25hgbotResolutionopen => fixed
2018-12-14 15:25hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/997ca0fac186ef6b28884b20bd29f8720f68a76a [^]
2018-12-14 15:25hgbotCheckin
2018-12-14 15:25hgbotNote Added: 0108622
2018-12-14 15:26marvintmAssigned TojavierRodriguez => marvintm
2018-12-17 10:30migueldejuanaReview Assigned To => migueldejuana
2018-12-17 10:30migueldejuanaNote Added: 0108632
2018-12-17 10:30migueldejuanaStatusresolved => closed
2018-12-17 11:11rafarodaRelationship addedrelated to 0039813
2018-12-19 10:08rafarodaRelationship addedrelated to 0033307
2019-01-08 10:12gorkaionIssue cloned0039879
2019-01-08 10:12gorkaionRelationship addedrelated to 0039879

Notes
(0108621)
hgbot   
2018-12-14 15:25   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 997ca0fac186ef6b28884b20bd29f8720f68a76a
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Fri Dec 14 13:20:33 2018 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/997ca0fac186ef6b28884b20bd29f8720f68a76a [^]

Fixed issue 39774: ExternalOrderLoader will reset the context according to the terminal.
- POSTerminal will be read without filters, to ensure that current context doesn't affect the query.
- Org+Client will be set to the ones in the terminal
- Role will be set using the POSLoginHandler query

---
M src/org/openbravo/retail/posterminal/ExternalOrderLoader.java
M src/org/openbravo/retail/posterminal/POSLoginHandler.java
---
(0108622)
hgbot   
2018-12-14 15:25   
Repository: tools/automation/pi-mobile
Changeset: 541044ae3c9c9f2806d310636488c9f147e24462
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Fri Dec 14 13:21:58 2018 +0100
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/541044ae3c9c9f2806d310636488c9f147e24462 [^]

Related to issue 39774: contextInfo will not be detected as a difference, because now ExternalOrderLoader may be changing the context.

---
M src-test/org/openbravo/test/mobile/retail/pack/webservice/tests/orderloader/RetailOrderLoaderTest.java
---
(0108632)
migueldejuana   
2018-12-17 10:30   
Reviewed