Odoo 19.0 Community · Persistent

fetchmail.server: fields, relations and API

The fetchmail.server model ("Incoming Mail Server") is a persistent model declared by the Discuss module, then extended by 2 other modules. It exposes 34 fields, 20 of them declared directly on the model; 1 field from other models points to it. Below you will find every field with its technical name, type, label and relations, followed by an Odoo 19 JSON-2 API call.

Model identity

Technical name
fetchmail.server
Label
Incoming Mail Server
Type
Persistent (models.Model)
SQL table
fetchmail_server
Origin module
Discuss (mail)
Extended by
google_gmail, microsoft_outlook
Default order (_order)
priority
Inherits from (mixins)
google.gmail.mixinmicrosoft.outlook.mixin

Model fields

20 own fields, 8 inherited from mixins and 6 automatic ORM fields. Click a name to get a direct link to that field.

34 of 34 fields shown

Technical nameLabelTypeDetails
activeActiveboolean
attachKeep Attachments

Whether attachments should be downloaded. If not enabled, incoming emails will be stripped of any attachments before being processed

boolean
configurationConfigurationtext
read-only
dateLast Fetch Datedatetime
read-only
error_dateLast Error Date

Date of last failure, reset on success.

datetime
read-only
error_messageLast Error Messagetext
read-only
is_sslSSL/TLS

Connections are encrypted with SSL/TLS through a dedicated port (default: IMAPS=993, POP3S=995)

boolean
message_idsMessagesone2many
read-only

inverse: fetchmail_server_id

nameNamechar
required
object_idCreate a New Record

Process each incoming mail as part of a conversation corresponding to this document type. This will create new documents for new conversations, or attach follow-up emails to the existing conversations (documents).

many2one
originalKeep Original

Whether a full original copy of each email should be kept for reference and attached to each processed message. This will usually double the size of your message database.

boolean
passwordPasswordchar
portPortinteger
priorityServer Priority

Defines the order of processing, lower values mean higher priority

integer
scriptScriptchar
read-only
serverServer Name

Hostname or IP of the mail server

char
server_typeServer Typeselection
required

Values: imap (IMAP Server), pop (POP Server), local (Local Server)

server_type_infoServer Type Infotext
computed
stateStatusselection
read-only

Values: draft (Not Confirmed), done (Confirmed)

userUsernamechar
google_gmail_access_tokenAccess Tokenchar

inherited from google.gmail.mixin

google_gmail_access_token_expirationAccess Token Expiration Timestampinteger

inherited from google.gmail.mixin

google_gmail_refresh_tokenRefresh Tokenchar

inherited from google.gmail.mixin

google_gmail_uriURI

The URL to generate the authorization code from Google

char
computed

inherited from google.gmail.mixin

microsoft_outlook_access_tokenOutlook Access Tokenchar

inherited from microsoft.outlook.mixin

microsoft_outlook_access_token_expirationOutlook Access Token Expiration Timestampinteger

inherited from microsoft.outlook.mixin

microsoft_outlook_refresh_tokenOutlook Refresh Tokenchar

inherited from microsoft.outlook.mixin

microsoft_outlook_uriAuthentication URI

The URL to generate the authorization code from Outlook

char
computed

inherited from microsoft.outlook.mixin

create_dateCreated ondatetime
read-onlyautomatic
create_uidCreated bymany2one
read-onlyautomatic
display_nameDisplay Namechar
read-onlycomputedautomatic
idIDinteger
read-onlyautomatic
write_dateLast Updated ondatetime
read-onlyautomatic
write_uidLast Updated bymany2one
read-onlyautomatic

Relations

Models linked from this model

Fields of other models pointing here

Reading this model through the API

Odoo 19 JSON-2 API call reading the first five records with real fields of the model. Replace the instance, database and API key with your own.

curl
curl -X POST "https://your-instance.odoo.com/json/2/fetchmail.server/search_read" \
  -H "Authorization: bearer $ODOO_API_KEY" \
  -H "X-Odoo-Database: your-db" \
  -H "Content-Type: application/json" \
  -d '{"domain":[],"fields":["name","server_type","state","object_id","active"],"limit":5}'
Python (requests)
import requests

BASE_URL = "https://your-instance.odoo.com/json/2"
headers = {"Authorization": f"bearer {API_KEY}", "X-Odoo-Database": "your-db"}

res = requests.post(
    f"{BASE_URL}/fetchmail.server/search_read",
    headers=headers,
    json={"domain": [], "fields": ["name","server_type","state","object_id","active"], "limit": 5},
)
res.raise_for_status()
print(res.json())
  • External API access requires Odoo's Custom plan.
  • XML-RPC and JSON-RPC will be removed in Odoo 22 (fall 2028): use JSON-2.
  • The access rights and record rules of the key's user apply.

Cite this tool

Writing a tutorial, internal documentation or a forum answer? Copy this link to send your readers to the up-to-date reference.

<a href="https://aidoo.ai/en/outils/explorateur-modeles-odoo/fetchmail-server">fetchmail.server (Odoo 19.0)</a>

Sources

Data verified on September 23, 2026 · Odoo 19.0 Community

Have an Odoo project, or want to put your ERP to work with AI? Let's talk

Implementation, custom module development, connecting Claude or ChatGPT to your data: tell us about your context and we will reply within 24 business hours.