Accounting localization

Warning

This tutorial requires knowledge about how to build a module in Odoo (see Server framework 101).

Installation procedure

On installing the account module, the localization module corresponding to the country code of the company is installed automatically. In case of no country code set or no localization module found, the l10n_generic_coa (US) localization module is installed by default. Check post init hook for details.

For example, l10n_ch will be installed if the company has Switzerland as country.

Building a localization module

The structure of a basic l10n_XX module may be described with the following __manifest__.py file:

{
    "name": "COUNTRY - Accounting",
    "version": "1.0.0",
    "category": "Accounting/Localizations/Account Charts",
    "license": "LGPL-3",
    "depends": [
        "account",
    ],
    "data": [
        "data/other_data.xml",
        "views/xxxmodel_views.xml",
    ],
    "demo": [
        "demo/demo_company.xml",
    ]
}

Your worktree should look like this

l10n_xx
├── data
│   ├── template
│   │   ├── account.account-xx.csv
│   │   ├── account.group-xx.csv
│   │   └── account.tax.group-xx.csv
│   └── other_data.xml
├── views
│   └── xxxmodel_views.xml
├── demo
│   └── demo_company.xml
├── models
│   ├── template_xx.py
│   └── __init__.py
├── __init__.py
└── __manifest__.py

In the first file models/template_xx.py, we set the name for the chart of accounts along with some basic fields.

Example

addons/l10n_be/models/template_be.py

    def _get_be_template_data(self):
        return {
            'name': _('Base'),
            'visible': False,
            'code_digits': '6',
        }

    @template('be', 'res.company')
    def _get_be_res_company(self):
        return {
            self.env.company.id: {
                'account_fiscal_country_id': 'base.be',
                'bank_account_code_prefix': '550',
                'cash_account_code_prefix': '570',
                'transfer_account_code_prefix': '580',
                'account_default_pos_receivable_account_id': 'a4001',
                'income_currency_exchange_account_id': 'a754',
                'expense_currency_exchange_account_id': 'a654',
                'account_journal_suspense_account_id': 'a499',
                'account_journal_early_pay_discount_loss_account_id': 'a657000',
                'account_journal_early_pay_discount_gain_account_id': 'a757000',
                'account_sale_tax_id': 'attn_VAT-OUT-21-L',
                'account_purchase_tax_id': 'attn_VAT-IN-V81-21',
                'account_purchase_receipt_fiscal_position_id': 'fiscal_position_template_6',
                'default_cash_difference_income_account_id': 'a757100',
                'default_cash_difference_expense_account_id': 'a657100',
                'transfer_account_id': 'a58',
                'expense_account_id': 'a600',
                'income_account_id': 'a7000',
                'receivable_account_id': 'a400',
                'payable_account_id': 'a440',
                'downpayment_account_id': 'a46',
                'account_stock_valuation_id': 'a300',
            },
        }

    @template('be', 'account.journal')
    def _get_be_account_journal(self):
        return {
            'sale': {'refund_sequence': True},
            'purchase': {'refund_sequence': True},
        }

    @template('be', 'account.reconcile.model')

Chart of Accounts

Account tags

Tags are a way to sort accounts. For example, imagine you want to create a financial report having multiple lines but you have no way to find a rule to dispatch the accounts according to their code. The solution is the usage of tags, one for each report line, to filter accounts like you want.

Put the tags in the data/account_account_tag_data.xml file.

Example

addons/l10n_lt/data/template/account.account-lt.csv

"id","name","code","account_type","tag_ids","reconcile","non_trade","name@lt"
"account_account_template_1130","Software Acquisition Cost","1130","asset_non_current","l10n_lt.account_account_tag_a_1_3","False","","Programinės įrangos įsigijimo savikaina"
"account_account_template_1138","Amortization of Software Value (-)","1138","asset_non_current","l10n_lt.account_account_tag_a_1_3","False","","Programinės įrangos vertės amortizacija (−)"
"account_account_template_1200","Land Acquisition Cost","1200","asset_fixed","l10n_lt.account_account_tag_a_2_1","False","","Žemės įsigijimo savikaina"
"account_account_template_1201","Change of Land Value after Revaluation","1201","asset_fixed","l10n_lt.account_account_tag_a_2_1","False","","Žemės vertės pokytis dėl perkainojimo"

Accounts

Obviously, Chart of Accounts cannot exist without Accounts. You need to specify them in data/account.account.template.csv.

Example

addons/l10n_ch/data/template/account.account-ch.csv

