TIP: You can type at any time to perform a new search.

Security findings

Repository
OCA/mail · module folder · Try on Runboat
Module version
1.0.0
Category
Marketing
Folder size
0.06 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/mail
Last tracking update
2026-08-07 08:42:57
Authors
Camptocamp, Odoo Community Association (OCA)
Maintainers
Camptocamp, Odoo Community Association (OCA)
Committers
Aungkokolin1997, OCA-git-bot, oca-ci
Odoo dependencies
odoo/odoo:
- web
- bus
Python dependencies
None
System dependencies
None
Required by
None
Description
Odoo will add a default email layout on most commercial communications.

The email layout is a ``QWeb`` view that ends up wrapping the message body
when sending an email. It usually displays the related document reference,
the company logo, and a small footer saying "Powered by Odoo".

There are notably three main layouts used in Odoo, and the user can't control when
they're used, as it's hardcoded into the different applications.

* ``mail.mail_notification_layout``
* ``mail.mail_notification_layout_with_responsible_signature``
* ``mail.mail_notification_light``

This module allows to force a specific layout for a given ``email.template``,
effectively overwriting the one hardcoded by Odoo. Additionally, it enables
forcing a custom layout for emails that do not use an existing ``email.template``
record (e.g., when sending an email from the chatter).

This allows you to fully customize the way Odoo emails are rendered and sent
to your customers.

Code Analysis info_outline

Views touched (4)
XML IDNameModelTypeStatus
email_template_form mail.template form Inherits mail.email_template_form
mail_layout_custom mail_layout_custom ir.ui.view qweb New
mail_layout_noop Mail: No-Layout notification template ir.ui.view qweb New
view_ir_ui_view_form_inherit ir.ui.view.form.inherit ir.ui.view form Inherits base.view_view_form
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (5)

New fields (3)
  • layout_id Many2one → ir.ui.view
    ondelete='cascade' args: 'ir.ui.view'
  • model_ids Many2many → ir.model
    help='Select models that the swapping applies to.' string='Models' args: 'ir.model'
  • substitute_layout_id Many2one → ir.ui.view
    domain=[('type', '=', 'qweb')] help='Select a target layout.' required=True args: 'ir.ui.view'
Public methods (0)

No public methods.

New fields (1)
  • layout_mapping_line_ids One2many → email.layout.mapping
    args: 'email.layout.mapping', 'layout_id'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • default_get(self, fields_list)
    @api.model

New fields (1)
  • force_email_layout_id Many2one → ir.ui.view
    comodel_name='ir.ui.view' compute='_compute_force_email_layout_id' domain=[('type', '=', 'qweb'), ('mode', '=', 'primary')] help='Force a mail layout for this template.' inverse='_inverse_force_email_layout_id' string='Force Layout'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

Loading…

Loading…

Loading…

Loading…

Status
Open migration PR — not merged yet for this version
CI status
green — ready to merge
Open since
17 days ago
Last activity
17 days ago
Repository
OCA/mail
Pull request
[19.0][MIG] mail_layout_force: Migration to 19.0 (#270)