Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0028675Openbravo ERP09. Financial managementpublic2015-01-19 13:212015-03-04 13:49
Sandrahuguet 
reinaldoguerra 
urgenttrivialhave not tried
closedfixed 
20Community Appliance
 
3.0PR15Q23.0PR15Q2 
Sandrahuguet
Core
No
0028675: AccessibleOrgTree wrongly used in some reports
AccessibleOrgTree wrongly used in some reports.
This issue should be fixed for the following reports:

1) Sales Dimensional Report
2) Purchase Dimensional Report
3) Purchase Invoice Dimensional Report
4) Trial Balance
5) General Ledger Report
6) Journal Entries Report
7) Receivables Aging Schedule
8) Payables Aging Schedule
9) Payment Report
10) Balance Sheet and P&L structure
11) Customer Statement - this one is a process
12) Balance Sheet and P&L structure Setup - this one is not a report but a window.
As F&B España, S.A - Sales
Go to Sales Dimensional Report and fill the mandatory filters.
  Date from: 01-01-2014
  Date to: 31-12-2014
  Dimensions: Business Partner
  Organization: *
Click on HTML Format and realize that data from other organizations is considered
In many manual reports the organization combo is filled using:

 ComboTableData comboTableData = new ComboTableData(vars, this, "TABLEDIR", "AD_ORG_ID", "",
          "", Utility.getContext(this, vars, "#AccessibleOrgTree", "XXXX"),
          Utility.getContext(this, vars, "#User_Client", "XXXX"), '*');

And should be replaced by:

ComboTableData comboTableData = new ComboTableData(vars, this, "TABLEDIR", "AD_ORG_ID", "",
          "", Utility.getContext(this, vars, "#User_Org", "XXXX"),
          Utility.getContext(this, vars, "#User_Client", "XXXX"), '*');

No tags attached.
related to defect 0027953 closed jorge-garcia AccessibleOrgTree wrongly used in some reports may create security issues 
Issue History
2015-01-19 13:21SandrahuguetNew Issue
2015-01-19 13:21SandrahuguetAssigned To => reinaldoguerra
2015-01-19 13:21SandrahuguetModules => Core
2015-01-19 13:21SandrahuguetTriggers an Emergency Pack => No
2015-01-19 13:21SandrahuguetRelationship addedrelated to 0027953
2015-01-19 13:23jonalegriaesarteResolution time => 1425942000
2015-01-19 13:57reinaldoguerraStatusnew => scheduled
2015-01-19 15:23ngarciaIssue Monitored: ngarcia
2015-01-20 03:24reinaldoguerraNote Added: 0073632
2015-01-20 17:00SandrahuguetSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=7498#r7498
2015-01-20 17:01SandrahuguetSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=7499#r7499
2015-01-20 18:12hgbotCheckin
2015-01-20 18:12hgbotNote Added: 0073653
2015-01-20 18:12hgbotStatusscheduled => resolved
2015-01-20 18:12hgbotResolutionopen => fixed
2015-01-20 18:12hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/60e70b428ec7f2a6b0720050b18aae60211f34f1 [^]
2015-01-20 18:42hgbotCheckin
2015-01-20 18:42hgbotNote Added: 0073657
2015-01-20 18:42hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/60e70b428ec7f2a6b0720050b18aae60211f34f1 [^] => http://code.openbravo.com/erp/mods/org.openbravo.agingbalance/rev/ad77169f83e74cb51e7eed9086ed254d63b363bc [^]
2015-01-20 18:43SandrahuguetReview Assigned To => Sandrahuguet
2015-01-20 18:43SandrahuguetNote Added: 0073658
2015-01-20 18:43SandrahuguetStatusresolved => closed
2015-01-20 18:43SandrahuguetFixed in Version => 3.0PR15Q2
2015-02-04 20:34hudsonbotCheckin
2015-02-04 20:34hudsonbotNote Added: 0074165
2015-03-04 13:49psanjuanDescription Updatedbug_revision_view_page.php?rev_id=7842#r7842

Notes
(0073632)
reinaldoguerra   
2015-01-20 03:24   
Test plan 1:
As F&B España, S.A - Sales
Go to Sales Dimensional Report and fill the mandatory filters.
  Date from: 01-01-2014
  Date to: 31-12-2014
  Dimensions: Business Partner
Click on HTML Format and realize that only data from logged role's organizations is considered, as these organizations are selected in the combo.

Test plan 2:
As F&B España, S.A - Procurement
Go to Purchase Dimensional Report and fill the mandatory filters.
  Date from: 01-01-2014
  Date to: 31-12-2014
  Dimensions: Business Partner
Click on HTML Format and realize that only data from logged role's organizations is considered, as these organizations are selected in the combo.

Test plan 3:
As F&B España, S.A - Finance
Go to Purchase Invoice Dimensional Report and fill the mandatory filters.
  Date from: 01-01-2014
  Date to: 31-12-2014
  Dimensions: Business Partner
Click on HTML Format and realize that only data from logged role's organizations is considered, as these organizations are selected in the combo.

Test plan 4:
As F&B España, S.A - Finance
Go to Trial Balance and fill the mandatory filters.
  Date from: 01-01-2014
  Date to: 31-12-2014
  Organization: F&B España - Región Norte
Click on search button and realize that only data from logged role's organizations is considered, as these organizations are selected in the combo.