"id","name","code","account_type","reconcile","non_trade","name@de","name@it","name@fr","description","tax_ids","description@de","description@it","description@fr","asset_model_ids"
"ch_coa_1400","Long-term securities","1400","asset_fixed","False","","Langfristige Wertpapiere","Titoli a lungo termine","Titres à long terme","Long-term physical assets used in business operations, such as equipment or property, subject to depreciation.","vat_O_exclude","Langfristige physische Vermögenswerte, die im Geschäftsbetrieb verwendet werden, wie z. B. Ausrüstung oder Eigentum, unterliegen der Abschreibung.","Beni materiali a lungo termine utilizzati nelle operazioni aziendali, come attrezzature o proprietà, soggetti ad ammortamento.","Actifs physiques à long terme utilisés dans les opérations commerciales, tels que l'équipement ou la propriété, sujets à amortissement.","asset_long_term_securities"
"ch_coa_1409","Accumulated depreciation on long-term securities","1409","asset_fixed","False","","Kumulierte Abschreibungen auf langfristige Wertpapiere","Rettifica valore titoli","Ajustement de la valeur des titres","Cumulative reduction in value of a fixed asset due to wear, age, or obsolescence, recorded over its useful life.","","Kumulative Wertminderung eines Anlagevermögens aufgrund von Verschleiß, Alter oder Veralterung, erfasst über seine Nutzungsdauer.","Riduzione cumulativa del valore di un'attività fissa dovuta a usura, età o obsolescenza, registrata durante la sua vita utile.","Réduction cumulative de la valeur d'un actif fixe due à l'usure, à l'âge ou à l'obsolescence, enregistrée sur sa durée de vie utile.",""
"ch_coa_1440","Loan (Asset)","1440","asset_fixed","False","","Darlehen (Vermögenswert)","Prestiti","Prêts","Amounts lent to third parties or subsidiaries, expected to be repaid over time with or without interest.","vat_O_exclude","An Dritte oder Tochtergesellschaften verliehene Beträge, deren Rückzahlung im Laufe der Zeit mit oder ohne Zinsen erwartet wird.","Importi prestati a terzi o società controllate, che si prevede saranno rimborsati nel tempo con o senza interessi.","Montants prêtés à des tiers ou à des filiales, dont le remboursement est prévu au fil du temps avec ou sans intérêts.","asset_loan"
"ch_coa_1441","Mortgages","1441","asset_fixed","False","","Hypotheken","Prestiti ipotecari","Hypothèques","Secured loans backed by real estate property, typically repaid in installments over a long-term period.","vat_O_exclude","Durch Immobilien abgesicherte Kredite, die normalerweise über einen längeren Zeitraum in Raten zurückgezahlt werden.","Prestiti garantiti da proprietà immobiliari, solitamente rimborsati a rate in un periodo di tempo a lungo termine.","Prêts garantis par des biens immobiliers, généralement remboursés par versements sur une longue période.","asset_mortgages"
"ch_coa_1449","Accumulated depreciation on long term receivables","1449","asset_fixed","False","","Kumulierte Abschreibungen auf langfristige Forderungen","Rettifica valore crediti a lungo termine","Ajustement de la valeur des créances à long terme","Cumulative reduction in value of a fixed asset due to wear, age, or obsolescence, recorded over its useful life.","","Kumulative Wertminderung eines Anlagevermögens aufgrund von Verschleiß, Alter oder Veralterung, erfasst über seine Nutzungsdauer.","Riduzione cumulativa del valore di un'attività fissa dovuta a usura, età o obsolescenza, registrata durante la sua vita utile.","Réduction cumulative de la valeur d'un actif fixe due à l'usure, à l'âge ou à l'obsolescence, enregistrée sur sa durée de vie utile.",""
"ch_coa_1480","Participations","1480","asset_fixed","False","","Beteiligungen","Partecipazioni","Participations","Equity investments held in other companies, often providing influence or control over business decisions.","vat_O_exclude","Kapitalbeteiligungen an anderen Unternehmen, die oft Einfluss auf oder Kontrolle über Geschäftsentscheidungen bieten.","Investimenti azionari detenuti in altre società, che spesso forniscono influenza o controllo sulle decisioni aziendali.","Investissements en actions détenus dans d’autres sociétés, fournissant souvent une influence ou un contrôle sur les décisions commerciales.","asset_participations"
"ch_coa_1489","Accumulated depreciation on participations","1489","asset_fixed","False","","Kumulierte Abschreibungen auf Beteiligungen","Rettifica valore partecipazioni","Ajustement de la valeur des participations","Cumulative reduction in value of a fixed asset due to wear, age, or obsolescence, recorded over its useful life.","","Kumulative Wertminderung eines Anlagevermögens aufgrund von Verschleiß, Alter oder Veralterung, erfasst über seine Nutzungsdauer.","Riduzione cumulativa del valore di un'attività fissa dovuta a usura, età o obsolescenza, registrata durante la sua vita utile.","Réduction cumulative de la valeur d'un actif fixe due à l'usure, à l'âge ou à l'obsolescence, enregistrée sur sa durée de vie utile.",""
"ch_coa_1500","Machinery","1500","asset_fixed","False","","Maschinen","Macchine e attrezzature","Machines et appareils","Industrial equipment used in production processes or service delivery, usually subject to depreciation.","vat_purchase_81_invest","Darlehen (Vermögenswert)","Attrezzature industriali utilizzate nei processi di produzione o nella fornitura di servizi, solitamente soggette ad ammortamento.","Équipement industriel utilisé dans les processus de production ou de prestation de services, généralement soumis à amortissement.","asset_machinery"
"ch_coa_1509","Accumulated depreciation on machinery","1509","asset_fixed","False","","Kumulierte Abschreibungen auf Maschinen","Ammortamenti su macchinari e attrezzature","Amortissements sur les machines et appareils","Cumulative reduction in value of a fixed asset due to wear, age, or obsolescence, recorded over its useful life.","","Kumulative Wertminderung eines Anlagevermögens aufgrund von Verschleiß, Alter oder Veralterung, erfasst über seine Nutzungsdauer.","Riduzione cumulativa del valore di un'attività fissa dovuta a usura, età o obsolescenza, registrata durante la sua vita utile.","Réduction cumulative de la valeur d'un actif fixe due à l'usure, à l'âge ou à l'obsolescence, enregistrée sur sa durée de vie utile.",""
"ch_coa_1510","Equipment","1510","asset_fixed","False","","Ausrüstung","Mobilio e installazioni","Mobilier et installations","Large expenses related to workplaces","vat_purchase_81_invest","Hohe Ausgaben im Zusammenhang mit Arbeitsplätzen","Grandi spese legate ai luoghi di lavoro","Dépenses importantes liées aux lieux de travail","asset_equipment"
"ch_coa_1519","Accumulated depreciation on equipment","1519","asset_fixed","False","","Kumulierte Abschreibungen auf Ausrüstungen","Ammortamenti su mobili e arredi","Amortissements sur le mobilier et les installations","Cumulative reduction in value of a fixed asset due to wear, age, or obsolescence, recorded over its useful life.","","Kumulative Wertminderung eines Anlagevermögens aufgrund von Verschleiß, Alter oder Veralterung, erfasst über seine Nutzungsdauer.","Riduzione cumulativa del valore di un'attività fissa dovuta a usura, età o obsolescenza, registrata durante la sua vita utile.","Réduction cumulative de la valeur d'un actif fixe due à l'usure, à l'âge ou à l'obsolescence, enregistrée sur sa durée de vie utile.",""
"ch_coa_1520","Office Equipment (including Information & Communication Technology)","1520","asset_fixed","False","","Büroausstattung (einschließlich Informations- und Kommunikationstechnologie)","Macchine ufficio, informatica e tecnologia della comunicazione","Machines de bureau, informatique, systèmes de communication","Technological products or services bought for your business","vat_purchase_81_invest","Für Ihr Unternehmen gekaufte technologische Produkte oder Dienstleistungen","Prodotti o servizi tecnologici acquistati per la tua attività","Produits ou services technologiques achetés pour votre entreprise","asset_technology"
"ch_coa_1529","Accumulated depreciation on office equipment (incl. ICT)","1529","asset_fixed","False","","Kumulierte Abschreibungen auf Büroausstattung (einschließlich ICT)","Ammortamenti su macchine da ufficio, inf. e sistemi di comunicazione","Amortissements sur les machines de bureau, inf. et syst. comm.","Cumulative reduction in value of a fixed asset due to wear, age, or obsolescence, recorded over its useful life.","","Kumulative Wertminderung eines Anlagevermögens aufgrund von Verschleiß, Alter oder Veralterung, erfasst über seine Nutzungsdauer.","Riduzione cumulativa del valore di un'attività fissa dovuta a usura, età o obsolescenza, registrata durante la sua vita utile.","Réduction cumulative de la valeur d'un actif fixe due à l'usure, à l'âge ou à l'obsolescence, enregistrée sur sa durée de vie utile.",""
"ch_coa_1530","Vehicles","1530","asset_fixed","False","","Fahrzeuge","Veicoli","Véhicules","Purchase of a car, including second hand or after-lease contract","vat_purchase_81_invest","Kauf eines Autos, einschließlich Gebrauchtwagen oder Nachleasingvertrag","Acquisto di un'auto, anche di seconda mano o con contratto di leasing post-vendita","Achat d'une voiture, y compris d'occasion ou après contrat de location","asset_vehicule"
"ch_coa_1531","Vehicle accessories","1531","asset_fixed","False","","Fahrzeugzubehör","Accessori per veicoli","Accessoires pour véhicules","All accessories purchases related to your professional vehicle","vat_purchase_81_invest","Alle Zubehörkäufe rund um Ihr Berufsfahrzeug","Tutti gli acquisti di accessori relativi al tuo veicolo professionale","Tous les achats d'accessoires liés à votre véhicule professionnel","asset_vehicule_accessories"
"ch_coa_1539","Accumulated depreciation on vehicles","1539","asset_fixed","False","","Kumulierte Abschreibungen auf Fahrzeuge","Ammortamenti su veicoli","Amortissements sur les véhicules","Cumulative reduction in value of a fixed asset due to wear, age, or obsolescence, recorded over its useful life.","","Kumulative Wertminderung eines Anlagevermögens aufgrund von Verschleiß, Alter oder Veralterung, erfasst über seine Nutzungsdauer.","Riduzione cumulativa del valore di un'attività fissa dovuta a usura, età o obsolescenza, registrata durante la sua vita utile.","Réduction cumulative de la valeur d'un actif fixe due à l'usure, à l'âge ou à l'obsolescence, enregistrée sur sa durée de vie utile.",""
"ch_coa_1540","Tools","1540","asset_fixed","False","","Werkzeuge","Utensili e apparecchiature","Outillages et appareils","Machinery and tools directly related to your business","vat_purchase_81_invest","Maschinen und Werkzeuge, die in direktem Zusammenhang mit Ihrem Unternehmen stehen","Macchinari e strumenti direttamente correlati alla tua attività","Machines et outils directement liés à votre entreprise","asset_tools"
"ch_coa_1549","Accumulated depreciation on tools","1549","asset_fixed","False","","Kumulierte Abschreibungen auf Werkzeuge","Ammortamenti su utensili e attrezzature","Amortissements sur les outillages et appareils","Cumulative reduction in value of a fixed asset due to wear, age, or obsolescence, recorded over its useful life.","","Kumulative Wertminderung eines Anlagevermögens aufgrund von Verschleiß, Alter oder Veralterung, erfasst über seine Nutzungsdauer.","Riduzione cumulativa del valore di un'attività fissa dovuta a usura, età o obsolescenza, registrata durante la sua vita utile.","Réduction cumulative de la valeur d'un actif fixe due à l'usure, à l'âge ou à l'obsolescence, enregistrée sur sa durée de vie utile.",""
"ch_coa_1550","Warehouse","1550","asset_fixed","False","","Lager","Strutture per il deposito","Installations de stockage","Buildings or spaces used for storage of inventory, raw materials, or finished goods, forming part of fixed assets.","vat_purchase_81_invest","Gebäude oder Räume, die zur Lagerung von Vorräten, Rohstoffen oder Fertigwaren verwendet werden und Teil des Anlagevermögens sind.","Edifici o spazi utilizzati per lo stoccaggio di scorte, materie prime o prodotti finiti, facenti parte delle attività fisse.","Bâtiments ou espaces utilisés pour le stockage des stocks, des matières premières ou des produits finis, faisant partie des actifs fixes.","asset_warehouse"
"ch_coa_1559","Accumulated depreciation on warehouse","1559","asset_fixed","False","","Kumulierte Abschreibungen auf Lagerhäuser","Ammortamenti sui magazzini","Amortissements sur les installations de stockage","Cumulative reduction in value of a fixed asset due to wear, age, or obsolescence, recorded over its useful life.","","Kumulative Wertminderung eines Anlagevermögens aufgrund von Verschleiß, Alter oder Veralterung, erfasst über seine Nutzungsdauer.","Riduzione cumulativa del valore di un'attività fissa dovuta a usura, età o obsolescenza, registrata durante la sua vita utile.","Réduction cumulative de la valeur d'un actif fixe due à l'usure, à l'âge ou à l'obsolescence, enregistrée sur sa durée de vie utile.",""
"ch_coa_1570","Equipment and Facilities","1570","asset_fixed","False","","Feste Einrichtungen und Installationen","Attrezzature e infrastrutture","Équipements et installations","Other type of property, like plants, machinery or various equipment","vat_purchase_81_invest","Andere Arten von Eigentum, wie Anlagen, Maschinen oder verschiedene Geräte","Altri tipi di proprietà, come impianti, macchinari o attrezzature varie","Autre type de propriété, comme des usines, des machines ou divers équipements","asset_other_property"
"ch_coa_1571","Installations","1571","asset_fixed","False","","Anlagen","Installazioni","Installations","Purchases of installations related to buildings, like solar panels or heater","vat_purchase_81_invest","Käufe von Gebäudeanlagen, wie Solaranlagen oder Heizungen","Acquisti di impianti relativi agli edifici, come pannelli solari o riscaldamento","Achats d'installations liées aux bâtiments, comme des panneaux solaires ou des radiateurs","asset_installations"
"ch_coa_1579","Accumulated depreciation on Equipment and Facilities","1579","asset_fixed","False","","Abschreibungen feste Einrichtungen und Installationen","Ammortamenti su attrezzature e infrastrutture","Amortissements cumulés sur les équipements et installations","Cumulative reduction in value of a fixed asset due to wear, age, or obsolescence, recorded over its useful life.","","Kumulative Wertminderung eines Anlagevermögens aufgrund von Verschleiß, Alter oder Veralterung, erfasst über seine Nutzungsdauer.","Riduzione cumulativa del valore di un'attività fissa dovuta a usura, età o obsolescenza, registrata durante la sua vita utile.","Réduction cumulative de la valeur d'un actif fixe due à l'usure, à l'âge ou à l'obsolescence, enregistrée sur sa durée de vie utile.",""
"ch_coa_1590","Other movable tangible assets","1590","asset_fixed","False","","Sonstige bewegliche Sachanlagen","Altre immobilizzazioni materiali","Autres immobilisations corporelles meubles","Physical business assets not classified under specific categories, such as furniture or fixtures, movable and depreciable.","vat_purchase_81_invest","Physisches Geschäftsvermögen, das nicht bestimmten Kategorien zugeordnet ist, wie etwa Möbel oder Einrichtungsgegenstände, bewegliches und abschreibungsfähiges Vermögen.","Beni aziendali fisici non classificati in categorie specifiche, come mobili o arredi, beni mobili e ammortizzabili.","Actifs commerciaux physiques non classés dans des catégories spécifiques, telles que les meubles ou les agencements, les biens meubles et amortissables.","asset_tangible_other_movable"
"ch_coa_1599","Accumulated depreciation on Other movable tangible assets","1599","asset_fixed","False","","Kumulierte Abschreibungen auf Sonstige bewegliche Sachanlagen","Ammortamenti su altre immobilizzazioni materiali mobiliari","Amortissements sur les autres immobilisations corporelles meubles","Cumulative reduction in value of a fixed asset due to wear, age, or obsolescence, recorded over its useful life.","","Kumulative Wertminderung eines Anlagevermögens aufgrund von Verschleiß, Alter oder Veralterung, erfasst über seine Nutzungsdauer.","Riduzione cumulativa del valore di un'attività fissa dovuta a usura, età o obsolescenza, registrata durante la sua vita utile.","Réduction cumulative de la valeur d'un actif fixe due à l'usure, à l'âge ou à l'obsolescence, enregistrée sur sa durée de vie utile.",""
"ch_coa_1600","Real Estate","1600","asset_fixed","False","","Liegenschaften","Immobili aziendali","Immeubles d’exploitation","Land or buildings held for business operations or rental income, recorded as long-term fixed assets.","vat_purchase_81_invest","Grundstücke oder Gebäude, die für den Geschäftsbetrieb oder zur Mieteinnahme genutzt werden und als langfristiges Anlagevermögen erfasst werden.","Terreni o fabbricati detenuti per operazioni commerciali o per ricavi da locazione, registrati come attività fisse a lungo termine.","Terrains ou bâtiments détenus à des fins d'exploitation commerciale ou de revenus locatifs, enregistrés comme actifs fixes à long terme.","asset_real_estate"
"ch_coa_1606","Construction","1606","asset_fixed","False","","Bau","Edilizia","Construction","Construction of buildings and costs associated to buildings","vat_purchase_81_invest","Bau von Gebäuden und damit verbundene Kosten","Costruzione di edifici e costi associati agli edifici","Construction de bâtiments et coûts associés aux bâtiments","asset_construction"
"ch_coa_1609","Accumulated depreciation on real estate","1609","asset_fixed","False","","Kumulierte Abschreibungen auf Immobilien","Ammortamenti su immobili in esercizio","Amortissements sur les immeubles d’exploitation","Cumulative reduction in value of a fixed asset due to wear, age, or obsolescence, recorded over its useful life.","","Kumulative Wertminderung eines Anlagevermögens aufgrund von Verschleiß, Alter oder Veralterung, erfasst über seine Nutzungsdauer.","Riduzione cumulativa del valore di un'attività fissa dovuta a usura, età o obsolescenza, registrata durante la sua vita utile.","Réduction cumulative de la valeur d'un actif fixe due à l'usure, à l'âge ou à l'obsolescence, enregistrée sur sa durée de vie utile.",""
"ch_coa_1680","Land","1680","asset_fixed","False","","Grundstücke","Terreni","Terrain","Purchases of lands without buildings","vat_O_exclude","Kauf von unbebauten Grundstücken","Acquisti di terreni senza fabbricati","Achats de terrains sans bâtiments","asset_land"
"ch_coa_1700","Patents, Licences","1700","asset_fixed","False","","Patente, Lizenzen","Patenti, know-how, licenze, diritti e sviluppo","Brevets, know-how, licences, droits, développement","Legally protected rights or permissions to use inventions or intellectual property, amortized over their legal life.","vat_purchase_81_invest","Gesetzlich geschützte Rechte oder Genehmigungen zur Nutzung von Erfindungen oder geistigem Eigentum, die über ihre rechtliche Lebensdauer abgeschrieben werden.","Diritti o permessi legalmente tutelati per l'uso di invenzioni o proprietà intellettuale, ammortizzati nel corso della loro durata legale.","Droits ou autorisations légalement protégés d'utiliser des inventions ou des propriétés intellectuelles, amortis sur leur durée de vie légale.","asset_patents_licences"
"ch_coa_1709","Accumulated depreciation on Patents, Licences","1709","asset_fixed","False","","Kumulierte Abschreibungen auf Patente, Lizenzen","Ammortamento di brevetti, know-how, licenze, diritti, dev.","Amortissements sur les brevets, know-how, licences, droits, dév.","Cumulative reduction in value of a fixed asset due to wear, age, or obsolescence, recorded over its useful life.","","Kumulative Wertminderung eines Anlagevermögens aufgrund von Verschleiß, Alter oder Veralterung, erfasst über seine Nutzungsdauer.","Riduzione cumulativa del valore di un'attività fissa dovuta a usura, età o obsolescenza, registrata durante la sua vita utile.","Réduction cumulative de la valeur d'un actif fixe due à l'usure, à l'âge ou à l'obsolescence, enregistrée sur sa durée de vie utile.",""
"ch_coa_1770","Goodwill","1770","asset_fixed","False","","Geschäftswert","Avviamento","Goodwill","Long-term physical assets used in business operations, such as equipment or property, subject to depreciation.","vat_purchase_81_invest","Langfristige physische Vermögenswerte, die im Geschäftsbetrieb verwendet werden, wie z. B. Ausrüstung oder Eigentum, unterliegen der Abschreibung.","Beni materiali a lungo termine utilizzati nelle operazioni aziendali, come attrezzature o proprietà, soggetti ad ammortamento.","Actifs physiques à long terme utilisés dans les opérations commerciales, tels que l'équipement ou la propriété, sujets à amortissement.","asset_goodwill"
"ch_coa_1779","Accumulated depreciation on goodwill","1779","asset_fixed","False","","Kumulierte Abschreibungen auf den Geschäftswert","Rettifica valore avviamento","Ajustement de la valeur des goodwill","Cumulative reduction in value of a fixed asset due to wear, age, or obsolescence, recorded over its useful life.","","Kumulative Wertminderung eines Anlagevermögens aufgrund von Verschleiß, Alter oder Veralterung, erfasst über seine Nutzungsdauer.","Riduzione cumulativa del valore di un'attività fissa dovuta a usura, età o obsolescenza, registrata durante la sua vita utile.","Réduction cumulative de la valeur d'un actif fixe due à l'usure, à l'âge ou à l'obsolescence, enregistrée sur sa durée de vie utile.",""
"ch_coa_1850","Non-paid-in share capital","1850","asset_fixed","False","","Nicht eingezahltes Grundkapital","Capitale azionario, capitale sociale, diritti di partecipazione o capitale della fondazione non versati","Capital actions, capital social, droits de participations ou capital de fondation non versés","Long-term physical assets used in business operations, such as equipment or property, subject to depreciation.","","Langfristige physische Vermögenswerte, die im Geschäftsbetrieb verwendet werden, wie z. B. Ausrüstung oder Eigentum, unterliegen der Abschreibung.","Beni materiali a lungo termine utilizzati nelle operazioni aziendali, come attrezzature o proprietà, soggetti ad ammortamento.","Actifs physiques à long terme utilisés dans les opérations commerciales, tels que l'équipement ou la propriété, sujets à amortissement.","asset_non_paid_in_share_capital"
"ch_coa_1060","Securities (with stock exchange price)","1060","asset_current","False","","Wertpapiere (mit Börsenkurs)","Titoli","Titres","Securities (with stock exchange price), account used in general accounting processes.","","Wertpapiere (mit Börsenkurs), Konto für allgemeine Buchhaltungsvorgänge.","Titoli (con quotazione in borsa), conto utilizzato nei processi di contabilità generale.","Titres (avec cours de bourse), compte utilisé dans les processus comptables généraux.",""
"ch_coa_1069","Accumulated depreciation on securities","1069","asset_current","False","","Kumulierte Abschreibungen auf Wertpapiere","Rettifica valore titoli","Ajustement de la valeur des titres","Cumulative reduction in value of a fixed asset due to wear, age, or obsolescence, recorded over its useful life.","","Kumulative Wertminderung eines Anlagevermögens aufgrund von Verschleiß, Alter oder Veralterung, erfasst über seine Nutzungsdauer.","Riduzione cumulativa del valore di un'attività fissa dovuta a usura, età o obsolescenza, registrata durante la sua vita utile.","Réduction cumulative de la valeur d'un actif fixe due à l'usure, à l'âge ou à l'obsolescence, enregistrée sur sa durée de vie utile.",""
"ch_coa_1090","Salary-Pass-Through Account","1090","asset_current","True","","Gehaltsdurchlaufkonto","Conto di trasferimento dello stipendio","Compte de transfert de salaire","Salary-Pass-Through Account, account used in general accounting processes.","","Gehaltsdurchlaufkonto, Konto, das in allgemeinen Buchhaltungsprozessen verwendet wird.","Conto di passaggio stipendio, conto utilizzato nei processi di contabilità generale.","Compte de transfert de salaire, compte utilisé dans les processus comptables généraux.",""
"ch_coa_1091","Transfer account: Salaries","1091","asset_current","True","","Transferkonto: Gehälter","Conto d'attesa - Salari","Compte d'attente pour salaires","Transfer account: Salaries, account used in general accounting processes.","","Überweisungskonto: Gehälter, Konto, das in allgemeinen Buchhaltungsprozessen verwendet wird.","Conto di trasferimento: Stipendi, conto utilizzato nei processi di contabilità generale.","Compte de virement : Salaires, compte utilisé dans les processus comptables généraux.",""
"ch_coa_1099","Transfer account: miscellaneous","1099","asset_current","True","","Transferkonto: Verschiedenes","Conto d'attesa - Altro","Compte d'attente autre","Transfer account: miscellaneous, account used in general accounting processes.","","Überweisungskonto: Sonstiges, Konto, das in allgemeinen Buchhaltungsprozessen verwendet wird.","Conto di trasferimento: vario, conto utilizzato nei processi di contabilità generale.","Compte de virement : divers, compte utilisé dans les processus comptables généraux.",""
"ch_coa_1100","Accounts receivable from goods and services (Debtors)","1100","asset_receivable","True","","Forderungen aus Lieferungen und Leistungen (Debitoren)","Crediti da forniture e prestazioni (debitori)","Débiteurs","Accounts receivable from goods and services (Debtors), account used in general accounting processes.","","Forderungen aus Lieferungen und Leistungen (Debitoren), Konto, das in allgemeinen Buchhaltungsprozessen verwendet wird.","Crediti derivanti da beni e servizi (Debitori), conto utilizzato nei processi di contabilità generale.","Comptes débiteurs de biens et services (Débiteurs), compte utilisé dans les processus comptables généraux.",""
"ch_coa_1101","Receivable (PoS)","1101","asset_receivable","True","","Forderungen (PoS)","Crediti (Punti vendita)","Débiteurs (PoS)","Receivable (PoS), account used in general accounting processes.","","Forderungen (PoS), Konto, das in allgemeinen Buchhaltungsprozessen verwendet wird.","Crediti (PoS), conto utilizzato nei processi di contabilità generale.","Compte débiteur (PoS), compte utilisé dans les processus comptables généraux.",""
"ch_coa_1109","Del credere (Acc. depr. on debtors)","1109","asset_current","False","","Delkredere (Akontoabzug für Schuldner)","Del credere","Ducroire","Del credere (Acc. depr. on debtors), account used in general accounting processes.","","Delkredere (Debitorenkonto), Konto, das in allgemeinen Buchhaltungsprozessen verwendet wird.","Del credere (Acc. depr. sui debitori), conto utilizzato nei processi di contabilità generale.","Del credere (Acc. dépr. sur débiteurs), compte utilisé dans les processus comptables généraux.",""
"ch_coa_1140","Advances and loans","1140","asset_current","False","","Vorschüsse und Darlehen","Anticipi e prestiti","Avances et prêts","Amounts lent to third parties or subsidiaries, expected to be repaid over time with or without interest.","","An Dritte oder Tochtergesellschaften verliehene Beträge, deren Rückzahlung im Laufe der Zeit mit oder ohne Zinsen erwartet wird.","Importi prestati a terzi o società controllate, che si prevede saranno rimborsati nel tempo con o senza interessi.","Montants prêtés à des tiers ou à des filiales, dont le remboursement est prévu au fil du temps avec ou sans intérêts.",""
"ch_coa_1149","Advances and loans adjustments","1149","asset_current","False","","Anpassungen von Vorschüssen und Darlehen","Rettifica valore anticipi e prestiti","Ajustement de la valeur des avances et des prêts","Amounts lent to third parties or subsidiaries, expected to be repaid over time with or without interest.","","An Dritte oder Tochtergesellschaften verliehene Beträge, deren Rückzahlung im Laufe der Zeit mit oder ohne Zinsen erwartet wird.","Importi prestati a terzi o società controllate, che si prevede saranno rimborsati nel tempo con o senza interessi.","Montants prêtés à des tiers ou à des filiales, dont le remboursement est prévu au fil du temps avec ou sans intérêts.",""
"ch_coa_1170","Input Tax (VAT) receivable on material, goods, services, energy","1170","asset_current","False","","Vorsteuer (MwSt.) auf Material, Waren, Dienstleistungen, Energie","IVA, imposta precedente su materiale, merce, servizi ed energia","Impôt préalable: TVA s/matériel, marchandises, prestations et énergie","Input Tax (VAT) receivable on material, goods, services, energy, account used in general accounting processes.","","Vorsteuerabzug (MwSt.) auf Material, Waren, Dienstleistungen, Energie, Konto, das in allgemeinen Buchhaltungsprozessen verwendet wird.","Imposta sugli input (IVA) da ricevere su materiali, beni, servizi, energia, conto utilizzato nei processi di contabilità generale.","Taxe sur les intrants (TVA) à recevoir sur les matières, biens, services, énergie, compte utilisé dans les processus de comptabilité générale.",""
"ch_coa_1171","Input Tax (VAT) receivable on investments, other operating expenses","1171","asset_current","False","","Vorsteuer (MwSt.) auf Investitionen, sonstige betriebliche Aufwendungen","IVA, imposta precedente su investimenti e altri costi d’esercizio","Impôt préalable: TVA s/investissements et autres charges d’exploitation","Input Tax (VAT) receivable on investments, other operating expenses, account used in general accounting processes.","","Vorsteuerabzug (MwSt.) auf Kapitalanlagen, sonstige Betriebsausgaben, Konto für allgemeine Buchhaltungsvorgänge.","Imposta sugli input (IVA) da ricevere sugli investimenti, altre spese operative, conto utilizzato nei processi di contabilità generale.","Taxe sur les intrants (TVA) à recevoir sur les investissements, autres charges d'exploitation, compte utilisé dans les processus comptables généraux.",""

