An accounting localization module (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/odoo/documentation/llms.txt
Use this file to discover all available pages before exploring further.
l10n_XX) packages a country-specific Chart of Accounts, tax definitions, fiscal positions, and tax reports for Odoo’s accounting module. When the account module is installed, Odoo automatically installs the localization corresponding to the company’s country code. This guide walks through building a complete l10n_XX module.
Installation Behavior
Whenaccount is installed, Odoo’s post-install hook reads the company’s country code and installs the matching l10n_XX module. If no matching localization is found, l10n_generic_coa (US) is installed as the default.
For example: if the company’s country is Switzerland, l10n_ch is automatically installed.
Module Structure
A minimall10n_XX module follows this layout:
Manifest
Chart Template
Inmodels/template_xx.py, define the chart of accounts template with the country identifier:
Chart of Accounts
Account Tags
Tags allow grouping accounts for financial reports when code-based rules are insufficient. Define them indata/account_account_tag_data.xml.
Accounts
Accounts are defined indata/template/account.account-xx.csv. Each row represents one account:
Account Groups
Account groups define the hierarchical structure visible when expanding reports. They match accounts by code prefix range:Taxes
Tax Groups
Tax groups organize taxes in reports. Create one group per distinct tax rate (except 0%, which may need separate groups for exempt/0%/not-subject):Tax Definitions
Define taxes indata/template/account.tax-xx.csv. The first purchase/sale tax defined becomes the default for products:
Tax Report (Enterprise)
The tax report is an Enterprise feature (
account_accountant module). It is declared in account but only accessible when the full accounting module is installed.data/account_tax_report_data.xml with a root account.report record:
invoice_repartition_line_ids, refund_repartition_line_ids) link tax amounts to specific report lines via minus_report_line_ids and plus_report_line_ids.
Fiscal Positions
Fiscal positions map taxes and accounts when selling to specific customer categories (e.g., EU intra-community, export). The first fiscal position matching the company’s country is treated as the domestic position. Define indata/template/account.fiscal.position-xx.csv:
Final Steps: Demo Company
Add a demo company so the localization can be tested in demo mode:Accounting Reports Module
Accounting reports are added in a separatel10n_XX_reports module that belongs to the enterprise repository. Basic manifest:
account.report and account.report.line records to define Balance Sheet, Profit & Loss, and other statutory reports.
Localization Module Checklist
Create the module skeleton
Set up
__manifest__.py, __init__.py, and the directory structure described above.Define the chart of accounts
Create
account.account-xx.csv with 200–300 accounts covering all standard account types.Create tax groups and taxes
Define tax groups first, then tax templates with proper repartition lines and report line links.
Define fiscal positions
Create fiscal positions for domestic, intra-EU, and export scenarios as applicable.