Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0032795Openbravo ERP09. Financial managementpublic2016-04-27 10:292016-06-17 19:37
aferraz 
inigosanchez 
immediatecriticalhave not tried
closedfixed 
30Professional Appliance
 
3.0PR16Q33.0PR16Q3 
alostale
Core
Pre packaging ( pi )
2016-04-22
pi
https://code.openbravo.com/erp/devel/pi/rev/24a6162afaa5 [^]
No
0032795: G/L Item combo appears empty in Add Payment process definition
G/L Item combo appears empty in Add Payment process definition
As F&B Admin:

- Create a new Payment In
- Click on Add Details button
- In GL Items grid, click on [Add New]
- Click on G/L Item drop down and realize no items are shown
- Realize in the log the following exception is thrown:
c59635e2 2910446 [http-8080-5] ERROR org.openbravo.service.datasource.DataSourceServlet - Property gLItem does not exist for entity FIN_Payment
org.openbravo.base.util.CheckException: Property gLItem does not exist for entity FIN_Payment
    at org.openbravo.base.util.Check.isNotNull(Check.java:72)
    at org.openbravo.base.model.Entity.getProperty(Entity.java:568)
    at org.openbravo.base.model.Entity.getProperty(Entity.java:550)
    at org.openbravo.service.datasource.BaseDataSourceService.checkFetchDatasourceAccess(BaseDataSourceService.java:174)
    at org.openbravo.service.datasource.DataSourceServlet.doFetch(DataSourceServlet.java:280)
    at org.openbravo.service.datasource.DataSourceServlet.doPost(DataSourceServlet.java:773)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
No tags attached.
caused by feature request 00327283.0PR16Q3 closed inigosanchez Standard datasources should check entity access. 
causes defect 0034823 closed inigosanchez Can't add lines in Requisition with role F&B España, S.A - Employee 
png AddPayment.png (207,697) 2016-04-27 10:33
https://issues.openbravo.com/file_download.php?file_id=9329&type=bug
png
Issue History
2016-04-27 10:29aferrazNew Issue
2016-04-27 10:29aferrazAssigned To => platform
2016-04-27 10:29aferrazModules => Core
2016-04-27 10:29aferrazRegression level => Pre packaging ( pi )
2016-04-27 10:29aferrazRegression introduced in release => pi
2016-04-27 10:29aferrazRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/diff/24a6162afaa5/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/BaseDataSourceService.java [^]
2016-04-27 10:29aferrazTriggers an Emergency Pack => No
2016-04-27 10:33aferrazFile Added: AddPayment.png
2016-04-27 10:37alostaleRegression introduced by commithttps://code.openbravo.com/erp/devel/pi/diff/24a6162afaa5/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/BaseDataSourceService.java [^] => https://code.openbravo.com/erp/devel/pi/rev/24a6162afaa5 [^]
2016-04-27 10:40alostaleRegression date => 2016-04-22
2016-04-27 10:40alostaleRelationship addedcaused by 0032728
2016-04-27 10:40alostaleStatusnew => scheduled
2016-04-27 10:40alostaleAssigned Toplatform => inigosanchez
2016-04-28 16:07hgbotCheckin
2016-04-28 16:07hgbotNote Added: 0086056
2016-05-02 17:14hgbotCheckin
2016-05-02 17:14hgbotNote Added: 0086124
2016-05-02 17:14hgbotStatusscheduled => resolved
2016-05-02 17:14hgbotResolutionopen => fixed
2016-05-02 17:14hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/8bb50118e525a8f61172bf8273d4c6914a60bbf2 [^]
2016-05-02 17:37inigosanchezReview Assigned To => alostale
2016-05-06 08:12hgbotCheckin
2016-05-06 08:12hgbotNote Added: 0086228
2016-05-06 08:14alostaleNote Added: 0086229
2016-05-06 08:14alostaleStatusresolved => closed
2016-05-06 08:14alostaleFixed in Version => 3.0PR16Q3
2016-06-17 19:37hudsonbotCheckin
2016-06-17 19:37hudsonbotNote Added: 0087498
2016-06-17 19:37hudsonbotCheckin
2016-06-17 19:37hudsonbotNote Added: 0087507
2016-06-17 19:37hudsonbotCheckin
2016-06-17 19:37hudsonbotNote Added: 0087523
2016-12-29 15:13inigosanchezRelationship addedcauses 0034823

Notes
(0086056)
hgbot   
2016-04-28 16:07   
Repository: erp/devel/pi
Changeset: e8c0df5664deca28ef28bc90ef088d6ec532043c
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Thu Apr 28 13:52:52 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/e8c0df5664deca28ef28bc90ef088d6ec532043c [^]

Related with issue 32795: G/L Item does not works properly.
The problem was how entities were getting from selectors. It has been refactor
checkFetchDatasourceAccess() to solved this problem. Now checkFetchDatasourceAccess
obtain entities from selectors in two ways:
* By using getEntity() method.
* By using table of the selector.

Besides it has been added a test case in DataSourceSecurity to take into account this case.

---
M modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/BaseDataSourceService.java
M src-test/src/org/openbravo/test/datasource/DataSourceSecurity.java
---
(0086124)
hgbot   
2016-05-02 17:14   
Repository: erp/devel/pi
Changeset: 8bb50118e525a8f61172bf8273d4c6914a60bbf2
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Mon May 02 17:13:23 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/8bb50118e525a8f61172bf8273d4c6914a60bbf2 [^]

Fixed issue 32795: Calculate permissions for some target entities selectors

The problem was that it is not take into account access permissions for
some entities selectors. This selectors are in tabs of P&E WindowReferences.

It have been implemented new logic in EntityAccessChecker to take into
account target entities of selectors allocated into tabs of WindowReferences.
For example in Payment In > Add Details > GL Items section > G/L Item selector.

---
M src/org/openbravo/dal/security/EntityAccessChecker.java
---
(0086228)
hgbot   
2016-05-06 08:12   
Repository: erp/devel/pi
Changeset: 2e18a7bfef3aa7ca1f0412b0439e57103fa6c1c0
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri May 06 08:10:54 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/2e18a7bfef3aa7ca1f0412b0439e57103fa6c1c0 [^]

related to bug 32795: G/L Item combo appears empty in Add Payment

  Removed unneded if statement

---
M src/org/openbravo/dal/security/EntityAccessChecker.java
---
(0086229)
alostale   
2016-05-06 08:14   
code reviewed

tested:
- reported error does not appear anymore
- with a restricted role having access to only Payment In window, everything works as expected
(0087498)
hudsonbot   
2016-06-17 19: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/0dc7be081b1c [^]
Maturity status: Test
(0087507)
hudsonbot   
2016-06-17 19: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/0dc7be081b1c [^]
Maturity status: Test
(0087523)
hudsonbot   
2016-06-17 19: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/0dc7be081b1c [^]
Maturity status: Test