Warning

  • Avoid the usage of asset_cash account_type! Indeed, the bank & cash accounts are created directly at the installation of the localization module and then, are linked to an account.journal.

  • Only one account of type payable/receivable is enough for the generic case. We need to define a PoS receivable account as well however. (linked in the CoA)

  • Don’t create too many accounts: 200-300 is enough. But mostly, we try to find a good balance where the CoA needs minimal adapting for most companies afterwards.

Account parents

Account parents allow describing the hierarchical structure of the chart of accounts. The filter Subtotal needs to be activated in the report and then it will show the parents of the account.

Taxes

To add taxes you first need to specify fiscal positions and tax groups. You normally need just one tax group for every tax rate, except for the 0% as you need to often distinguish between exempt, 0%, not subject, … taxes. This model only has two required fields: name and country. Create the file data/template/account.tax.group-xx.csv and list the groups.

Taxes should be belong to at least one fiscal position, but can be shared by many. Leave the field empty if you want the tax to be shared by all fiscal positions.

Example

addons/l10n_uk/data/template/account.tax.group-uk.csv

"id","name","country_id","tax_payable_account_id","tax_receivable_account_id"
"tax_group_0","TAX 0%","base.uk","220200","220202"
"tax_group_5","TAX 5%","base.uk","220200","220202"
"tax_group_175","TAX 17.5%","base.uk","220200","220202"
"tax_group_20","TAX 20%","base.uk","220200","220202"

