Files
odoo_source/addons/test_mail/data/mail_template_data.xml
T
David Beguin 0ea27f430c [IMP] mail: add message_log with view helper
This commit allows to log a note and bypass notification process using a
template. The method _message_log_with_view has been added. This method
render the template using the given view and values (in kwargs) to make the
body before calling _message_log().

This process is done by the intermediary method _message_compose_with_view that
is now common to message_post_with_view and _message_log_with_view has it
follows the same template preparation process.

Task ID: 2459416
Linked ENT PR: odoo/enterprise#17553
2021-06-01 13:34:54 +00:00

41 lines
1.6 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="mail_test_ticket_tracking_tpl" model="mail.template">
<field name="name">Mail Test Full: Tracking Template</field>
<field name="subject">Test Template</field>
<field name="partner_to">${object.customer_id.id | safe}</field>
<field name="body_html" type="html"><p>Hello ${object.name}</p></field>
<field name="model_id" ref="test_mail.model_mail_test_ticket"/>
<field name="auto_delete" eval="True"/>
</record>
<record id="mail_test_container_tpl" model="mail.template">
<field name="name">Mail Test: Template</field>
<field name="subject">Post on ${object.name}</field>
<field name="partner_to">${object.customer_id.id}</field>
<field name="body_html" type="html"><p>Adding stuff on ${object.name}</p></field>
<field name="model_id" ref="test_mail.model_mail_test_container"/>
<field name="auto_delete" eval="True"/>
</record>
<template id="mail_test_ticket_tracking_view">
<p><span t-esc="object.name"/> datetime has been updated to <span t-esc="object.datetime"/></p>
</template>
<template id="mail_test_ticket_test_template">
<t t-call="web.html_container">
<t t-set="o" t-value="res_company"/>
<t t-call="web.external_layout">
<div class="page">
<p>This is a sample of an external report.</p>
</div>
</t>
</t>
</template>
<template id="mail_template_simple_test">
<p>Hello <t t-esc="partner.name"/>,</p>
</template>
</odoo>