You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
2.7 KiB
63 lines
2.7 KiB
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<data noupdate="1">
|
|
<!--Email template -->
|
|
<record id="sale.email_template_edi_sale" model="mail.template">
|
|
<field name="name">Sales Order - Send by Email</field>
|
|
<field name="email_from">${(object.user_id.email and '%s <%s>' % (object.user_id.name, 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="partner_to">${object.partner_id.id}</field>
|
|
<field name="model_id" ref="sale.model_sale_order"/>
|
|
<field name="auto_delete" eval="True"/>
|
|
<field name="report_template" ref="sale.report_sale_order"/>
|
|
<field name="report_name">${(object.name or '').replace('/','_')}_${object.state == 'draft' and 'draft' or ''}</field>
|
|
<field name="lang">${object.partner_id.lang}</field>
|
|
<field name="body_html"><![CDATA[
|
|
<p>Dear ${object.partner_id.name}
|
|
% set access_action = object.get_access_action()
|
|
% set doc_name = 'quotation' if object.state in ('draft', 'sent') else 'order confirmation'
|
|
% set is_online = access_action and access_action['type'] == 'ir.actions.act_url'
|
|
% set access_name = is_online and object.template_id and 'Accept and pay %s online' % doc_name or 'View %s' % doc_name
|
|
% set access_url = is_online and access_action['url'] or object.get_signup_url()
|
|
|
|
% if object.partner_id.parent_id:
|
|
(<i>${object.partner_id.parent_id.name}</i>)
|
|
% endif
|
|
,</p>
|
|
<p>
|
|
Here is your ${doc_name} <strong>${object.name}</strong>
|
|
% if object.origin:
|
|
(with reference: ${object.origin} )
|
|
% endif
|
|
amounting in <strong>${object.amount_total} ${object.pricelist_id.currency_id.name}</strong>
|
|
from ${object.company_id.name}.
|
|
</p>
|
|
|
|
<br/><br/>
|
|
% if is_online:
|
|
<center>
|
|
<a href="${access_url}" style="background-color: #1abc9c; padding: 20px; text-decoration: none; color: #fff; border-radius: 5px; font-size: 16px;" class="o_default_snippet_text">${access_name}</a>
|
|
<br/><br/>
|
|
<span style="color:#888888">(or view attached PDF)</span>
|
|
</center>
|
|
<br/>
|
|
% endif
|
|
% if object.state in ('draft', 'sent'):
|
|
% if object.state == "pre" or object.state == "draft" or object.state == "sent" :
|
|
% if object.validity_date:
|
|
<p> Your quotation will expire on <strong>${object.validity_date}</strong>.</p>
|
|
% endif
|
|
% endif
|
|
<p>You can reply to this email if you have any questions.</p>
|
|
|
|
<p>Thank you,</p>
|
|
|
|
<p style="color:#eeeeee;">
|
|
% if object.user_id and object.user_id.signature:
|
|
${object.user_id.signature | safe}
|
|
% endif
|
|
</p>
|
|
]]></field>
|
|
</record>
|
|
</data>
|
|
</odoo>
|
|
|