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 name | Label | Type | Details |
|---|---|---|---|
| address_format | Layout 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_id | Input 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 | |
| code | Country Code The ISO country code in two chars. You can use this field for quick search. | char | required |
| country_group_codes | Country Group Codes | json | computed |
| country_group_ids | Country Groups | many2many | |
| currency_id | Currency | many2one | |
| enforce_cities | Enforce 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 ( |
| has_foreign_fiscal_position | Has Foreign Fiscal Position | boolean | computed added by VAT Number Validation ( |
| image_url | Flag Url of static flag image | char | computed |
| is_mercado_pago_supported_country | Is Mercado Pago Supported Country | boolean | computed added by Payment Engine ( |
| is_stripe_supported_country | Is Stripe Supported Country | boolean | computed added by Payment Engine ( |
| name | Country Name | char | requiredtranslatable |
| name_position | Customer Name Position Determines where the customer/company name should be placed, i.e. after or before the address. | selection | Values: |
| phone_code | Country Calling Code | integer | |
| state_ids | States | one2many | inverse: |
| state_required | State Required | boolean | |
| vat_label | Vat Label Use this field if you want to change vat label. | char | translatable |
| zip_required | Zip Required | boolean | |
| create_date | Created on | datetime | read-onlyautomatic |
| create_uid | Created by | many2one | read-onlyautomatic |
| display_name | Display Name | char | read-onlycomputedautomatic |
| id | ID | integer | read-onlyautomatic |
| write_date | Last Updated on | datetime | read-onlyautomatic |
| write_uid | Last Updated by | many2one | read-onlyautomatic |
Relations
Models linked from this model
- ir.ui.view: address_view_id
- res.country.group: country_group_ids
- res.country.state: state_ids
- res.currency: currency_id
Fields of other models pointing here
- account.account.tag: country_id
- account.fiscal.position: company_country_id, country_id
- account.invoice.report: country_id
- account.move: tax_country_id
- account.move.line: commercial_partner_country
- account.report: country_id
- account.report.external.value: report_country_id
- account.tax: country_id
- account.tax.group: country_id
- base.document.layout: country_id
- crm.activity.report: country_id
- crm.iap.lead.mining.request: country_ids
- crm.lead: country_id
- crm.partner.report.assign: country_id
- crm.reveal.rule: country_ids
- delivery.carrier: country_ids
- discuss.channel: country_id
- event.event: country_id
- event.sponsor: country_id
- fleet.vehicle: country_id
- hr.attendance.overtime.ruleset: country_id
- hr.contract.type: country_id
- hr.departure.reason: country_id
- hr.employee: company_country_id, country_of_birth
- hr.leave.type: country_id
- hr.payroll.structure.type: country_id
- hr.version: company_country_id, country_id, private_country_id
- hr.work.entry: country_id
- hr.work.entry.type: country_id
- im_livechat.channel.member.history: session_country_id
- im_livechat.channel.rule: country_ids
- im_livechat.report.channel: country_id
- ir.module.module: country_ids
- link.tracker.click: country_id
- lunch.supplier: country_id
- mail.guest: country_id
- mailing.contact: country_id
- payment.method: supported_country_ids
- payment.provider: available_country_ids, mercado_pago_account_country_id, paymob_account_country_id
- payment.transaction: partner_country_id
- and 19 more
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 -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}'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.