[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
This commit is contained in:
Thibault Delavallée
2023-01-17 20:58:40 +01:00
parent fbcc1bf4c0
commit 28b4ba4049
17 changed files with 149 additions and 112 deletions
@@ -33,6 +33,17 @@
</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>