Openbravo Issue Tracking System - Retail Modules
View Issue Details
0031384Retail ModulesWeb POSpublic2015-11-05 22:252015-12-01 08:53
mtaal 
migueldejuana 
normalmajorhave not tried
closedfixed 
5
 
RR16Q1RR16Q1 
mtaal
No
0031384: Multi-server: when a user has a different default org in different servers a context changed message is shown
A user logs into WebPOS, multi-server architecture is enabled, after logging in quickly the context changed info message is shown.
- setup multi-server environment (multiple servers, define mobile servers)
- set a different default org for a user in the central and a store server
- login to WebPOS using this user on the store server
The MobileKeyAuthenticationManager gets/has the correct organization. Somehow the OBContext should be created using this organization.
No tags attached.
related to feature request 0031417 closed migueldejuana Openbravo ERP Add some methods to LoginUtils to be accessible from other clasess 
png Selection_062.png (246,049) 2015-11-05 22:25
https://issues.openbravo.com/file_download.php?file_id=8693&type=bug
png
Issue History
2015-11-05 22:25mtaalNew Issue
2015-11-05 22:25mtaalAssigned To => migueldejuana
2015-11-05 22:25mtaalFile Added: Selection_062.png
2015-11-05 22:25mtaalTriggers an Emergency Pack => No
2015-11-06 14:37daniOpenbravoIssue Monitored: daniOpenbravo
2015-11-10 12:29hgbotCheckin
2015-11-10 12:29hgbotNote Added: 0081640
2015-11-10 12:29hgbotStatusnew => resolved
2015-11-10 12:29hgbotResolutionopen => fixed
2015-11-10 12:29hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/d14b031058e5216a9fc541734003d33329ee720e [^]
2015-11-10 12:30hgbotCheckin
2015-11-10 12:30hgbotNote Added: 0081641
2015-11-10 12:30hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/d14b031058e5216a9fc541734003d33329ee720e [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/9de13c9b90cac3aeccfbff7153429563ebdece53 [^]
2015-11-10 15:28migueldejuanaRelationship addedrelated to 0031417
2015-11-12 00:14mtaalReview Assigned To => mtaal
2015-11-14 18:32mtaalNote Added: 0081850
2015-11-14 18:32mtaalStatusresolved => new
2015-11-14 18:32mtaalResolutionfixed => open
2015-11-14 18:34mtaalNote Added: 0081851
2015-11-23 13:43hgbotCheckin
2015-11-23 13:43hgbotNote Added: 0082092
2015-11-23 13:43hgbotStatusnew => resolved
2015-11-23 13:43hgbotResolutionopen => fixed
2015-11-23 13:43hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/9de13c9b90cac3aeccfbff7153429563ebdece53 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/4881004e97756cba44cc6a87e2320a7adc0578d0 [^]
2015-11-23 21:17hudsonbotCheckin
2015-11-23 21:17hudsonbotNote Added: 0082191
2015-12-01 08:53mtaalNote Added: 0082474
2015-12-01 08:53mtaalStatusresolved => closed
2015-12-01 08:53mtaalFixed in Version => RR16Q1

Notes
(0081640)
hgbot   
2015-11-10 12:29   
Repository: erp/devel/pi
Changeset: d14b031058e5216a9fc541734003d33329ee720e
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Mon Nov 09 13:14:03 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/d14b031058e5216a9fc541734003d33329ee720e [^]

Fixed issue 0031384: Multi-server: when a user has a different default org in different servers a context changed message is shown

Move common methods to LoginUtils

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/navigationbarcomponents/UserInfoWidgetActionHandler.java
M src/org/openbravo/base/secureApp/HttpSecureAppServlet.java
M src/org/openbravo/base/secureApp/LoginUtils.java
M src/org/openbravo/erpCommon/ad_forms/Role.java
---
(0081641)
hgbot   
2015-11-10 12:30   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 9de13c9b90cac3aeccfbff7153429563ebdece53
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Mon Nov 09 13:14:48 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/9de13c9b90cac3aeccfbff7153429563ebdece53 [^]

Fixed issue 0031384: Multi-server: when a user has a different default org in different servers a context changed message is shown

Set session when we use token for authentication

---
M src/org/openbravo/mobile/core/authenticate/MobileKeyAuthenticationManager.java
---
(0081850)
mtaal   
2015-11-14 18:32   
Works fine, small thing to solve, the defaults.warehouse in this line:
https://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/9de13c9b90cac3aeccfbff7153429563ebdece53#l1.48 [^]

maybe invalid for the organization. Can you add code to check if the warehouse is valid, if it is not valid (so not visible for the authenticationtoken.org) then select a new default org using this standard code:

          // Pick the warehouse using the organization
          strWarehouse = DefaultOptionsData.getDefaultWarehouse(cp, strClient, "'" + strOrg + "'");
        if (strWarehouse == null || strWarehouse.isEmpty()) {
          // If no warehouse for the default organization is available, pick using using the
          // accessible tree
          strWarehouse = DefaultOptionsData.getDefaultWarehouse(cp, strClient, new OrgTree(cp,
              strClient).getAccessibleTree(cp, strRole).toString());
        }
(0081851)
mtaal   
2015-11-14 18:34   
Extra info for interested, changes in ERP have been backed out:
https://code.openbravo.com/erp/devel/pi/rev/a7ba1d39303c [^]

and are re-committed in this issue:
https://issues.openbravo.com/view.php?id=31417 [^]
(0082092)
hgbot   
2015-11-23 13:43   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 4881004e97756cba44cc6a87e2320a7adc0578d0
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Mon Nov 23 13:43:06 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/4881004e97756cba44cc6a87e2320a7adc0578d0 [^]

Fixed issue 0031384: Multi-server: when a user has a different default org in different servers a context changed message is shown

- Check if default org is not currect org to get the default warehouse

---
M src/org/openbravo/mobile/core/authenticate/MobileKeyAuthenticationManager.java
---
(0082191)
hudsonbot   
2015-11-23 21:17   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/7b56bebaaa88 [^]
Maturity status: Test
(0082474)
mtaal   
2015-12-01 08:53   
reviewed