Files
odoo_source/addons/test_mail/data/mail_template_data.xml
T
Thibault Delavallée 28b4ba4049 [IMP] mail, various: allow to link multiple reports to templates
RATIONALE

Improve usage of composer in comment or email mode: support batch-posting in
comment, support more configuration from templates, improve global model.

SPECIFICATIONS

Update report_template field on template model to be a many2many field instead
of a many2one. It allows to attach multiple dynamic reports to a given template
instead of being limited to a single one.

Name should now come from the report itself, which should be considered as
complete by itself. Template cannot override report naming anymore.

Task-2868153 (Mail: Allow multi reports in mail templates)

Part-of: odoo/odoo#99482
2023-01-17 20:58:40 +01:00

52 lines
2.1 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 }}</field>
<field name="body_html" type="html"><p>Hello <t t-out="object.name or ''"></t></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 <t t-out="object.name or ''"></t></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-out="object.name or ''"/> datetime has been updated to <span t-out="object.datetime or ''"/></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_test_ticket_test_template_2">
<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 another sample of an external report.</p>
</div>
</t>
</t>
</template>
<template id="mail_template_simple_test">
<p>Hello <t t-out="partner.name"/>, this comes from <t t-out="object.name"/>.</p>
</template>
</odoo>