OdooWiki OCA HUB

Mail template multi attachment

mail_template_multi_attachment folder_open OCA/social open_in_new
Uncategorised License: AGPL-3

This module add possibility to generate more than one attachment into your email template.

auto_awesome What this module does

AI-generated from the code · Odoo 16.0

Lets you attach several different reports to a single email template, so one email can carry multiple PDF or HTML documents generated automatically for each recipient.

This module extends the standard email templates in Odoo so that a single template can produce more than one attachment.

On the email template form you get a new "Attachments" tab. It keeps the usual single report fields under "Simple attachment" and adds a "Multi attachments" list where you can add as many report lines as you want. Each line lets you pick a report and, optionally, give it a custom file name; the report list is filtered to reports that match the model of the template.

When the email is generated, the module renders every report listed in that multi-attachment list for each recipient and adds the resulting files to the email attachments. PDF and HTML reports are supported; other report types raise a user error. If no custom file name is given, the report's own print name is used, and the correct file extension is added automatically.

Access rights are provided for system users and regular users (regular users cannot delete attachment lines). The module touches the mail.template model and adds a new mail.template.report model used to store each report line.

Depends on

mail
Models and fields (2)
  • mail.template · extends an existing modeltemplate_report_ids
  • mail.template.report · new modelmodel, report_name, mail_template_id (Mail template), report_template_id (Report)

Text generated by AI (DeepSeek) from reading the Odoo 16.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 3 confirmed, 6 with no information of 9 versions.

terminal Installation and usage

OCA documentation · Odoo 16.0

Just go on an email template and set attachments into "Attachments" tab.

You can fill the "Simple attachment" if you need only 1 document (like Odoo standard). You can also fill "Multi attachments" section if you need to add more document generation.

You can fill only "Multi attachments" section and let empty "Simple attachment" if you want.

You just have to use your email template like usual. New attachments will be generated automatically with the email content.

No verified information in OCA: Installation.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.