Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0024531Openbravo ERPZ. Otherspublic2013-08-16 10:312013-08-21 13:15
vmromanos 
vmromanos 
normalminoralways
closedfixed 
20Debian 5.0
pi 
3.0MP27 
dmiguelez
Core
No
0024531: @cus_nam@ in report filename replaced by business partner name instead of user name as it's done in email's subject and body
When sending a document by email, we can assign some variables that are automatically replaced by the concrete values. These variables works for email subject, body and the attached filename.

In the case of the attached filename, the variable @cus_nam@ is wrongly replaced by the business partner name, but it should be replaced by the customer (contact) name, as it's done in the email's subject or body
1. Go to document type window and select AR Invoice
2. Go to Report Template. Include @cus_nam@ in the report filename
3. Go to emails definition tab and include @cus_name@ in subject and body
4. Send any AR Invoice (you may first need to configure the smtp server at Client window)
5. Check in the email that the file name uses the business partner name and the subject and body use the customer name
No tags attached.
related to defect 0019489 closed guilleaer Variables cannot be used in "Document Type" -> "Report templates" -> "Report filename" field 
Issue History
2013-08-16 10:31vmromanosNew Issue
2013-08-16 10:31vmromanosAssigned To => vmromanos
2013-08-16 10:31vmromanosModules => Core
2013-08-16 10:31vmromanosTriggers an Emergency Pack => No
2013-08-16 10:32vmromanosRelationship addedrelated to 0019489
2013-08-16 10:33vmromanosStatusnew => scheduled
2013-08-16 10:33vmromanosfix_in_branch => pi
2013-08-19 10:47vmromanosNote Added: 0060656
2013-08-20 08:21hgbotCheckin
2013-08-20 08:21hgbotNote Added: 0060669
2013-08-20 08:21hgbotStatusscheduled => resolved
2013-08-20 08:21hgbotResolutionopen => fixed
2013-08-20 08:21hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/16b6c6165ce8ed72712ab6dd149ee425163eb3d8 [^]
2013-08-20 16:14hudsonbotCheckin
2013-08-20 16:14hudsonbotNote Added: 0060686
2013-08-21 13:15dmiguelezReview Assigned To => dmiguelez
2013-08-21 13:15dmiguelezNote Added: 0060707
2013-08-21 13:15dmiguelezStatusresolved => closed

Notes
(0060656)
vmromanos   
2013-08-19 10:47   
Test plan:
1) Create the SMTP configuration for sending emails at Client window
2) Go to Document Type, select AR Invoice
3) In Report Filename field set:
Sales Invoice-@our_ref@-@cus_nam@_@bp_nam@
4) Go to Sales Invoice window
5) Select any invoice
6) Press the send email button
7) In the attachment section, ensure the file name contain both the user/contact and the business partner name
Example: Sales_Invoice_1000001_Mathieu_Le_Grand_Sleep_Well_Hotels__Co..20130819-104654.pdf
8) Send the email to your account and check it has been successfully sent.
(0060669)
hgbot   
2013-08-20 08:21   
Repository: erp/devel/pi
Changeset: 16b6c6165ce8ed72712ab6dd149ee425163eb3d8
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Mon Aug 19 10:37:30 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/16b6c6165ce8ed72712ab6dd149ee425163eb3d8 [^]

Fixed bug 24531: @cus_nam@ in report filename wrongly replaced
It was replaced by the Business Partner name instead of the User/Contact name,
as it is done in email's subject and body

---
M src/org/openbravo/erpCommon/utility/reporting/Report.java
M src/org/openbravo/erpCommon/utility/reporting/Report_data.xsql
---
(0060686)
hudsonbot   
2013-08-20 16:14   
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/e1d10234dde6 [^]

Maturity status: Test
(0060707)
dmiguelez   
2013-08-21 13:15   
Code Review + Testing Ok