Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0031386Openbravo ERPA. Platformpublic2015-11-06 10:212015-11-23 21:17
aferraz 
aferraz 
normalminoralways
closedfixed 
30Professional Appliance
 
3.0PR16Q1 
dmiguelez
Core
No
0031386: Error shown in Add Payment when role has no access to Financial Account window
Error shown in Add Payment when role has no access to Financial Account window
As F&B Admin:

- Go to Role window and select F&B España, S.A - Finance
  In Window Access tab, delete all records but related to Sales Invoice window
  In Report and Process Access, delete record related to Add Payment process

As F&B España Finance:

- Go to Sales Invoice window
  Select any record with Total Outstanding > 0
  Click on Add Payment button
  Realize Add Payment is opened and all fields are filled, but an error is shown with the following message:
Error occured: org.openbravo.base.exception.OBException: org.openbravo.base.exception.OBSecurityException: Entity FinancialMgmtFinAccPaymentMethod is not readable by the user 100

- If you give access for Financial Account window to Finance role, this error is not shown.
No tags attached.
related to defect 0029035 closed inigosanchez Process definition containing parameters defined as "window", should automatically inherit permissions 
related to defect 00272363.0PR14Q3 closed alostale Process Definition defaults are not calculated if role inherits access to process from window access 
Issue History
2015-11-06 10:21aferrazNew Issue
2015-11-06 10:21aferrazAssigned To => platform
2015-11-06 10:21aferrazModules => Core
2015-11-06 10:21aferrazTriggers an Emergency Pack => No
2015-11-06 10:29aferrazNote Added: 0081548
2015-11-06 10:33aferrazRelationship addedrelated to 0029035
2015-11-06 10:33aferrazRelationship addedrelated to 0027236
2015-11-06 10:48alostaleAssigned Toplatform => Triage Finance
2015-11-06 10:49alostaleNote Added: 0081550
2015-11-18 13:02aferrazAssigned ToTriage Finance => aferraz
2015-11-18 13:02aferrazStatusnew => scheduled
2015-11-18 13:03aferrazNote Added: 0081947
2015-11-23 13:11hgbotCheckin
2015-11-23 13:11hgbotNote Added: 0082085
2015-11-23 13:11hgbotStatusscheduled => resolved
2015-11-23 13:11hgbotResolutionopen => fixed
2015-11-23 13:11hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/8ae08a1890a369c0121dd0adaa74f6e064b20b22 [^]
2015-11-23 13:12dmiguelezReview Assigned To => dmiguelez
2015-11-23 13:12dmiguelezNote Added: 0082086
2015-11-23 13:12dmiguelezStatusresolved => closed
2015-11-23 21:17hudsonbotCheckin
2015-11-23 21:17hudsonbotNote Added: 0082268

Notes
(0081548)
aferraz   
2015-11-06 10:29   
Issue is causing errors in APRDefaultsCalculated addpayment automated tests: https://ci.openbravo.com/view/qa/job/qa-pi-addpayment-pgsql/6/console [^]
(0081550)
alostale   
2015-11-06 10:49   
The error is in PaymentMethodMulticurrencyActionHandler

5246701 [http-8080-2] ERROR org.openbravo.base.exception.OBSecurityException - Entity FinancialMgmtFinAccPaymentMethod is not readable by the user 100
org.openbravo.base.exception.OBSecurityException: Entity FinancialMgmtFinAccPaymentMethod is not readable by the user 100
    at org.openbravo.dal.security.EntityAccessChecker.checkReadable(EntityAccessChecker.java:343)
    at org.openbravo.dal.service.OBDal.checkReadAccess(OBDal.java:596)
    at org.openbravo.dal.service.OBDal.checkReadAccess(OBDal.java:583)
    at org.openbravo.dal.service.OBDal.createCriteria(OBDal.java:426)
    at org.openbravo.advpaymentmngt.actionHandler.PaymentMethodMulticurrencyActionHandler.getFinancialAccountPaymentMethod(PaymentMethodMulticurrencyActionHandler.java:124)
(0081947)
aferraz   
2015-11-18 13:03   
As F&B Admin:

- Go to Role window and select F&B España, S.A - Finance
  In Window Access tab, delete all records but related to Sales Invoice window
  In Report and Process Access, delete record related to Add Payment process

As F&B España Finance:

- Go to Sales Invoice window
  Select any record with Total Outstanding > 0
  Click on Add Payment button
  Realize Add Payment is opened and all fields are filled, and no error is shown.
(0082085)
hgbot   
2015-11-23 13:11   
Repository: erp/devel/pi
Changeset: 8ae08a1890a369c0121dd0adaa74f6e064b20b22
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Wed Nov 18 11:15:28 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/8ae08a1890a369c0121dd0adaa74f6e064b20b22 [^]

Fixes issue 31386: Error shown in Add Payment

Error shown in Add Payment when role has no access to Financial Account window.
Add OBContext.setAdminMode(true) in getFinancialAccountPaymentMethod method to avoid it.

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/actionHandler/PaymentMethodMulticurrencyActionHandler.java
---
(0082086)
dmiguelez   
2015-11-23 13:12   
Code Review + Testing Ok
(0082268)
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