---
title: "template (Odoo)"
description: "itgen_odoo_template"
language: en
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/en/datamodels/odoo/Odoo.mail.template
original: https://documentation.invantive.eu/en/datamodels/odoo/Odoo.mail.template
updated: 2023-03-01T15:29:04Z
license: https://documentation.invantive.eu/en/
---

# template: Odoo itgen_odoo_template

`read only` `per partition`

- Catalog: `Odoo`
- Schema: `mail`
- Label: itgen_odoo_template

Email Templates

Can only retrieve data.

## Summary

Mixin that overrides the create and write methods to properly generate
        ir.model.data entries flagged with Studio for the corresponding resources.
        Doesn't create an ir.model.data if the record is part of a module being
        currently installed as the ir.model.data will be created automatically
        afterwards.

## Table Columns

The columns of the table `template` are shown below. Each column has an SQL data type. A new non-null value must be provided for every required column at all times during insert and update.

| Name | Data Type | Label | Required | Marks | Documentation |
|---|---|---|:---:|---|---|
| `active` | `boolean` | Active | [ ] |  |  |
| `attachment_ids` | `varchar2` |  | [ ] |  | You may attach files to this template, to be added to all emails created from this template |
| `auto_delete` | `boolean` | Auto Delete | [ ] |  | This option permanently removes any track of email after it's been sent, including from the Technical menu in the Settings, in order to preserve storage space of your Odoo database. |
| `body_html` | `varchar2` | Body | [ ] |  |  |
| `can_write` | `boolean` | Can Write | [ ] |  | The current user can edit the template. |
| `create_date` | `datetime` | Created on | [ ] |  |  |
| `create_uid` | `varchar2` |  | [ ] |  |  |
| `create_uid_label` | `varchar2` |  | [ ] |  |  |
| `description` | `varchar2` | Template description | [ ] |  | This field is used for internal description of the template's usage. |
| `display_name` | `varchar2` | Display Name | [ ] |  |  |
| `email_cc` | `varchar2` | Cc | [ ] |  | Carbon copy recipients (placeholders may be used here) |
| `email_from` | `varchar2` | From | [ ] |  | Sender address (placeholders may be used here). If not set, the default value will be the author's email alias if configured, or email address. |
| `email_to` | `varchar2` | To (Emails) | [ ] |  | Comma-separated recipient addresses (placeholders may be used here) |
| `id` | `int32` | ID | [ ] |  |  |
| `lang` | `varchar2` | Language | [ ] |  | Optional translation language (ISO code) to select when sending out an email. If not set, the english version will be used. This should usually be a placeholder expression that provides the appropriate language, e.g. {{ object.partner_id.lang }}. |
| `mail_server_id` | `varchar2` |  | [ ] |  | Optional preferred server for outgoing mails. If not set, the highest priority one will be used. |
| `mail_server_id_label` | `varchar2` |  | [ ] |  | Optional preferred server for outgoing mails. If not set, the highest priority one will be used. |
| `model` | `varchar2` | Related Document Model | [ ] |  |  |
| `model_id` | `varchar2` |  | [ ] |  |  |
| `model_id_label` | `varchar2` |  | [ ] |  |  |
| `name` | `varchar2` | Name | [ ] |  |  |
| `partner_to` | `varchar2` | To (Partners) | [ ] |  | Comma-separated ids of recipient partners (placeholders may be used here) |
| `ref_ir_act_window` | `varchar2` |  | [ ] |  | Sidebar action to make this template available on records of the related document model |
| `ref_ir_act_window_label` | `varchar2` |  | [ ] |  | Sidebar action to make this template available on records of the related document model |
| `render_model` | `varchar2` | Rendering Model | [ ] |  |  |
| `reply_to` | `varchar2` | Reply To | [ ] |  | Email address to which replies will be redirected when sending emails in mass; only used when the reply is not logged in the original discussion thread. |
| `report_name` | `varchar2` | Report Filename | [ ] |  | Name to use for the generated report file (may contain placeholders) The extension can be omitted and will then come from the report type. |
| `report_template` | `varchar2` |  | [ ] |  |  |
| `report_template_label` | `varchar2` |  | [ ] |  |  |
| `scheduled_date` | `varchar2` | Scheduled Date | [ ] |  | If set, the queue manager will send the email after the date. If not set, the email will be send as soon as possible. You can use dynamic expression. |
| `subject` | `varchar2` | Subject | [ ] |  | Subject (placeholders may be used here) |
| `template_category` | `varchar2` | Template Category | [ ] |  |  |
| `template_fs` | `varchar2` | Template Filename | [ ] |  | File from where the template originates. Used to reset broken template. |
| `use_default_to` | `boolean` | Default recipients | [ ] |  | Default recipients of the record: - partner (using id on a partner or the partner_id field) OR - email (using email_from or email field) |
| `write_date` | `datetime` | Last Updated on | [ ] |  |  |
| `write_uid` | `varchar2` |  | [ ] |  |  |
| `write_uid_label` | `varchar2` |  | [ ] |  |  |



## Release Notes

What changed per release in the tables, columns, attributes and capabilities of the driver:

- [Odoo](/en/release-notes/drivers?driver=odoo)

