[IMP] sale, purchase: adapt edi email templates
bzr revid: rco@openerp.com-20121213141700-t7glyfnl6gfmr0e2
This commit is contained in:
parent
33463a6bc3
commit
34cc7611f4
|
@ -19,7 +19,7 @@
|
|||
<!--Email template -->
|
||||
<record id="email_template_edi_purchase" model="email.template">
|
||||
<field name="name">Purchase Order - Send by mail</field>
|
||||
<field name="email_from">${object.validator.email or ''}</field>
|
||||
<field name="email_from">${object.validator.email or ''|safe}</field>
|
||||
<field name="subject">${object.company_id.name} Order (Ref ${object.name or 'n/a' })</field>
|
||||
<field name="email_recipients">${object.partner_id.id}</field>
|
||||
<field name="model_id" ref="purchase.model_purchase_order"/>
|
||||
|
@ -30,7 +30,7 @@
|
|||
<field name="body_html"><![CDATA[
|
||||
<div style="font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; ">
|
||||
|
||||
<p>Hello${object.partner_id.name and ' ' or ''}${object.partner_id.name or ''},</p>
|
||||
<p>Hello$ ${object.partner_id.name or ''},</p>
|
||||
|
||||
<p>Here is a ${object.state in ('draft', 'sent') and 'request for quotation' or 'purchase order confirmation'} from ${object.company_id.name}: </p>
|
||||
|
||||
|
@ -46,7 +46,7 @@
|
|||
Your reference: ${object.partner_ref}<br />
|
||||
% endif
|
||||
% if object.validator:
|
||||
Your contact: <a href="mailto:${object.validator.email or ''}?subject=Order%20${object.name}">${object.validator.name}</a>
|
||||
Your contact: <a href="mailto:${object.validator.email or ''|safe}?subject=Order%20${object.name}">${object.validator.name}</a>
|
||||
% endif
|
||||
</p>
|
||||
|
||||
|
@ -81,7 +81,7 @@
|
|||
% endif
|
||||
% if object.company_id.website:
|
||||
<div>
|
||||
Web : <a href="${object.company_id.website}">${object.company_id.website}</a>
|
||||
Web : <a href="${object.company_id.website|safe}">${object.company_id.website|safe}</a>
|
||||
</div>
|
||||
%endif
|
||||
<p></p>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<!--Email template -->
|
||||
<record id="email_template_edi_sale" model="email.template">
|
||||
<field name="name">Sale Order - Send by Email</field>
|
||||
<field name="email_from">${object.user_id.email or ''}</field>
|
||||
<field name="email_from">${object.user_id.email or ''|safe}</field>
|
||||
<field name="subject">${object.company_id.name} ${object.state in ('draft', 'sent') and 'Quotation' or 'Order'} (Ref ${object.name or 'n/a' })</field>
|
||||
<field name="email_recipients">${object.partner_invoice_id.id}</field>
|
||||
<field name="model_id" ref="sale.model_sale_order"/>
|
||||
|
@ -32,7 +32,7 @@
|
|||
<field name="body_html"><![CDATA[
|
||||
<div style="font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; ">
|
||||
|
||||
<p>Hello${object.partner_id.name and ' ' or ''}${object.partner_id.name or ''},</p>
|
||||
<p>Hello ${object.partner_id.name or ''},</p>
|
||||
|
||||
<p>Here is your ${object.state in ('draft', 'sent') and 'quotation' or 'order confirmation'} from ${object.company_id.name}: </p>
|
||||
|
||||
|
@ -48,25 +48,31 @@
|
|||
Your reference: ${object.client_order_ref}<br />
|
||||
% endif
|
||||
% if object.user_id:
|
||||
Your contact: <a href="mailto:${object.user_id.email or ''}?subject=Order%20${object.name}">${object.user_id.name}</a>
|
||||
Your contact: <a href="mailto:${object.user_id.email or ''|safe}?subject=Order%20${object.name}">${object.user_id.name}</a>
|
||||
% endif
|
||||
</p>
|
||||
|
||||
% 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),
|
||||
})
|
||||
%>
|
||||
<br/>
|
||||
<p>It is also possible to directly pay with Paypal:</p>
|
||||
<a style="margin-left: 120px;" href="${paypal_url}">
|
||||
<a style="margin-left: 120px;" href="${paypal_url|safe}">
|
||||
<img class="oe_edi_paypal_button" src="https://www.paypal.com/en_US/i/btn/btn_paynowCC_LG.gif"/>
|
||||
</a>
|
||||
% endif
|
||||
|
@ -102,7 +108,7 @@
|
|||
% endif
|
||||
% if object.company_id.website:
|
||||
<div>
|
||||
Web : <a href="${object.company_id.website}">${object.company_id.website}</a>
|
||||
Web : <a href="${object.company_id.website|safe}">${object.company_id.website|safe}</a>
|
||||
</div>
|
||||
%endif
|
||||
<p></p>
|
||||
|
|
Loading…
Reference in New Issue