Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0023431Openbravo ERPA. Platformpublic2013-03-28 17:312013-04-16 19:18
jecharri 
AugustoMauch 
immediatemajoralways
closedfixed 
5
pi 
3.0MP233.0MP23 
shankarb
Google Chrome
Core
No
0023431: Problems when you send two invoices by email at the same time
Problems when you send two invoices by email at the same time
Configure the client to send emails.

-Open two browser with window "sales invoice" opened

-select one in one browser an another in other browser.

-after that push in sent email icon in both browsers at the same time.

-You will see that 1 popup open in the browser with email information

-send both emails.

-verify that the email is sent to both partners but in both cases is the same content or data and invoice.
the problem is in the variable

private PocData[] pocData; class PrintController

When you open the popup this variable contains the last information and when you send an email the application only read the information, so it is getting the last popup information
No tags attached.
diff patchMultipleEmails.diff (4,778) 2013-04-03 15:35
https://issues.openbravo.com/file_download.php?file_id=6061&type=bug
Issue History
2013-03-28 17:31jecharriNew Issue
2013-03-28 17:31jecharriAssigned To => jonalegriaesarte
2013-03-28 17:31jecharriWeb browser => Google Chrome
2013-03-28 17:31jecharriModules => Core
2013-03-28 17:31jecharriTriggers an Emergency Pack => No
2013-04-02 12:54jecharriWeb browserGoogle Chrome => Google Chrome
2013-04-02 12:54jecharriAssigned Tojonalegriaesarte => AugustoMauch
2013-04-02 12:54jecharriCategory01. General setup => A. Platform
2013-04-03 15:35AugustoMauchFile Added: patchMultipleEmails.diff
2013-04-03 15:35AugustoMauchNote Added: 0057706
2013-04-03 15:35AugustoMauchStatusnew => scheduled
2013-04-03 15:35AugustoMauchfix_in_branch => pi
2013-04-09 16:38AugustoMauchIssue Monitored: shankarb
2013-04-09 16:38AugustoMauchReview Assigned To => shankarb
2013-04-09 16:38AugustoMauchWeb browserGoogle Chrome => Google Chrome
2013-04-09 16:38AugustoMauchfix_in_branchpi =>
2013-04-09 16:41hgbotCheckin
2013-04-09 16:41hgbotNote Added: 0057812
2013-04-09 16:41hgbotStatusscheduled => resolved
2013-04-09 16:41hgbotResolutionopen => fixed
2013-04-09 16:41hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/6b34ef9b837f51eb4a027baa31f198f6aa9e95a4 [^]
2013-04-14 15:19shankarbNote Added: 0057878
2013-04-14 15:19shankarbStatusresolved => closed
2013-04-14 15:19shankarbFixed in Version => 3.0MP23
2013-04-16 19:18hudsonbotCheckin
2013-04-16 19:18hudsonbotNote Added: 0057947

Notes
(0057706)
AugustoMauch   
2013-04-03 15:35   
A patch for this issue has been attached.
(0057812)
hgbot   
2013-04-09 16:41   
Repository: erp/devel/pi
Changeset: 6b34ef9b837f51eb4a027baa31f198f6aa9e95a4
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Apr 09 16:38:21 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/6b34ef9b837f51eb4a027baa31f198f6aa9e95a4 [^]

Fixes issue 23431: It is possible to send several emails at the same time

The pocData attribute of the PrintController class stores the email attachments. The problem was that this property was global and shared among all threads, so it was not possible to send several emails at the same time, because in that case the attachment sent in the concurrent emails was the one generated the last time the Send Email button was pushed.

This has been fixed by storing the pocData of each email as a session attribute, using as a key the document number and the table name. This way pocData is no longer shared among threads, each thread has its own instance of pocData stored as a session attribute. Once the email is sent, the pocData is removed from the session.

---
M src/org/openbravo/erpCommon/utility/reporting/printing/PrintController.java
---
(0057878)
shankarb   
2013-04-14 15:19   
Code reviewed and tested in pi changest af8bd60362ce
(0057947)
hudsonbot   
2013-04-16 19:18   
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/8df08bea850d [^]

Maturity status: Test