Now you can add the taxes via data/template/account.tax-xx.csv file. The first tax you define that is purchase/sale also becomes the default purchase/sale tax for your products.

Example

addons/l10n_ae/data/template/account.tax-ae.csv

"id","name","type_tax_use","amount","amount_type","description","invoice_label","tax_group_id","repartition_line_ids/repartition_type","repartition_line_ids/document_type","repartition_line_ids/tag_ids","repartition_line_ids/account_id","repartition_line_ids/factor_percent","fiscal_position_ids","original_tax_ids","repartition_line_ids/use_in_tax_closing","include_base_amount","price_include_override"
"uae_sale_tax_5_dubai","5% DU","sale","5.0","percent","Dubai","5%","ae_tax_group_5","base","invoice","1(b)B","","","account_fiscal_position_dubai","","","",""
"","","","","","","","","tax","invoice","1(b)T","uae_account_220200","","","","","",""
"","","","","","","","","base","refund","1(b)B","","","","","","",""
"","","","","","","","","tax","refund","1(b)T","uae_account_220200","","","","","",""
"uae_sale_tax_5_abu_dhabi","5% AZ","sale","5.0","percent","Abu Dhabi","5%","ae_tax_group_5","base","invoice","1(a)B","","","account_fiscal_position_abu_dhabi","uae_sale_tax_5_dubai","","",""
"","","","","","","","","tax","invoice","1(a)T","uae_account_220200","","","","","",""
"","","","","","","","","base","refund","1(a)B","","","","","","",""
"","","","","","","","","tax","refund","1(a)T","uae_account_220200","","","","","",""
"uae_sale_tax_5_sharjah","5% SH","sale","5.0","percent","Sharjah","5%","ae_tax_group_5","base","invoice","1(c)B","","","account_fiscal_position_sharjah","uae_sale_tax_5_dubai","","",""
"","","","","","","","","tax","invoice","1(c)T","uae_account_220200","","","","","",""
"","","","","","","","","base","refund","1(c)B","","","","","","",""
"","","","","","","","","tax","refund","1(c)T","uae_account_220200","","","","","",""
"uae_sale_tax_5_ajman","5% AJ","sale","5.0","percent","Ajman","5%","ae_tax_group_5","base","invoice","1(d)B","","","account_fiscal_position_ajman","uae_sale_tax_5_dubai","","",""
"","","","","","","","","tax","invoice","1(d)T","uae_account_220200","","","","","",""
"","","","","","","","","base","refund","1(d)B","","","","","","",""
"","","","","","","","","tax","refund","1(d)T","uae_account_220200","","","","","",""
"uae_sale_tax_5_umm_al_quwain","5% UQ","sale","5.0","percent","Umm Al Quwain","5%","ae_tax_group_5","base","invoice","1(e)B","","","account_fiscal_position_umm_al_quwain","uae_sale_tax_5_dubai","","",""
"","","","","","","","","tax","invoice","1(e)T","uae_account_220200","","","","","",""
"","","","","","","","","base","refund","1(e)B","","","","","","",""
"","","","","","","","","tax","refund","1(e)T","uae_account_220200","","","","","",""
"uae_sale_tax_5_ras_al_khaima","5% RK","sale","5.0","percent","Ras Al-Khaima","5%","ae_tax_group_5","base","invoice","1(f)B","","","account_fiscal_position_ras_al_khaima","uae_sale_tax_5_dubai","","",""

