Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0020234Openbravo ERPA. Platformpublic2012-04-11 09:332012-05-10 16:45
egoitz 
dbaz 
immediatemajoralways
closedfixed 
5
3.0MP9 
3.0MP113.0MP11 
Google Chrome
Core
No
0020234: Not possible to print reports on pdf using the last release of Chrome (18.x.x)
After upgrade Chrome to the last releases reports on pdf are not printed.
Using the last release of chrome, try to print a pdf from the application.
Regression
Issue History
2012-04-11 09:33egoitzNew Issue
2012-04-11 09:33egoitzAssigned To => alostale
2012-04-11 09:33egoitzWeb browser => Google Chrome
2012-04-11 09:33egoitzModules => Core
2012-04-11 09:33egoitzWeb browserGoogle Chrome => Google Chrome
2012-04-11 10:24egoitzWeb browserGoogle Chrome => Google Chrome
2012-04-11 10:24egoitzPriorityurgent => immediate
2012-04-11 10:24egoitzSeveritymajor => critical
2012-04-11 10:24egoitzWeb browserGoogle Chrome => Google Chrome
2012-04-11 10:24egoitzSeveritycritical => major
2012-04-11 10:37egoitzNote Added: 0047459
2012-04-11 10:50alostaleAssigned Toalostale => dbaz
2012-04-11 12:16dbazNote Added: 0047472
2012-04-11 12:17dbazNote Added: 0047473
2012-04-11 12:39hgbotCheckin
2012-04-11 12:39hgbotNote Added: 0047479
2012-04-11 12:39hgbotStatusnew => resolved
2012-04-11 12:39hgbotResolutionopen => fixed
2012-04-11 12:39hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/5d52d838f233e929de906971f97e41a8b907ea74 [^]
2012-04-11 13:19alostaleNote Added: 0047486
2012-04-11 13:19alostaleStatusresolved => closed
2012-04-11 13:19alostaleFixed in Version => 3.0MP11
2012-04-17 05:31hudsonbotCheckin
2012-04-17 05:31hudsonbotNote Added: 0047626
2012-05-10 16:45plujanTag Attached: Regression

Notes
(0047459)
egoitz   
2012-04-11 10:37   
on utils.js, the order d.submit on submitForm method seems that is not doing anything.
(0047472)
dbaz   
2012-04-11 12:16   
The issue is that if you try to print a document (example: "Sales Order" document) nothing happens. In "classic mode" it works ok.

In my research I have concluded that the problem is here:

https://code.openbravo.com/erp/devel/pi/file/9547870c49c8/src/org/openbravo/erpCommon/utility/reporting/printing/PrintOptions.html#l58 [^]

It seems that due to an internal js engine change in Chrome, this closePage is executed too quickly and something strange happens because, although the submission has been done to the hidden frame, the pdf never is downloaded.

It is important remark that in 3.0 mode the closePage at the end does a Smartclient popup close-click, and in 'classic mode' a simple "window.close()". It seems that Chrome handles ok the "window.close()" case, but whatever Smartclient does internally in this close-click crashes Chrome js engine for this specific action.

The only solution that seems to work is set a timeout (even with a 1ms timeout is enough).

This closePage() is widely used in classic processes, so maybe more classic popups could be broken because the same described problem.
Briefing, there are two different solutions:

a) Include the timeout in "PrintOptions.html" to fix this particular issue.

b) "Dead dogs don't bite", so include the timeout here
https://code.openbravo.com/erp/devel/pi/file/9547870c49c8/web/js/utils.js#l5441 [^]
so all the existing "closePage()" will have the timeout so all the potential issues mentioned before will be avoided.
(0047473)
dbaz   
2012-04-11 12:17   
Finally is going to be implemented solution "b" in order to avoid other classic popups using "closePage" could have the same issue
(0047479)
hgbot   
2012-04-11 12:39   
Repository: erp/devel/pi
Changeset: 5d52d838f233e929de906971f97e41a8b907ea74
Author: David Baz Fayos <david.baz <at> openbravo.com>
Date: Wed Apr 11 12:38:56 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/5d52d838f233e929de906971f97e41a8b907ea74 [^]

Fixed issue 20234: 'Print' now works ok using Google Chrome 18.x.x.x

---
M src/org/openbravo/erpCommon/security/Login.html
M src/org/openbravo/erpCommon/security/Login_F1.html
M web/js/utils.js
---
(0047486)
alostale   
2012-04-11 13:19   
Code reviewed and verified using Chrome 18.0.1025.142
(0047626)
hudsonbot   
2012-04-17 05:31   
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/cedf57621434 [^]

Maturity status: Test