From 34cc7611f4e655c5b1762f556594aac1af0816ee Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Thu, 13 Dec 2012 15:17:00 +0100 Subject: [PATCH] [IMP] sale, purchase: adapt edi email templates bzr revid: rco@openerp.com-20121213141700-t7glyfnl6gfmr0e2 --- .../edi/purchase_order_action_data.xml | 8 ++--- addons/sale/edi/sale_order_action_data.xml | 36 +++++++++++-------- 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/addons/purchase/edi/purchase_order_action_data.xml b/addons/purchase/edi/purchase_order_action_data.xml index 42efd08d44c..f861c025ae8 100644 --- a/addons/purchase/edi/purchase_order_action_data.xml +++ b/addons/purchase/edi/purchase_order_action_data.xml @@ -19,7 +19,7 @@ Purchase Order - Send by mail - ${object.validator.email or ''} + ${object.validator.email or ''|safe} ${object.company_id.name} Order (Ref ${object.name or 'n/a' }) ${object.partner_id.id} @@ -30,7 +30,7 @@ -

Hello${object.partner_id.name and ' ' or ''}${object.partner_id.name or ''},

+

Hello$ ${object.partner_id.name or ''},

Here is a ${object.state in ('draft', 'sent') and 'request for quotation' or 'purchase order confirmation'} from ${object.company_id.name}:

@@ -46,7 +46,7 @@   Your reference: ${object.partner_ref}
% endif % if object.validator: -   Your contact: ${object.validator.name} +   Your contact: ${object.validator.name} % endif

@@ -81,7 +81,7 @@ % endif % if object.company_id.website:
- Web : ${object.company_id.website} + Web : ${object.company_id.website|safe}
%endif

diff --git a/addons/sale/edi/sale_order_action_data.xml b/addons/sale/edi/sale_order_action_data.xml index ad96ae39109..2a2061f1e6b 100644 --- a/addons/sale/edi/sale_order_action_data.xml +++ b/addons/sale/edi/sale_order_action_data.xml @@ -21,7 +21,7 @@ Sale Order - Send by Email - ${object.user_id.email or ''} + ${object.user_id.email or ''|safe} ${object.company_id.name} ${object.state in ('draft', 'sent') and 'Quotation' or 'Order'} (Ref ${object.name or 'n/a' }) ${object.partner_invoice_id.id} @@ -32,7 +32,7 @@ -

Hello${object.partner_id.name and ' ' or ''}${object.partner_id.name or ''},

+

Hello ${object.partner_id.name or ''},

Here is your ${object.state in ('draft', 'sent') and 'quotation' or 'order confirmation'} from ${object.company_id.name}:

@@ -48,25 +48,31 @@   Your reference: ${object.client_order_ref}
% endif % if object.user_id: -   Your contact: ${object.user_id.name} +   Your contact: ${object.user_id.name} % endif

% if object.order_policy in ('prepaid','manual') and object.company_id.paypal_account and object.state != 'draft': - <% - comp_name = quote(object.company_id.name) - order_name = quote(object.name) - paypal_account = quote(object.company_id.paypal_account) - order_amount = quote(str(object.amount_total)) - cur_name = quote(object.pricelist_id.currency_id.name) - paypal_url = "https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=%s&item_name=%s%%20Order%%20%s" \ - "&invoice=%s&amount=%s&currency_code=%s&button_subtype=services&no_note=1" \ - "&bn=OpenERP_Order_PayNow_%s" % \ - (paypal_account,comp_name,order_name,order_name,order_amount,cur_name,cur_name) + <% set paypal_url = ("https://www.paypal.com/cgi-bin/webscr?cmd=_xclick" + "&business=%(paypal_account)s" + "&item_name=%(company_name)s%%20Order%%20%(order_name)s" + "&invoice=%(order_name)s" + "&amount=%(order_amount)s" + "&currency_code=%(currency)s" + "&button_subtype=services" + "&no_note=1" + "&bn=OpenERP_Order_PayNow_%(currency)s" + % { + 'paypal_account': quote(object.company_id.paypal_account), + 'company_name': quote(object.company_id.name), + 'order_name': quote(object.name), + 'order_amount': quote(str(object.amount_total)), + 'currency': quote(object.pricelist_id.currency_id.name), + }) %>

It is also possible to directly pay with Paypal:

- + % endif @@ -102,7 +108,7 @@ % endif % if object.company_id.website: %endif