Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0019579Openbravo ERPA. Platformpublic2012-01-27 12:262012-03-02 15:34
malsasua 
alostale 
highminoralways
closedfixed 
20Community Appliance
 
3.0MP103.0MP9 
Google Chrome
Core
No
0019579: to print a pdf , the popup is not closed automatically
when you open a report from the button in toolbar, a popup is opened, but it is not closed automatically
. go to warehouse management -> transactions -> outgoing shipment ->
 click in print button
No tags attached.
? 19579.export (8,475) 2012-02-03 10:00
https://issues.openbravo.com/file_download.php?file_id=4953&type=bug
Issue History
2012-01-27 12:26malsasuaNew Issue
2012-01-27 12:26malsasuaAssigned To => alostale
2012-01-27 12:26malsasuaWeb browser => Google Chrome
2012-01-27 12:26malsasuaModules => Core
2012-01-27 12:26malsasuaResolution time => 1334181600
2012-01-27 12:35malsasuaIssue Monitored: networkb
2012-01-27 12:35malsasuaWeb browserGoogle Chrome => Google Chrome
2012-01-27 12:35malsasuaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=3103#r3103
2012-02-02 18:22alostaleNote Added: 0044831
2012-02-02 18:22alostaleNote Edited: 0044831bug_revision_view_page.php?bugnote_id=0044831#r3128
2012-02-03 10:00alostaleFile Added: 19579.export
2012-02-03 10:03alostaleNote Added: 0044842
2012-02-03 10:18alostaleNote Added: 0044843
2012-02-03 10:42alostaleNote Added: 0044845
2012-02-03 10:45hgbotCheckin
2012-02-03 10:45hgbotNote Added: 0044846
2012-02-03 10:45hgbotStatusnew => resolved
2012-02-03 10:45hgbotResolutionopen => fixed
2012-02-03 10:45hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/099fe5a016340e9a9944428284b78285f70e54c3 [^]
2012-02-21 16:36malsasuaNote Added: 0045312
2012-02-28 12:07AugustoMauchNote Added: 0045523
2012-02-28 12:07AugustoMauchStatusresolved => closed
2012-02-28 12:07AugustoMauchFixed in Version => 3.0MP9
2012-03-02 15:34hudsonbotCheckin
2012-03-02 15:34hudsonbotNote Added: 0045748

Notes
(0044831)
alostale   
2012-02-02 18:22   
The problem is the servlet returning the pdf was opened within the popup. The fix opens it through the hidden form in this case.

Regression risks/Test plan:
1. There are two different printing mechanism, both should work as described:
   -associating a process to a tab (such as the one described in the example) which should directly download the document.
   -using poc configuration, in this case the popup should still be opened, when clicking the print button, popup should be closed and file downloaded
2. Different browsers might behave differently.
3. Test every report invokable from toolbar:
   *Business Partner - Business Partner
   *Goods Receipt - Header
   *Goods Shipment - Header
   *Incoming Shipment - Shipment in
   *Outgoing Shipment - Shipment out
   *Payment In - Header
   *Payment Out - Header
   *Process Plan - Process Plan
   *Purchase Invoice - Header
   *Purchase Invoice - Payment
   *Purchase Order - Header
   *Quality Control Point - Check Point Set
   *Quality Control Report - Date and Shift
   *Remittance - Header
   *Remittance - Remittance
   *Requisition - Requisition
   *Return from Customer - Header
   *Return to Vendor - Header
   *Return to Vendor Shipment - Header
   *Sales Invoice - Header
   *Sales Invoice - Payment
   *Sales Order - Header
   *Service Project - Proposal
   *Settlement - Created Payments
   *Settlement - Settlement
   *Tax Payment - Header
   *Tax Payment - Tax Register Header

(0044842)
alostale   
2012-02-03 10:03   
Attached fix with the proposed solution -> In case of non POC button, use hidden form to get the pdf.

This solution is NOT valid. It assumes all non POC print buttons to response with a file to download. But this assumption is not correct. For example in Business Partner it the response is HTML to be shown in a popup.
(0044843)
alostale   
2012-02-03 10:18   
Another solution is not to use HttpBaseServlet.renderFO(String, HttpServletResponse) method to render the pdf, but HttpSecureAppServlet.renderFO(String, request, response) instead. This method closes the opened popup.

To review:

  * Outgoing Shipment-Shipment out -> org.openbravo.erpReports.RptM_Inout
  * Incoming Shipment-Shipment in -> org.openbravo.erpReports.RptM_Inout
  * Quality Control Point-Check Point Set -> org.openbravo.erpReports.RptMA_CCP_Group
  * Quality Control Report-Date and Shift -> org.openbravo.erpReports.RptMA_CCP_Measures
  * Business Partner-Business Partner -> org.openbravo.erpReports.RptC_Bpartner
  * Service Project-Proposal -> org.openbravo.erpReports.RptC_ProposalJr
  * Process Plan-Process Plan -> org.openbravo.erpReports.RptMA_ProcessPlan
  * Tax Payment-Tax Register Header -> org.openbravo.erpReports.ReportVatRegisterJR
  * Tax Payment-Header -> org.openbravo.erpReports.ReportTaxPaymentJR
  * Requisition-Requisition -> org.openbravo.erpReports.RptM_Requisition
  * Remittance-Remittance -> org.openbravo.module.remittance.erpReports.RptRemittance
(0044845)
alostale   
2012-02-03 10:42   
After reviewing the tabs not working as expected were:

Quality Control Point;Check Point Set;org.openbravo.erpReports.RptMA_CCP_Group
Quality Control Report;Date and Shift;org.openbravo.erpReports.RptMA_CCP_Measures
Incoming Shipment;Shipment in;org.openbravo.erpReports.RptM_Inout
Outgoing Shipment;Shipment out;org.openbravo.erpReports.RptM_Inout

This approach is less regression risky than the previous one. It only affects the 4 tabs listed above.

Test plan:
-Check it works in the 4 tabs with different browsers (tested so far Chrome and FF)
(0044846)
hgbot   
2012-02-03 10:45   
Repository: erp/devel/pi
Changeset: 099fe5a016340e9a9944428284b78285f70e54c3
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Feb 03 10:43:34 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/099fe5a016340e9a9944428284b78285f70e54c3 [^]

fixed bug 19579: to print a pdf, the popup is not closed automatically

---
M src/org/openbravo/erpReports/RptMA_CCP_Group.java
M src/org/openbravo/erpReports/RptMA_CCP_Measures.java
M src/org/openbravo/erpReports/RptM_Inout.java
---
(0045312)
malsasua   
2012-02-21 16:36   
checked in version 3.0.15265
functionality OK:
test plan:
 1. print outgoing shipment: OK
 2. print sales invoice: OK
(0045523)
AugustoMauch   
2012-02-28 12:07   
Code reviewed and verified
(0045748)
hudsonbot   
2012-03-02 15: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/544d64e0c159 [^]

Maturity status: Test