Test plan 5:
As F&B España, S.A - Finance
Go to General Ledger Report and fill the mandatory filters.
  Date from: 01-01-2014
  Date to: 31-12-2014
  Organization: F&B España - Región Norte
Click on search button and realize that only data from logged role's organizations is considered, as these organizations are selected in the combo.

Test plan 6:
As F&B España, S.A - Finance
Go to Journal Entries Report and fill the mandatory filters.
  Organization: F&B España - Región Norte
Click on search button and realize that only data from logged role's organizations is considered, as these organizations are selected in the combo.

Test plan 7:
Install "Aging Balance Report" module and rebuild application.
As F&B International Group Admin
Go to Role Window and select F&B International Group Admin
Go to Org Access tab and delete F&B US, Inc. from the list
Login again and go to Receivables Aging Schedule and realize that F&B US, Inc. is excluded from the org combo.
Fill the mandatory filters.
  Organization: F&B España - Región Norte (default logged org)
Click on search button and realize that only data from selected organization is considered.

Test plan 8:
Install "Aging Balance Report" module and rebuild application.
As F&B International Group Admin
Go to Role Window and select F&B International Group Admin
Go to Org Access tab and delete F&B US, Inc. from the list
Login again and go to Payables Aging Schedule and realize that F&B US, Inc. is excluded from the org combo.
Fill the mandatory filters.
  Organization: F&B España - Región Norte (default logged org)
Click on search button and realize that only data from selected organization is considered.

Test plan 9:
As F&B España, S.A - Finance
Go to Payment Report and fill the mandatory filters.
  Organization: F&B España - Región Norte
Click on search button and realize that only data from logged role's organizations is considered, as these organizations are selected in the combo.

Test plan 10:
As F&B España, S.A - Finance
Go to Balance Sheet and P&L structure and fill the mandatory filters.
  General Ledger: F&B España, S.A. US/A/Euro
  Accounting Report: Pérdidas y Ganancias
  Realize that the organization combo displays only logged role's organizations.
  Organization: F&B España - Región Norte
Click on PDF Format and realize that only data from selected organization is considered.

Test plan 11:
As F&B International Group Admin
Go to Role Window and select F&B International Group Admin
Go to Org Access tab and delete F&B US, Inc. from the list
Login again and go to Customer Statement and realize that F&B US, Inc. is excluded from the org combo.
Fill the mandatory filters.
  Organization: F&B España - Región Norte (default logged org)
Click OK button and realize that only data from selected organization is considered.
(0073653)
hgbot   
2015-01-20 18:12   
Repository: erp/devel/pi
Changeset: 60e70b428ec7f2a6b0720050b18aae60211f34f1
Author: Reinaldo Guerra <reinaldo.guerra <at> peoplewalking.com>
Date: Tue Jan 20 18:10:14 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/60e70b428ec7f2a6b0720050b18aae60211f34f1 [^]

Fixed bug 28675: AccessibleOrgTree wrongly used in some reports.

Organization combo in some manual reports now includes organizations accessed by logged role.
In some cases Utility getContext method when creating organizations combo, was changed to use User_Org instead of AccessibleOrgTree. Also for Balance sheet and P&L structure report (GeneralAccountingReports java class), organizations list was taken from OBContext's role due to the organization's combo, in this case, is filled in a different way. For Customer Statement process, a new validation was created to obtain organizations accessed by logged role.

---
M modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReport.java
M src-db/database/sourcedata/AD_PROCESS_PARA.xml
M src-db/database/sourcedata/AD_VAL_RULE.xml
M src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReports.java
M src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedger.java
M src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedgerJournal.java
M src/org/openbravo/erpCommon/ad_reports/ReportInvoiceVendorDimensionalAnalysesJR.java
M src/org/openbravo/erpCommon/ad_reports/ReportPurchaseDimensionalAnalysesJR.java
M src/org/openbravo/erpCommon/ad_reports/ReportSalesDimensionalAnalyzeJR.java
M src/org/openbravo/erpCommon/ad_reports/ReportTrialBalance.java
---
(0073657)
hgbot   
2015-01-20 18:42   
Repository: erp/mods/org.openbravo.agingbalance
Changeset: ad77169f83e74cb51e7eed9086ed254d63b363bc
Author: Reinaldo Guerra <reinaldo.guerra <at> peoplewalking.com>
Date: Mon Jan 19 21:23:45 2015 -0500
URL: http://code.openbravo.com/erp/mods/org.openbravo.agingbalance/rev/ad77169f83e74cb51e7eed9086ed254d63b363bc [^]

Fixed bug 28675: AccessibleOrgTree wrongly used in some reports.

Organization combo in some manual reports now includes organizations accessed by logged role.
In some cases Utility getContext method when creating organizations combo, was changed to use User_Org instead of AccessibleOrgTree. Also for Balance sheet and P&L structure report (GeneralAccountingReports java class), organizations list was taken from OBContext's role due to the organization's combo, in this case, is filled in a different way. For Customer Statement process, a new validation was created to obtain organizations accessed by logged role.

---
M src/org/openbravo/agingbalance/ad_reports/AgingProcess.java
---
(0073658)
Sandrahuguet   
2015-01-20 18:43   
Code review + testing OK
(0074165)
hudsonbot   
2015-02-04 20:34   
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/f36c91d0ad63 [^]
Maturity status: Test