Notes |
|
|
The problem is caused because the PrinterReports servlet is used for both the email and print pop-up.
For this reason, the Attach by Default preference is preventing the appearance of the email pop-up.
To solve this problem, a good idea could be to send a parameter in the client (OB.ToolbarUtils.print) method that will allow PrinterReports to indentify the correct flow.
|
|
|
(0081522)
|
hgbot
|
2015-11-05 13:56
|
|
Repository: erp/devel/pi
Changeset: 95838980b8006505d39b25031a7a8a96f7e799f0
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Thu Nov 05 11:28:55 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/95838980b8006505d39b25031a7a8a96f7e799f0 [^]
Fixed issue 31344: The email option does not work wih attach by default.
When the attach by default preference was set, the email option was not working.
To fix this some classes have bennchanged:
OBViewTab.java to have a new parameter "emailButton" or "printButton" in the view.
In the ob-toolbar.js, in the OB.ToolbarUtils.print function now takes the new parameter and puts
it in the popupParams.
Thanks to that in the PrinterReports.java it is possible to catch that parameter from the
vars variable and if it is "emailButton" the logic which was failing at first is avoided.
That logic is only for the direct print and the attach by default and this has no sense in the case
of an email.
---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewTab.java
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js
M src/org/openbravo/erpCommon/businessUtility/PrinterReports.java
---
|
|
|
|
|
|
(0081616)
|
caristu
|
2015-11-09 11:26
(edited on: 2015-11-09 11:27) |
|
Code review + tested OK.
Tested with all the combinations of the preferences that could affect:
1- Direct Print (not defined), Attach by Default (not defined)
2- Direct Print (Y), Attach by Default (not defined)
3- Direct Print (N), Attach by Default (not defined)
4- Direct Print (Y), Attach by Default (Y)
5- Direct Print (Y), Attach by Default (N)
6- Direct Print (not defined), Attach by Default (Y)
7- Direct Print (not defined), Attach by Default (N)
|
|
|
|
|