A tax can also be a replacement for another. This replacement applies when the target fiscal position is used.

Tax Report

Enterprise feature

The tax report is declared in the Invoicing (account) app, but the report is only accessible when Accounting (account_accountant) is installed.

In the previous section, you noticed the fields invoice_repartition_line_ids or refund_repartition_line_ids and probably understood nothing about them. Good news: you are not alone on this incomprehension. Bad news: you have to figure it out a bit. The topic is complicated. Indeed:

digraph foo {
  graph [
    newrank=true,
    overlap=false,
  ];
  node [
    fontname="Ubuntu"
    fontsize=10,
    style="filled,setlinewidth(6)",
    shape=box,
    height=0.1,
    width=0.1,
  ];
  edge [
    fontsize=8,
  ];
  res_country[label="res.country", fillcolor=white, penwidth=1];
  subgraph cluster_invoice {
    style = filled;
    label = "Invoices";
    color = lightyellow;
    node [style=filled, color=white];
    edge [fontsize=8,];
    account_move_line[label="account.move.line"]
    account_tax[label="account.tax"]
    account_tax_repartition_line[label="account.tax.repartition.line"];
    account_account_tag[label="account.account.tag"];
    account_move_line -> account_tax [label="tax_ids | tax_line_ids"];
    account_move_line -> account_tax_repartition_line [label="tax_repartition_line_id"];
    account_move_line -> account_account_tag [label="tag_ids"];
    account_tax_repartition_line -> account_account_tag [label="tag_ids"];
    account_tax -> account_tax_repartition_line [label="1 for base, 1..* for tax amount"];
  }
  subgraph cluster_reporting {
    style = filled;
    label = "Reporting";
    color = mistyrose;
    node [style=filled, color=white];
    edge [fontsize=8,];
    account_tax_report [label="account.report"];
    account_tax_report_line [label="account.report.line"];
    account_report_expression [label="account.report.expression"];
    account_tax_report -> account_tax_report_line [label="0..*"]
  }
  subgraph cluster_templates {
    style = filled;
    label = "Templates";
    color = lightblue;
    node [style=filled, color=white];
    edge [fontsize=8,];
    account_tax_template[label="account.tax.template"];
    account_tax_repartition_line_template[label="account.tax.repartition.line.template"];
    account_tax_template -> account_tax_repartition_line_template [label="1 for base, 1..* for tax amount"];
  }
  {
    rank=same;
    account_move_line;
    account_tax_report;
  }
  {
    rank=same;
    account_tax;
    account_tax_repartition_line;
    account_account_tag;
    res_country;
  }
  {
    rank=same;
    account_report_expression;
    account_tax_template;
    account_tax_repartition_line_template;
  }
  account_tax -> account_tax_template [label="    Creates when\n    installing CoA", dir=back];
  account_tax_repartition_line -> account_tax_repartition_line_template[label="    Creates when\n   installing CoA", dir=back];
  account_tax_repartition_line_template -> account_account_tag [label="tag_ids"];
  account_tax_report_line -> account_report_expression [label="0..*"];
  account_tax_report_line -> account_tax_report_line [label="children_ids"];
  account_report_expression -> account_account_tag [label="Engine tax_tags 1..*"];
  account_tax_report -> res_country [label="0..1"];
  account_account_tag -> res_country [label="0..1"];
}

