OdooWiki OCA HUB

Mail Preview

mail_layout_preview folder_open OCA/mail open_in_new
Uncategorised License: AGPL-3

The purpose of this module is to help development of email templates allowing to render the full layout preview of each of them.

Odoo already allows you do preview emails but they are wrapped into Odoo backend theme.

NOTE: to make work properly your emails it's strongly recommended to use mail_inline_css to include all styles in the body of the email.

auto_awesome What this module does

AI-generated from the code · Odoo 18.0

Preview email templates in the browser without the Odoo backend theme, so you see exactly what recipients will get. A new link in the email template preview window opens the full layout preview.

This module helps you check how an email template will really look before sending it. Odoo already lets you preview emails, but the preview is wrapped in the Odoo backend theme, which hides the true appearance. With this module you get a clean browser preview of the rendered email body.

Where it appears: - In the email template preview window (the wizard used to test a template), a new field "Full layout preview" shows a clickable link. - Opening that link shows the email exactly as it will be sent, without the Odoo interface around it. - There is also a page that lists all email templates for a given model, with links to preview each one and to open it in the backend.

What it adds: - A computed link is built from the selected model, template and record, and displayed in the preview wizard. - The preview page renders the template for a specific record, so you can verify the real content and layout. - The list page shows template names, their technical identifiers and direct preview links.

It touches the mail.template.preview wizard and the mail.template model, and adds web pages under the /email-preview/ address. It depends on the standard Mail app.

Depends on

mail
Models and fields (1)
  • mail.template.preview · extends an existing modellayout_preview_url (Full layout preview)

Text generated by AI (DeepSeek) from reading the Odoo 18.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: 6 confirmed, 3 with no information of 9 versions.

terminal Installation and usage

OCA documentation · Odoo 18.0
  • Go to a template and click on the preview button
  • Select desired params and click on "Full layout preview" link
  • You'll get to the preview

As a developer, you can see a list of all templates for a model by going to:

> /email-preview/\$model.name

You'll get a list of all the templates. Follow the instructions there on how to use the links.

No verified information in OCA: Installation, Configuration.

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.