[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
+2 -4
View File
@@ -22,8 +22,7 @@
<t t-out="object.event_id.user_id.signature or ''">--<br/>Mitchell Admin</t>
</t>
</div></field>
<field name="report_template" ref="action_report_event_registration_foldable_badge"/>
<field name="report_name">Foldable Badge - {{ (object.event_id.name or 'Event').replace('/','_') }}</field>
<field name="report_template_ids" eval="[(4, ref('event.action_report_event_registration_foldable_badge'))]"/>
<field name="lang">{{ object.partner_id.lang }}</field>
<field name="auto_delete" eval="True"/>
</record>
@@ -254,8 +253,7 @@
</td></tr>
</table>
</field>
<field name="report_template" ref="action_report_event_registration_full_page_ticket"/>
<field name="report_name">Full Page Ticket - {{ (object.event_id.name or 'Event').replace('/','') }}</field>
<field name="report_template_ids" eval="[(4, ref('event.action_report_event_registration_full_page_ticket'))]"/>
<field name="lang">{{ object.partner_id.lang }}</field>
</record>