The simple version is that, in the tax template, you indicate in the invoice/refund repartition lines whether the base or a percentage of the tax needs to be reported in which report line (through the minus/plus_report_line_ids fields). It becomes clear also when you check the tax configuration in the Odoo interface (or check the docs Tax References, Tax Repartition References).

So, once you have properly configured taxes, you just need to add the data/account_tax_report_data.xml file with a record for your account.report. For it to be considered as a tax report, you need to provide it with the right root_report_id.

<odoo>
    <record id="tax_report" model="account.report">
        <field name="name">Tax Report</field>
        <field name="root_report_id" ref="account.generic_tax_report"/>
        <field name="country_id" ref="base.XX"/>
    </record>

    ...
</odoo>

… followed by the declaration of its lines, as account.report.line records.

Example

addons/l10n_at/data/account_tax_report_data.xml

    <record id="tax_report" model="account.report">
        <field name="name">Tax Report</field>
        <field name="name@de">Steuerbericht</field>
        <field name="root_report_id" ref="account.generic_tax_report"/>
        <field name="country_id" ref="base.at"/>
        <field name="allow_foreign_vat" eval="True"/>
        <field name="availability_condition">country</field>
        <field name="column_ids">
            <record id="tax_report_balance" model="account.report.column">
                <field name="name">Base</field>
                <field name="name@de">Bemessungsgrundlage</field>
                <field name="expression_label">base</field>
            </record>
            <record id="tax_report_vat" model="account.report.column">
                <field name="name">VAT</field>
                <field name="name@de">Umsatzsteuer</field>
                <field name="expression_label">vat</field>
            </record>
        </field>
        <field name="line_ids">
            <record id="tax_report_line_l10n_at_non_tva_sale_report_title" model="account.report.line">
                <field name="name">3. Breakdown for the recapitulative statement (ZM)</field>
                <field name="name@de">3. Aufschlüsselung für die Zusammenfassende Meldung (ZM)</field>
                <field name="sequence" eval="5"/>
                <field name="aggregation_formula">AT_ZM_IGL.base + AT_ZM_IGL3.base + AT_ZM_DL.base</field>
                <field name="children_ids">
                    <record id="tax_report_line_l10n_at_tva_line_3_zm_igl" model="account.report.line">
                        <field name="name">Intra-Community supplies</field>
                        <field name="name@de">Innergemeinschaftliche Lieferungen</field>
                        <field name="code">AT_ZM_IGL</field>
                        <field name="expression_ids">
                            <record id="tax_report_line_l10n_at_tva_line_3_zm_igl_tag" model="account.report.expression">
                                <field name="label">base</field>
                                <field name="engine">tax_tags</field>
                                <field name="formula">-AT_ZM_IGL</field>
                            </record>
                        </field>
                        <field name="sequence" eval="10"/>
                    </record>

