Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0005558Openbravo ERPB. User interfacepublic2008-10-17 11:102009-06-17 18:38
networkb 
iperdomo 
immediateminoralways
closedno change required 
20
2.40 
 
Core
No
0005558: Direct print option works only in specific configurations
We have been able to use direct print option in some environments, specifically internet explorer + acrobat reader, but not in most of them. By use we mean that the pdf was opened and print dialog of the application appeared.

Using firefox + kpdf | xpdf | acrobat there was no luck. Pdf file gets simply opened, but no print dialog appears.
1. Go to Application Dictionary || Report and Process || Report & Process.
2. Select RptC_Invoice
3. Check Direct Print
4. Go to any Sales Order
5. Click on the print button on the header
6. PDF gets opened.
No tags attached.
related to defect 0007025 closed iperdomo Parameter and "loading" Windows do not close when runing a process 
related to design defect 0009121 acknowledged Triage Platform Base Refactor Print & Email component 
depends on backport 0005593 closed iperdomo Direct print option works only in specific configurations 
Issue History
2008-10-17 11:10jacoboGiraltNew Issue
2008-10-17 11:10jacoboGiraltAssigned To => cromero
2008-10-17 11:10jacoboGiraltsf_bug_id0 => 2174290
2008-10-20 11:50psarobeStatusnew => scheduled
2008-10-20 11:50psarobefix_in_branch => trunk
2008-11-10 13:04cromeroAssigned Tocromero => rafaroda
2008-11-13 21:59rafarodaAssigned Torafaroda => pheenan
2009-03-24 10:54AinhoaPagolaAssigned Topheenan => gmauleon
2009-06-09 18:26networkbReporterjacoboGiralt => networkb
2009-06-09 18:26networkbPrioritynormal => immediate
2009-06-09 18:26networkbfix_in_branchpi =>
2009-06-12 12:40gmauleonAssigned Togmauleon => iciordia
2009-06-15 15:32iciordiaNote Added: 0017310
2009-06-15 15:32iciordiaStatusscheduled => feedback
2009-06-16 11:03iciordiaAssigned Toiciordia => dbaz
2009-06-16 11:04iciordiaStatusfeedback => scheduled
2009-06-16 11:04iciordiaNote Added: 0017338
2009-06-16 11:04iciordiafix_in_branch => pi
2009-06-16 12:55dbazNote Added: 0017345
2009-06-16 12:55dbazAssigned Todbaz => networkb
2009-06-16 13:14dbazAssigned Tonetworkb => dbaz
2009-06-16 19:33dbazNote Added: 0017364
2009-06-16 19:34dbazRelationship addedrelated to 0007025
2009-06-16 20:01dbazNote Added: 0017369
2009-06-17 11:10dbazAssigned Todbaz => iperdomo
2009-06-17 18:37iperdomoRelationship addedrelated to 0009121
2009-06-17 18:38iperdomoStatusscheduled => closed
2009-06-17 18:38iperdomoNote Added: 0017398
2009-06-17 18:38iperdomoResolutionopen => no change required

Notes
(0017310)
iciordia   
2009-06-15 15:32   
We have tested direct print in customer environment (IE7) and it works. 2nd level support will get more information from customer side.

It fails on FF but we will fix this bug with standard priority (high for this bug).

Ismael
(0017338)
iciordia   
2009-06-16 11:04   
Tested in the customer side (2.40 MP3) it does not work
(0017345)
dbaz   
2009-06-16 12:55   
Please do the following test in 2.40 (latest version) and check the following:

Edit the file src/org/openbravo/erpCommon/businessUtility/PrinterReports.html

There are two functions

function printReport(pagina) {
  abrirPDF(pagina, 'PDF');
  return true;
}

and

function printReport(pagina) {
  Pdf1.printWithDialog();
}

add the following alerts, so the functions should be as

function printReport(pagina) {
  alert('isPrintPreview');
  abrirPDF(pagina, 'PDF');
  return true;
}

and

function printReport(pagina) {
  alert('isDirectPrint');
  Pdf1.printWithDialog();
}

And then do the steps to reproduce.

Reassign me the bug telling me your results.

Thanks
(0017364)
dbaz   
2009-06-16 19:33   
It seems to be a problem related with the fix of

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

Since in revisions before

https://code.openbravo.com/erp/stable/2.40/rev/0f4a07dd8b4d [^]
https://code.openbravo.com/erp/stable/2.40/rev/499880ca72d7 [^]
https://code.openbravo.com/erp/stable/2.40/rev/c7387fabc62f [^]
https://code.openbravo.com/erp/stable/2.40/rev/0b41cc259237 [^]

it works but just after these commits it fails
(0017369)
dbaz   
2009-06-16 20:01   
There are two problems:

1. Despite for networkb works, for me although I do the steps of reproduce, it seems that "direct print" option doesn't run because for me it always enters by the first function printReport(pagina) { of the previous code. To test purposes and avoid this problem, I have changed
var direct = (strDirectPrinting!="")?"Y":"N";
to
var direct = (strDirectPrinting!="")?"Y":"Y";
in function abrirPDFSession(strPagina, strDirectPrinting, strHiddenKey, strHiddenValue, bolComprobarCambios) {

2. Once the first problem is avoided, another problem appears, which is related to the previous comment. The method to invoke pdfs has changed and has to be reviewed in order to change the call
(0017398)
iperdomo   
2009-06-17 18:38   
The direct printing option should be handled by the refactored Print & Email component.