Tunisian VAT Validation
Validate the Tunisian tax ID (matricule fiscal) with the official key-letter algorithm and fiscal code rules — right inside Contacts — Odoo 18
Stop Invalid Tunisian VAT Numbers at the Source
Tunisian VAT Validation enforces the real structure of the Tunisian matricule fiscal directly on your contacts. It verifies the mandatory check (key) letter with the official modulo 23 algorithm, controls the fiscal situation and activity category codes, and blocks any invalid number before it is saved — with a precise, human-readable error. Everything runs locally: no external service and no internet connection required.
Key Features
Two Official Formats
Supports the simple format 1234567Y and the
complete format 1234567Y/A/M/000 — including the
regulatory variants.
Key-Letter Algorithm
Recomputes the mandatory check letter from the 7 digits using the official modulo 23 Tunisian fiscal alphabet (excluding I, O and U).
On-the-Fly Validation
A Python constraint blocks saving a Tunisian contact with an invalid VAT and stores a detailed error — catching mistakes at the moment of entry.
Fiscal Code Rules
Validates the VAT situation (A, B, P, F, N, D) and the activity category (M, C, P, N), and tolerates the reversed segment order used by some matricules.
Validate Button & Assistant
Trigger validation with a one-click Validate button on the contact form, or test any number with the standalone VAT Validation assistant.
Smart base_vat Override
Disables the generic base_vat check for Tunisia so only the local rules apply,
while leaving validation for every other country untouched.
Built Right Into Contacts
Validation tools available where your team already manages partners.
Inline VAT Tools on the Contact Form
A Validate button, the detected format type, a validated flag and a clear error message, right next to the VAT field.
Dedicated Tax Registration Page
A « Tunisian Tax Registration » page shows the VAT, its format and its validation status — visible only for Tunisian partners.
List Columns & Standalone Assistant
See the validation status in the Contacts list, and open the VAT Validation assistant from the Technical menu to check any number instantly.
How It Works
From a Tunisian contact to a validated VAT number in a few clicks.
Set the Contact to Tunisia
Create or open a contact and set the country to Tunisia. The VAT field becomes required for companies and the Tunisian validation rules take over.
Invalid Numbers Are Rejected
Enter a wrong VAT and saving is blocked instantly. A precise message explains the expected key letter or the invalid fiscal code.
Confirm a Valid VAT
Enter a correct number and the contact is flagged Tunisian VAT Validated, with its detected format (simple or complete) shown right away.
Use the Standalone Assistant
From Settings › Technical, open the VAT Validation assistant to test any number on the fly — without creating or editing a contact.
Prerequisites
- Odoo 18
- Required modules:
base,base_vat,contacts - Applies to partners whose country is Tunisia (TN)
- No internet connection required — all checks run locally
Technical Information
| Version | 18.0.1.0.0 |
| License | LGPL-3 |
| Author | BIZUP |
| Website | www.bizup.tn |
| Category | Localization |
| Dependencies | base base_vat contacts |
| Odoo Version | 18.0 |
Standards & Scope
Validation implements the publicly documented structure of the Tunisian matricule fiscal: seven digits, an algorithmic key letter, a fiscal situation code, an activity category code and a secondary-establishment code. All checks are format and algorithm based and run entirely inside Odoo — the module does not contact any external registry or tax service.
Our Odoo Services
BIZUP is a dynamic Tunisian startup specializing in digital transformation and Odoo ERP solutions.
We bring fresh energy and expertise to accelerate your business growth.
End-to-end ERP integration tailored to your business processes.
Custom module development to meet your unique business needs.
Smooth migration to newer Odoo versions with zero data loss.
Comprehensive training programs to empower your team on Odoo.
Need Help?
For support, customization requests, or any questions about this module, feel free to reach out to our team.
Avenue Commandant Bejaoui, Immeuble El Hafianne Bloc A, 4000 Sousse, Tunisia
we help you grow
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Contacts (contacts)
• Discuss (mail) • Invoicing (account) |
| Lines of code | 338 |
| Technical Name |
tn_vat_validation |
| License | LGPL-3 |
| Website | https://www.bizup.tn |
Please log in to comment on this module