Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030151Openbravo ERPA. Platformpublic2015-06-10 17:072015-06-19 14:18
alostale 
alostale 
normalmajorhave not tried
closedfixed 
5
 
3.0PR15Q33.0PR15Q3 
caristu
Core
No
0030151: NPE with clientclass field + field level access
When a window has at least a client class field and the role accessing that window has field level access permissions for that window, a NPE is thrown when opening it.
-Install org.openbravo.client.application.examples module which adds a client class field in Sales Order Header window
-As group admin role:
   Create a new role
   Set the user level to Client+Organization
   Set it as manual
   Set an organization in the Org Access tab
   Set Sales Order window in the Window Access tab:
      Editable Field: Y
   Set Header tab in the Tab Access tab:
      Editable Field: Y
   Set Copy From Order field in the Field Access tab:
      Editable Field: N
      Check On Save: N
-As that role open Sales Order window
  -> error popup is seen in UI
  -> this error appears in openbravo.log:
1f923ef8 2262224 [http-8080-8] ERROR org.openbravo.base.exception.OBException -
java.lang.NullPointerException
    at org.openbravo.client.kernel.KernelUtils.getProperty(KernelUtils.java:462)
    at org.openbravo.client.application.WindowSettingsActionHandler.execute(WindowSettingsActionHandler.java:136)
    at org.openbravo.client.kernel.BaseActionHandler.execute(BaseActionHandler.java:71)
No tags attached.
Issue History
2015-06-10 17:07alostaleNew Issue
2015-06-10 17:07alostaleAssigned To => platform
2015-06-10 17:07alostaleModules => Core
2015-06-10 17:07alostaleTriggers an Emergency Pack => No
2015-06-15 10:43alostaleReview Assigned To => caristu
2015-06-15 10:43alostaleAssigned Toplatform => alostale
2015-06-15 10:46hgbotCheckin
2015-06-15 10:46hgbotNote Added: 0078290
2015-06-15 10:46hgbotStatusnew => resolved
2015-06-15 10:46hgbotResolutionopen => fixed
2015-06-15 10:46hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/0dfb1e303a0750940956474602846142100b652e [^]
2015-06-16 00:37hudsonbotCheckin
2015-06-16 00:37hudsonbotNote Added: 0078310
2015-06-19 14:18caristuNote Added: 0078396
2015-06-19 14:18caristuStatusresolved => closed
2015-06-19 14:18caristuFixed in Version => 3.0PR15Q3

Notes
(0078290)
hgbot   
2015-06-15 10:46   
Repository: erp/devel/pi
Changeset: 0dfb1e303a0750940956474602846142100b652e
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Mon Jun 15 10:45:15 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/0dfb1e303a0750940956474602846142100b652e [^]

fixed bug 30151: NPE with clientclass field + field level access

  When calculating field role access, the code assumed all fields are linked to
  a property which is not the case of clientclass fields. In this case a NPE was
  thrown.

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/WindowSettingsActionHandler.java
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelUtils.java
---
(0078310)
hudsonbot   
2015-06-16 00:37   
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/fa5bbdf39822 [^]
Maturity status: Test
(0078396)
caristu   
2015-06-19 14:18   
Code review + Tested OK

Tested with client class field in Sales Order Header window added with "User Interface Application Examples" module.

Accessed to the Sales Order window without errors, using a manual role configured as explained in Steps To Reproduce.