Fiscal positions

Specify fiscal positions in the data/template/account.fiscal.position-xx.csv file. The first fiscal position that matches the company’s country is considered the domestic fiscal position.

Example

addons/l10n_es/data/template/account.fiscal.position-es_common_mainland.csv

"id","sequence","name","name@es","name@ca","auto_apply","vat_required","country_id","country_group_id","account_ids/account_src_id","account_ids/account_dest_id"
"l10n_es_domestic_fiscal_position","10","ES Domestic","España Peninsula","Espanya Península","1","","base.es","l10n_es.mainland_es","",""
"fp_intra_private","30","EU private","EU privado","EU privat","1","","","account.europe_vat","",""

Final steps

Finally, you may add a demo company, so the localization can easily be tested in demo mode.

Example

addons/l10n_ch/demo/demo_company.xml

    <record id="base.partner_demo_company_ch" model="res.partner" forcecreate="1">
        <field name="name">CH Company</field>
        <field name="vat">CHE-530781296TVA</field>
        <field name="street">Meierskappelerstrasse 14</field>
        <field name="city">Risch-Rotkreuz</field>
        <field name="country_id" ref="base.ch"/>

        <field name="zip">6343</field>
        <field name="phone">+41 78 123 45 67</field>
        <field name="email">info@company.chexample.com</field>
        <field name="website">www.chexample.com</field>
    </record>

    <record id="base.demo_bank_ch" model="res.partner.bank" forcecreate="1">
        <field name="account_number">CH1500240123456789012</field>
        <field name="l10n_ch_qr_iban">CH4431999123000889012</field>
        <field name="partner_id" ref="base.partner_demo_company_ch"/>
        <field name="allow_out_payment" eval="True"/>
    </record>

    <record id="base.demo_company_ch" model="res.company" forcecreate="1">
        <field name="name">CH Company</field>
        <field name="partner_id" ref="base.partner_demo_company_ch"/>
    </record>

    <function model="res.company" name="_onchange_country_id">
        <value eval="[ref('base.demo_company_ch')]"/>
    </function>

    <function model="res.users" name="write">
        <value eval="[ref('base.user_root'), ref('base.user_admin'), ref('base.user_demo')]"/>
        <value eval="{'company_ids': [(4, ref('base.demo_company_ch'))]}"/>
    </function>

    <function model="account.chart.template" name="try_loading">
        <value eval="[]"/>
        <value>ch</value>
        <value model="res.company" eval="obj().env.ref('base.demo_company_ch')"/>
        <value name="install_demo" eval="True"/>
    </function>

Accounting reports

Enterprise feature

See also

Reporting

Accounting reports should be added via a separate module l10n_XX_reports that should go to the enterprise repository.

Basic __manifest__.py file for such a module looks as following:

{
    "name": "COUNTRY - Accounting Reports",
    "category": "Accounting/Localizations/Reporting",
    "version": "1.0.0",
    "author": "Odoo S.A.",
    "license": "OEEL-1",
    "depends": [
        "l10n_XX", "account_reports"
    ],
    "data": [
        "data/balance_sheet.xml",
        "data/profit_and_loss.xml",
    ],
    "auto_install": True,
}

Functional overview of financial reports is here: Reporting.

Some good examples:

You can check the meaning of the fields here:

If you gave a root_report_id to your report, it is now available in its variant selector. If not, you still need to add a menu item for it. A default menu item can be created from the form view of the report by clicking on Actions ‣ Create Menu Item. You will then need to refresh the page to see it. Alternatively, to create a dedicated section for a totally new report in the Reporting menu, you need to create a new ir.ui.menu record (usually in the main l10n_XX module) and a new ir.actions.client (usually in the new report XML file) that calls the account.report with the new report id. Then, set the new menu as parent_id field in the action model.