Files
odoo_source/addons/purchase/data/mail_template_data.xml
T
Thibault Delavallée 7fe9d58b0d [IMP] invoice, sale, purchase: template update
Templates used to send invoice / quotation / PO by email are cleaned. Custom
style is removed. Content is simplified.

For sale, only one template is kept through the various addons. Previously to
this commit there are 3 templates: standard, portal and online quote. Those
template are similar except the link to get the sale order. Now the base template
contains some logic that should be sufficient to cover all cases. This breaks
the modular approach but is easier to use for users. As templates are still mako
it is not possible to use inheritance. So having a base template knowing some bits
of overriding modules is necessary if we want to avoid having the same template
duplicated.
2015-11-02 11:51:09 +01:00

78 lines
3.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<!--Email template -->
<record id="email_template_edi_purchase" model="mail.template">
<field name="name">RFQ - Send by Email</field>
<field name="email_from">${(object.create_uid.email or '')|safe}</field>
<field name="subject">${object.company_id.name|safe} Order (Ref ${object.name or 'n/a' })</field>
<field name="partner_to">${object.partner_id.id}</field>
<field name="model_id" ref="purchase.model_purchase_order"/>
<field name="auto_delete" eval="True"/>
<field name="report_template" ref="report_purchase_quotation"/>
<field name="report_name">RFQ_${(object.name or '').replace('/','_')}</field>
<field name="lang">${object.partner_id.lang}</field>
<field name="body_html"><![CDATA[
<p>Dear
% if object.partner_id.company_type == 'company' and object.child_ids:
${object.partner_id.child_ids[0].name}
% else :
${object.partner_id.name}
% endif
,</p><p>
Here is a ${object.state in ('draft', 'sent') and 'request for quotation' or 'purchase order confirmation'} <strong>${object.name}</strong>
% if object.partner_ref:
with reference: ${object.partner_ref}
% endif
% if object.origin:
(RFQ origin: ${object.origin})
% endif
amounting <strong>${object.amount_total} ${object.currency_id.name}</strong>
from ${object.company_id.name}.
</p>
<p>If you have any question, do not hesitate to contact us.</p>
<p>Best regards,</p>
]]></field>
</record>
<!--Email template -->
<record id="email_template_edi_purchase_done" model="mail.template">
<field name="name">Purchase Order - Send by Email</field>
<field name="email_from">${object.create_uid.email or ''}</field>
<field name="subject">${object.company_id.name} Order (Ref ${object.name or 'n/a' })</field>
<field name="partner_to">${object.partner_id.id}</field>
<field name="model_id" ref="purchase.model_purchase_order"/>
<field name="auto_delete" eval="True"/>
<field name="report_template" ref="action_report_purchase_order"/>
<field name="report_name">PO_${(object.name or '').replace('/','_')}</field>
<field name="lang">${object.partner_id.lang}</field>
<field name="body_html"><![CDATA[
<p>Dear
% if object.partner_id.company_type == 'company' and object.child_ids:
${object.partner_id.child_ids[0].name}
% else :
${object.partner_id.name}
% endif
,</p><p>
Here is a ${object.state in ('draft', 'sent') and 'request for quotation' or 'purchase order confirmation'} <strong>${object.name}</strong>
% if object.partner_ref:
with reference: ${object.partner_ref}
% endif
% if object.origin:
(RFQ origin: ${object.origin})
% endif
amounting <strong>${object.amount_total} ${object.currency_id.name}</strong>
from ${object.company_id.name}.
</p>
<p>If you have any question, do not hesitate to contact us.</p>
<p>Best regards,</p>
]]></field>
</record>
</data>
</odoo>