How to create your country localization module for accounts

A country localization module is used to define the accounts and other items needed to comply with a country’s specific accounting requirements. These modules provide the following items for a specific country:

  • Chart of accounts
  • Balance report
  • Income statement (sometimes called the profit and loss report)
  • Taxes and tax rules
  • Chart of tax codes (used for tax reporting)
  • Other country specific accounting reports and processes

The modules are named account_<country> where <country> is the two digit code of the country. Some example modules are: account_be, account_es or account_fr.

How are localization modules used?

Once the module is activated you will have a new Account Template available in the Financial → Configuration → Templates → Create Chart of Accounts from Template. Running this process and using this new Account Template will create the chart of accounts and associated items for the selected company.

If there are several companies on the same database each one can have it’s own, different, chart of accounts.

If the Account Template is updated (which normally happens on a new Tryton release) the Financial → Configuration → Templates → Update Chart of Accounts from Template option should be used to update your company setup with that from the Account Template.

How to create an Account Template?

For each model that is managed by the Account Template there is a template model. The template models are created by the localization modules and cannot be changed by users. When the account template is used to setup the accounts for a company these template models are used to create the actual records used by the company.

For example the account structure is stored in the account.account model, so in order to create the account structure in your localization module you would create account.account.template records. When your template is used for a company the account.account.template records you created are used to create the account.account records for the company.

These records are created using an xml file that should be included in the localization module. Once the module is activated on a Tryton system the Account Template it defines is then available on that Tryton system.

An Account Template is defined by an account.account.template record that has no parent record. The name of this account will be used as name of the Account Template. All the sub accounts and associated account types will be created when this chart of accounts is created. In order to know which taxes are included on a chart you should relate them to their Account Template by using the account field.

Which models do I need to setup?

The Account model (account.account.template) is used to define the accounting structure that will be used by account moves. Only accounts that have an account type can be used for account moves. Accounts without a type are used to group together and sum the values from their sub accounts.

The Account Type model (account.account.type.template) is used to define an item that appears on the balance sheet or income statement (depending it’s type). There are also some check-boxes that allow you to use it’s associated accounts for specific purposes: expense, income, receivable, payable, etc.
Account types are used to sum up related accounts for a given date (balance sheet) or period (income statement). Parent types will also sum up the amount of all of it’s children.

A similar structure is used for taxes: The Tax model (account.tax.template) defines which taxes are available for invoices and the Tax Code model (account.tax.code.template) is used to group together and sum up the tax amounts so they can be analyzed and reported.

Last but not least, it is also possible to define a some tax rules which are used to modify the taxes that are used for a specific party. This is done using the Tax Rule model (account.tax.rule.template).

If you are looking for some examples you can have a look at the Minimal Account Chart definitions which are included as part of the account module or at any of the existing localization modules. Our community is always happy to help, so feel free to post any questions on the support category of the forum.

How to include a localization module in Tryton?

We are very happy to include localization modules for any country. In order to do so you should follow the how to contribute process. Please make sure you create an issue in our tracker including references to any official documentation. The proposal will be reviewed by our developers and once approved will be included as part of future Tryton releases.

6 Likes

I created a step-by-step guide with more details and links to the French and Swiss examples, it is here:

https://danielpocock.com/adapting-localizing-tryton-for-your-country-free-open-source-accounting-software/

1 Like