-
Notifications
You must be signed in to change notification settings - Fork 25
/
mail_template.xml
49 lines (45 loc) · 1.88 KB
/
mail_template.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<record id="email_template_edi_sale" model="mail.template">
<field name="name">Sales Order: Send by email</field>
<field name="model_id" ref="sale.model_sale_order"/>
<field name="report_template" ref="action_report_saleorder"/>
<field name="report_name">${(object.name or '').replace('/','_')}</field>
<field name="lang">${object.partner_id.lang}</field>
<field name="user_signature" eval="False"/>
<field name="email_from">${object.user_id.email_formatted |safe}</field>
<field name="partner_to">${object.partner_id.id}</field>
<field name="auto_delete" eval="True"/>
<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="body_html" type="html">
<div style="margin: 0px; padding: 0px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;">
% set doc_name = 'quotation' if object.state in ('draft', 'sent') else 'order'
Dear ${object.partner_id.name}
% if object.partner_id.parent_id:
(${object.partner_id.parent_id.name})
% endif
<br /><br />
Here is
% if ctx.get('proforma'):
in attachment your pro-forma invoice
% else:
the ${doc_name} <strong>${object.name}</strong>
% endif
% if object.origin:
(with reference: ${object.origin} )
% endif
amounting in <strong>${format_amount(object.amount_total, object.pricelist_id.currency_id)}</strong>
from ${object.company_id.name}.
${format_date(object.date)}
${format_tz(dt, tz=False, format=False)} # v12
${format_datetime(dt, tz=False, dt_format=False, lang_code=False)} # v14
<br /><br />
Do not hesitate to contact us if you have any question.
</p>
</div>
</field>
</record>
Variations :
user
ctx
lang
object