← All articles

TEIF e-invoicing in Tunisia: how it works in Odoo

The TEIF format, Tunisie TradeNet’s El Fatoora platform, electronic signatures: how a Tunisian e-invoice flows, and how to automate it from your ERP.

The OVS Corp team · · 2 min read
  • Tunisia
  • E-invoicing
  • TEIF
  • Odoo

E-invoicing is no longer a future topic in Tunisia: more and more companies must issue certain invoices electronically, through the national platform. For a finance team, the real question is simple: how do you produce these invoices without double entry or juggling files?

This article explains the flow, then how we integrate it into Odoo.

First things first: the scope of the obligation (types of transactions, sectors, companies concerned) changes with each finance law. Check your exact situation with your chartered accountant; this article describes how the system works, not your legal obligations.

Three concepts to know

  • TEIF (Tunisian Electronic Invoice Format): the technical format of the Tunisian e-invoice. It is a structured XML file containing every detail of the invoice: seller, customer, lines, taxes, totals.
  • El Fatoora: the Tunisie TradeNet (TTN) platform that receives, checks and records electronic invoices.
  • Electronic signature: each invoice is signed with a certificate issued to the company, which guarantees its origin and integrity.

The life of an invoice

  1. The invoice is created in your software, as usual.
  2. The TEIF file is generated from the validated invoice.
  3. The file is electronically signed.
  4. It is sent to TTN, which checks its format and content.
  5. The platform responds: the invoice is accepted and receives its reference, or it is rejected with a reason.
  6. The signed file and the response are archived, and the invoice is sent to the customer.

Done by hand, every step is a source of error: a forgotten export, the wrong file signed, an unhandled rejection, an invoice changed after sending.

What integration in Odoo brings

With our localisation modules, the whole flow starts from the Odoo invoice:

  • the TEIF file is generated automatically on validation, with Tunisian taxes (VAT, FODEC, stamp duty) already computed by the localisation;
  • sending and tracking happen from the invoice itself: you can see whether it is accepted, pending or rejected;
  • if it is rejected, the reason is shown on the invoice so it can be corrected;
  • files and responses are archived with the invoice, one click away in case of an audit.

The accountant never leaves Odoo, and nobody handles XML files.

Good practice before you start

  • Clean up your customer records: tax ID, company name and address must be accurate. This is the leading cause of rejections.
  • Check your taxes: a wrongly configured VAT rate on a product will end up on every e-invoice.
  • Apply for the signing certificate early: obtaining it takes administrative time.
  • Test in a test environment before going live, with a few real invoices.

Not on Odoo yet?

TEIF generation can also be set up as part of a migration, for example from Sage or a local invoicing tool. In that case, we use the project to clean up customer records and tax settings: that means fewer rejections later on.