Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0021864Openbravo ERP07. Sales managementpublic2012-10-04 18:542012-10-24 17:55
caristu 
caristu 
urgentmajoralways
closedfixed 
5
 
3.0MP173.0MP17 
ngarcia
Core
No
0021864: Discount Invoice Report is not filtering properly
Discount Invoice Report is not filtering properly.

We have two clients A, B and a user with roleA that only have access to client A. Also we have a sales invoice with a discount line for an organization in client B. And finally we don't have a currency conversion established for that invoice currency.

With the previous requirements, if we execute the Discount Invoice Report with roleA, we will obtain the following error message:

"There is no conversion rate defined from (from_currency) to
(dest_currency) for date 'salesinvoice_date', Client 'salesinvoice_client' and
Organization 'salesinvoice_group'."

This error should not appear because the sales invoice is defined for other client that roleA can't access. The query that generates the report is not filtering properly
a) Create two different clients: A,B
b) Create a user with a role (roleA) that only can access to A
c) Create a sales invoice with a discount line for an organization that belongs to B
d) Execute the Report with the appropiate currencies with roleA. You will get an error regarding to the sales invoice that belongs to another client.
No tags attached.
Issue History
2012-10-04 18:54caristuNew Issue
2012-10-04 18:54caristuAssigned To => caristu
2012-10-04 18:54caristuModules => Core
2012-10-04 18:54caristuResolution time => 1352242800
2012-10-04 18:55caristuIssue Monitored: networkb
2012-10-16 10:16hgbotCheckin
2012-10-16 10:16hgbotNote Added: 0053368
2012-10-16 10:16hgbotStatusnew => resolved
2012-10-16 10:16hgbotResolutionopen => fixed
2012-10-16 10:16hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/d77c65f5927582fc50cfa8ee1cd006bf3a74a407 [^]
2012-10-16 10:19caristuNote Added: 0053369
2012-10-18 17:46hudsonbotCheckin
2012-10-18 17:46hudsonbotNote Added: 0053470
2012-10-24 17:55ngarciaReview Assigned To => ngarcia
2012-10-24 17:55ngarciaNote Added: 0053663
2012-10-24 17:55ngarciaStatusresolved => closed
2012-10-24 17:55ngarciaFixed in Version => 3.0MP17

Notes
(0053368)
hgbot   
2012-10-16 10:16   
Repository: erp/devel/pi
Changeset: d77c65f5927582fc50cfa8ee1cd006bf3a74a407
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Mon Oct 15 13:07:17 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/d77c65f5927582fc50cfa8ee1cd006bf3a74a407 [^]

fixes issue 21864: Discount Invoice Report is not filtering properly

---
M src/org/openbravo/erpCommon/ad_reports/ReportInvoiceDiscount_data.xsql
---
(0053369)
caristu   
2012-10-16 10:19   
Test Plan:

Follow the steps to reproduce
(0053470)
hudsonbot   
2012-10-18 17:46   
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/81ae03c9fdbb [^]

Maturity status: Test
(0053663)
ngarcia   
2012-10-24 17:55   
verified