Odoo 19.0 Community · Persistent

res.country: fields, relations and API

The res.country model ("Country") is a persistent model declared by the Base module, then extended by 5 other modules. It exposes 24 fields, 18 of them declared directly on the model; 68 fields from other models point 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
res.country
Label
Country
Type
Persistent (models.Model)
SQL table
res_country
Origin module
Base (base)
Extended by
payment, base_address_extended, base_vat, point_of_sale, pos_self_order
Default order (_order)
name, id
Inherits from (mixins)
pos.load.mixin

Model fields

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

24 of 24 fields shown

Technical nameLabelTypeDetails
address_formatLayout in Reports

Display format to use for addresses belonging to this country. You can use python-style string pattern with all the fields of the address (for example, use '%(street)s' to display the field 'street') plus %(state_name)s: the name of the state %(state_code)s: the code of the state %(country_name)s: the name of the country %(country_code)s: the code of the country

text
address_view_idInput View

Use this field if you want to replace the usual way to encode a complete address. Note that the address_format field is used to modify the way to display addresses (in reports for example), while this field is used to modify the input form for addresses.

many2one
codeCountry Code

The ISO country code in two chars. You can use this field for quick search.

char
required
country_group_codesCountry Group Codesjson
computed
country_group_idsCountry Groupsmany2many
currency_idCurrencymany2one
enforce_citiesEnforce Cities

Check this box to ensure every address created in that country has a 'City' chosen in the list of the country's cities.

boolean

added by Extended Addresses (base_address_extended)

has_foreign_fiscal_positionHas Foreign Fiscal Positionboolean
computed

added by VAT Number Validation (base_vat)

image_urlFlag

Url of static flag image

char
computed
is_mercado_pago_supported_countryIs Mercado Pago Supported Countryboolean
computed

added by Payment Engine (payment)

is_stripe_supported_countryIs Stripe Supported Countryboolean
computed

added by Payment Engine (payment)

nameCountry Namechar
requiredtranslatable
name_positionCustomer Name Position

Determines where the customer/company name should be placed, i.e. after or before the address.

selection

Values: before (Before Address), after (After Address)

phone_codeCountry Calling Codeinteger
state_idsStatesone2many

inverse: country_id

state_requiredState Requiredboolean
vat_labelVat Label

Use this field if you want to change vat label.

char
translatable
zip_requiredZip Requiredboolean
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/res.country/search_read" \
  -H "Authorization: bearer $ODOO_API_KEY" \
  -H "X-Odoo-Database: your-db" \
  -H "Content-Type: application/json" \
  -d '{"domain":[],"fields":["name","code","address_view_id","currency_id","address_format"],"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}/res.country/search_read",
    headers=headers,
    json={"domain": [], "fields": ["name","code","address_view_id","currency_id","address_format"], "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/res-country">res.country (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.