Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0037293Openbravo ERPA. Platformpublic2017-11-14 13:452017-11-17 15:39
Production - QA Approved
3.0PR17Q3 [^]
0037293: It is not possible to do login using a role if the role has got a deactivated organization
when a role has got one deactivate organization, in Role > Org Access, it is not possible to do login. Error is returned:
Error occured: org.openbravo.base.exception.OBException: java.lang.IllegalArgumentException: Error when saving default values
in F&B:
. do login with user Openbravo
. go to Role:
  . record: F&B España, S.A - Employee
  . go to org access tab:
     . record: F&B España - Región Norte
. change the role to F&B España, S.A - Employee
Error is returned
Take into account the "is active" flag in the queries launched by RoleInfo class. Since the changeset[1] it is using a Query instead of an OBQuery to retrieve the role's organization and warehouses data.

[1] [^]
No tags attached.
blocks defect 0037289 closed inigosanchez It is not possible to do login using a role if the role has got a deactivated organization 
Issue History
2017-11-14 18:22caristuTypedefect => backport
2017-11-14 18:22caristuTarget Version => 3.0PR17Q4
2017-11-16 10:12inigosanchezAssigned Toplatform => inigosanchez
2017-11-16 12:37hgbotCheckin
2017-11-16 12:37hgbotNote Added: 0100550
2017-11-16 12:37hgbotStatusscheduled => resolved
2017-11-16 12:37hgbotResolutionopen => fixed
2017-11-16 12:37hgbotFixed in SCM revision => [^]
2017-11-16 16:45caristuSeveritymajor => minor
2017-11-17 15:39caristuNote Added: 0100597
2017-11-17 15:39caristuStatusresolved => closed
2017-11-17 15:39caristuFixed in Version => 3.0PR17Q4

2017-11-16 12:37   
Repository: erp/backports/3.0PR17Q4
Changeset: 0559fa5e9e84e2b501be3d0cc62904378fc306f5
Author: Inigo Sanchez <inigo.sanchez <at>>
Date: Thu Nov 16 12:36:41 2017 +0100
URL: [^]

Fixed issue 37293: Deactivated orgs are displayed in the user profile widget

The problem was caused by the "Improve scalability of the login process" project. When improving the performance
of the query that return the complete organizations list for the current user, the OBQuery instance used to generate it was
replaced with a Query instance. The first includes by default the filter by is active.

To fix the problem this filter must be added manually in the query. Now the problem has been resolved by take into
account this filter. Besides the same problem is detected in other query related with deactivated warehouses so it is fixed too.

M modules/org.openbravo.client.application/src/org/openbravo/client/application/navigationbarcomponents/
2017-11-17 15:39   
Code reviewed + tested OK.