Mail Template Substitute

mail_template_substitute
REPOSITORY
REPOSITORYOCA/mail
GIT
GIThttps://github.com/OCA/mail.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/mail/tree/18.0/mail_template_substitute
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), ACSONE SA/NV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), ACSONE SA/NV
COMMITTERS
COMMITTERSOCA-git-bot, oca-ci, eugenio
WEBSITE
WEBSITEhttps://github.com/OCA/mail
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:30:18
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - html_editor
    - account
    - onboarding
    - product
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module allows you to create substitution rules for mail templates.
A typical use case is to replace a standard template by alternative
templates when some conditions are met. For instance, it allows to
configure alternate templates for different companies.

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
email_template_form mail.template.form (in mail_template_substitute) mail.template xpath Inherits mail.email_template_form
Models touched (4)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

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

New fields (1)
  • mail_template_substitution_rule_ids One2many → mail.template.substitution.rule
    comodel_name='mail.template.substitution.rule' inverse_name='mail_template_id' string='Substitution Rules'
Public methods (0)

No public methods.

New fields (5)
  • domain Char
    default='[]' required=True
  • mail_template_id Many2one → mail.template
    comodel_name='mail.template' ondelete='cascade' required=True
  • model Char
    related='mail_template_id.model_id.model' store=True
  • sequence Integer
    default=10
  • substitution_mail_template_id Many2one → mail.template
    comodel_name='mail.template' domain="[('model', '=', model)]" ondelete='cascade' required=True
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/social
GIT
GIThttps://github.com/OCA/social.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/social/tree/17.0/mail_template_substitute
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), ACSONE SA/NV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), ACSONE SA/NV
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, oca-ci, Sakthivel
WEBSITE
WEBSITEhttps://github.com/OCA/social
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:20:08
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module allows you to create substitution rules for mail templates.
A typical use case is to replace a standard template by alternative
templates when some conditions are met. For instance, it allows to
configure alternate templates for different companies.

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
email_template_form mail.template.form (in mail_template_substitute) mail.template xpath Inherits mail.email_template_form
Models touched (3)

New fields (0)

No new fields.

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

New fields (1)
  • mail_template_substitution_rule_ids One2many → mail.template.substitution.rule
    comodel_name='mail.template.substitution.rule' inverse_name='mail_template_id' string='Substitution Rules'
Public methods (0)

No public methods.

New fields (5)
  • domain Char
    default='[]' required=True
  • mail_template_id Many2one → mail.template
    comodel_name='mail.template' ondelete='cascade' required=True
  • model Char
    related='mail_template_id.model_id.model' store=True
  • sequence Integer
    default=10
  • substitution_mail_template_id Many2one → mail.template
    comodel_name='mail.template' domain="[('model', '=', model)]" ondelete='cascade' required=True
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/social
GIT
GIThttps://github.com/OCA/social.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/social/tree/16.0/mail_template_substitute
VERSION
VERSION 1.0.1
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), ACSONE SA/NV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), ACSONE SA/NV
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, oca-ci, DoDo, Karthik, Sodexis
WEBSITE
WEBSITEhttps://github.com/OCA/social
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:53:54
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/reporting-engine:
    - report_substitute
odoo/odoo:
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
email_template_form mail.template.form (in mail_template_substitute) mail.template xpath Inherits mail.email_template_form
Models touched (3)

New fields (0)

No new fields.

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

New fields (1)
  • mail_template_substitution_rule_ids One2many → mail.template.substitution.rule
    comodel_name='mail.template.substitution.rule' inverse_name='mail_template_id' string='Substitution Rules'
Public methods (0)

No public methods.

New fields (5)
  • domain Char
    default='[]' required=True
  • mail_template_id Many2one → mail.template
    comodel_name='mail.template' ondelete='cascade' required=True
  • model Char
    related='mail_template_id.model_id.model' store=True
  • sequence Integer
    default=10
  • substitution_mail_template_id Many2one → mail.template
    comodel_name='mail.template' domain="[('model', '=', model)]" ondelete='cascade' required=True
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/social
GIT
GIThttps://github.com/OCA/social.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/social/tree/12.0/mail_template_substitute
VERSION
VERSION 1.0.1
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), ACSONE SA/NV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), ACSONE SA/NV
COMMITTERS
COMMITTERSsbejaoui, oca-travis, OCA-git-bot
WEBSITE
WEBSITEhttps://github.com/OCA/social
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:29:23
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/reporting-engine:
    - report_substitute
odoo/odoo:
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
email_template_form mail.template.form (in mail_template_substitute) mail.template xpath Inherits mail.email_template_form
Models touched (3)

New fields (0)

No new fields.

Public methods (2)
  • default_get(self, fields)
    @api.model
  • onchange_template_id_wrapper(self)
    @api.multi@api.onchange('template_id')

New fields (1)
  • mail_template_substitution_rule_ids One2many → mail.template.substitution.rule
    comodel_name='mail.template.substitution.rule' inverse_name='mail_template_id' string='Substitution Rules'
Public methods (1)
  • get_email_template(self, res_ids)
    @api.multi

New fields (5)
  • domain Char
    default='[]' required=True string='Domain'
  • mail_template_id Many2one → mail.template
    comodel_name='mail.template' ondelete='cascade' required=True
  • model Char
    related='mail_template_id.model_id.model' store=True
  • sequence Integer
    default=10
  • substitution_mail_template_id Many2one → mail.template
    comodel_name='mail.template' domain="[('model', '=', model)]" ondelete='cascade' required=True
Public methods (0)

No public methods.

STATUS
STATUSOpen migration PR - not merged yet for this version
REPOSITORY
REPOSITORYOCA/mail
PULL REQUEST
PULL REQUEST[19.0][MIG] mail_template_substitute: Migration to 19.0 (#171)