Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0024532Openbravo ERPZ. Otherspublic2013-08-16 13:202013-08-21 13:16
vmromanos 
vmromanos 
normalminorN/A
closedfixed 
20Debian 5.0
pi 
3.0MP27 
dmiguelez
Core
No
0024532: Support more variables (tags) when sending emails
Currently (before 3.0MP27), the following variables are supported for email templates:
* @cus_ref@: The document reference of the customer
* @our_ref@: The reference of the document
* @cus_nam@: The name of the customer
* @sal_nam@: The name of the sales rep.

Some other variables could be added to support richer templates. Example:
* @bp_nam@: The Business Partner name
* @doc_date@: The document date
* @doc_desc@: The document description
* @doc_nextduedate@: The next due date (if document has associated any payment plan)
* @doc_lastduedate@: The last due date (if document has associated any payment plan)
Try to send an invoice by email
Create the following variables:
* @bp_nam@: The Business Partner name
* @doc_date@: The document date
* @doc_desc@: The document description
* @doc_nextduedate@: The next due date (if document has associated any payment plan)
* @doc_lastduedate@: The last due date (if document has associated any payment plan)
Coworking
related to defect 00245493.0MP27 closed vmromanos Regular expression errors when sending emails 
Issue History
2013-08-16 13:20vmromanosNew Issue
2013-08-16 13:20vmromanosAssigned To => vmromanos
2013-08-16 13:20vmromanosModules => Core
2013-08-16 13:20vmromanosTriggers an Emergency Pack => No
2013-08-16 13:21vmromanosStatusnew => scheduled
2013-08-16 13:21vmromanosfix_in_branch => pi
2013-08-16 13:21vmromanosTag Attached: Coworking
2013-08-16 13:28vmromanosNote Added: 0060611
2013-08-16 13:28vmromanosNote Edited: 0060611bug_revision_view_page.php?bugnote_id=0060611#r4954
2013-08-16 13:29vmromanosNote Edited: 0060611bug_revision_view_page.php?bugnote_id=0060611#r4955
2013-08-19 13:51vmromanosNote Added: 0060660
2013-08-20 08:21hgbotCheckin
2013-08-20 08:21hgbotNote Added: 0060668
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/b733b50a1016b225135dd31a19b878c6fcb10b4d [^]
2013-08-20 13:31vmromanosRelationship addedrelated to 0024549
2013-08-20 16:14hudsonbotCheckin
2013-08-20 16:14hudsonbotNote Added: 0060685
2013-08-21 13:16dmiguelezReview Assigned To => dmiguelez
2013-08-21 13:16dmiguelezNote Added: 0060708
2013-08-21 13:16dmiguelezStatusresolved => closed

Notes
(0060611)
vmromanos   
2013-08-16 13:28   
(edited on: 2013-08-16 13:29)
Test plan:
1) Create the SMTP configuration for sending emails at Client window
2) Go to Document Type, select AR Invoice and go to Email Definitions tab
3) In subject set:
@cus_nam@ (@bp_nam@). Date @doc_date@
4) In body set:
@cus_ref@: The document reference of the customer
@our_ref@: The reference of the document
@cus_nam@: The name of the customer
@sal_nam@: The name of the sales rep.
@doc_date@: The document date
@doc_desc@: The document description
@doc_nextduedate@: The next due date (if any)
@doc_lastduedate@: The last due date (if any)
@bp_nam@: The Business Partner name
5) Go to sales invoice window and select any AR Invoice
6) Press the send email button.
7) Ensure the popup is properly shown, informing about the available variables that can be used
8) Send the email to your own account (change the To field)
9) Check your email and ensure the variables have been changed by the right value (if any)
10) Repeat the process for Orders and Payments.

(0060660)
vmromanos   
2013-08-19 13:51   
Documentation updated: http://wiki.openbravo.com/wiki/Document_Type#Email_Definitions [^]
(0060668)
hgbot   
2013-08-20 08:21   
Repository: erp/devel/pi
Changeset: b733b50a1016b225135dd31a19b878c6fcb10b4d
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Mon Aug 19 12:03:12 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/b733b50a1016b225135dd31a19b878c6fcb10b4d [^]

Fixed bug 24532: Support more variables (tags) when sending emails

Created the following new variables:
* @bp_nam@: The Business Partner name
* @doc_date@: The document date
* @doc_desc@: The document description
* @doc_nextduedate@: The next due date (if document has associated any payment plan)
* @doc_lastduedate@: The last due date (if document has associated any payment plan)

---
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src-db/database/sourcedata/AD_TEXTINTERFACES.xml
M src/org/openbravo/erpCommon/utility/reporting/Report.java
M src/org/openbravo/erpCommon/utility/reporting/Report_data.xsql
M src/org/openbravo/erpCommon/utility/reporting/printing/EmailOptions.html
M src/org/openbravo/erpCommon/utility/reporting/printing/PrintController.java
---
(0060685)
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
(0060708)
dmiguelez   
2013-08-21 13:16   
Code Review + Testing Ok