Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0042399Openbravo ERPA. Platformpublic2019-11-26 11:432019-12-09 11:23
egoitz 
caristu 
normalmajoralways
closedfixed 
5
 
3.0PR20Q1 
alostale
Core
No
0042399: Toolbar reports are using the readonly pool if configured
Based on the documentation [1] the reports printed from the standard toolbar button should use the standard pool and not the readonly pool but it is now working properly as same queries are executed in the readonly database.

[1] http://wiki.openbravo.com/wiki/Read-Only_Pool [^]

And starting from 3.0PR18Q2 release, the documents printed with the standard print toolbar button, are never using the read-only pool (even if configured) but the standard pool. See here for additional informatio
1- Configure Openbravo to use a readonly database
2- Configure postgresql on the readonly database to print all the queries (log_min_duration_statement = 0)
3- Go to purchase invoice window
4- Print the invoice using the toolbar button
5- Check the log on the readonly database. The query is printed on the log.
The class Report.java [1] is using the readonly pool on the constructor: getReadOnlyConnectionProvider

  public Report(DocumentType documentType, String documentId, String strLanguage, String templateId,
      boolean multiReport, OutputTypeEnum outputTypeString)
      throws ReportingException, ServletException {
    this(DalConnectionProvider.getReadOnlyConnectionProvider(), documentType, documentId,
        strLanguage, templateId, multiReport, outputTypeString);
  }




[1] https://code.openbravo.com/erp/devel/pi/file/tip/src/org/openbravo/erpCommon/utility/reporting/Report.java [^]
No tags attached.
related to feature request 0037933 closed caristu Documents printed with PrintController should use the standard connection pool 
Issue History
2019-11-26 11:43egoitzNew Issue
2019-11-26 11:43egoitzAssigned To => platform
2019-11-26 11:43egoitzModules => Core
2019-11-26 11:43egoitzResolution time => 1576105200
2019-11-26 11:43egoitzTriggers an Emergency Pack => No
2019-11-26 13:27AugustoMauchRelationship addedrelated to 0037933
2019-11-26 18:34caristuAssigned Toplatform => caristu
2019-11-28 13:32caristuStatusnew => acknowledged
2019-11-28 13:32caristuStatusacknowledged => scheduled
2019-12-09 10:24hgbotCheckin
2019-12-09 10:24hgbotNote Added: 0116143
2019-12-09 10:24hgbotStatusscheduled => resolved
2019-12-09 10:24hgbotResolutionopen => fixed
2019-12-09 10:24hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/f45e0aa5902dbb37011ac716555e74830c09f0a5 [^]
2019-12-09 11:22alostaleReview Assigned To => alostale
2019-12-09 11:22alostaleStatusresolved => closed
2019-12-09 11:22alostaleFixed in Version => 3.0PR20Q1
2019-12-09 11:23alostaleNote Added: 0116146

Notes
(0116143)
hgbot   
2019-12-09 10:24   
Repository: erp/devel/pi
Changeset: f45e0aa5902dbb37011ac716555e74830c09f0a5
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Tue Nov 26 18:58:41 2019 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/f45e0aa5902dbb37011ac716555e74830c09f0a5 [^]

fixes BUG-42399: toolbar reports should not use read-only pool

  The reports generated with the print toolbar button which are based in
the PrintController engine, should not make use of the read-only pool.
This is because more than reports they are rendering information of the
transactional data.

   This should have been fixed as part of [1], but that fix is missing the
part of the Report information retrieval.

[1] https://issues.openbravo.com/view.php?id=37933 [^]

---
M src/org/openbravo/erpCommon/utility/reporting/Report.java
---
(0116146)
alostale   
2019-12-09 11:23   
https://gitlab.com/openbravocode/product/openbravo/merge_requests/21 [^]