Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0028334Openbravo ERPC. Securitypublic2014-12-02 12:162014-12-30 23:27
egoitz 
NaroaIriarte 
normalminoralways
closedfixed 
5
 
3.0PR15Q23.0PR15Q1 
alostale
Core
No
0028334: The default on unit of meassure window does not work when using a role with "organization" access level
The default on unit of meassure window does not work when using a role with "organization" access level
-Login as system and see on the unit of measure window that unit is defined as default.
-Logout and login with Openbravo admin.
-Create a new user
-Create a new manual role with user level as "organization".
-Give acess to the produt window as editable
-Assign the user to the role and the parent organization (not only *)
-Logout
-Login with the new user
-go to the product window and click on new
*see that the default value of the unit of meassure field is the first one instead of the default.

-With a client/organization role it works properly
No tags attached.
Issue History
2014-12-02 12:16egoitzNew Issue
2014-12-02 12:16egoitzAssigned To => AugustoMauch
2014-12-02 12:16egoitzModules => Core
2014-12-02 12:16egoitzResolution time => 1423090800
2014-12-02 12:16egoitzTriggers an Emergency Pack => No
2014-12-03 14:26alostaleAssigned ToAugustoMauch => NaroaIriarte
2014-12-03 14:34alostaleNote Added: 0072263
2014-12-04 10:54NaroaIriarteSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=7209#r7209
2014-12-11 14:58hgbotCheckin
2014-12-11 14:58hgbotNote Added: 0072426
2014-12-11 14:58hgbotStatusnew => resolved
2014-12-11 14:58hgbotResolutionopen => fixed
2014-12-11 14:58hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/e2f6481d051b83a5c053b36f299b8eacfb44f29b [^]
2014-12-11 15:02alostaleReview Assigned To => alostale
2014-12-11 15:02alostaleNote Added: 0072427
2014-12-11 15:02alostaleStatusresolved => closed
2014-12-11 15:02alostaleFixed in Version => 3.0PR15Q1
2014-12-30 23:27hudsonbotCheckin
2014-12-30 23:27hudsonbotNote Added: 0073209

Notes
(0072263)
alostale   
2014-12-03 14:34   
The problem is when building the defaults the query uses writable organizations instead of referenceable ones.
(0072426)
hgbot   
2014-12-11 14:58   
Repository: erp/devel/pi
Changeset: e2f6481d051b83a5c053b36f299b8eacfb44f29b
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Thu Dec 11 13:05:07 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/e2f6481d051b83a5c053b36f299b8eacfb44f29b [^]

Fixed issue 28334: The default value on UOM is not taken.

When the user level is chosen as "organization". The default value set in the Unit of Measure is not
taken when the user creates a new product. Instead of the default value of UOM the first one appears.

For fixing this the "LoginUtils" java class has been changed. The readable organizations were not taken into
account and that was the reason why the default value of the Unit of Measure was not taken into account when
a new product was created by the user with user level as "organization".

Now the readable organizatios are taken thanks to the "Utility.getContext(conn, vars, "#AccesibleOrgTree", "LoginHandler")"
code.
"#AccesibleOrgTree" has been put instead of "#User_Org", which is an string with the readable organizations inside.

Now when a user with user level as "organization" creates a new product, the default value of the UOM is
taken.

---
M src/org/openbravo/base/secureApp/LoginUtils.java
---
(0072427)
alostale   
2014-12-11 15:02   
code reviewed

tested following steps to reproduces, passed try to ensure it doesn't break continuous integration as this change could case different behavior in some cases: before not default was offered whereas now it is.
(0073209)
hudsonbot   
2014-12-30 23:27   
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/6525fe229e06 [^]
Maturity status: Test