Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Property Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
      • Get a Tailored Demo
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +32 2 290 34 90
    • Get a Tailored Demo
  • Pricing
  • Help
  1. APPS
  2. Localization
  3. Tunisian VAT Validation v 17.0
  4. Sales Conditions FAQ

Tunisian VAT Validation

by Bizup https://www.bizup.tn
Odoo
v 17.0 Third Party 3
Download for v 17.0 Deploy on Odoo.sh
Apps purchases are linked to your Odoo account, please sign in or sign up first.
Versions 17.0 18.0
You bought this module and need support? Click here!
  • Description
  • Manifest

Tunisian VAT Validation

Comprehensive and secure Tunisian VAT number validation for Odoo 18

VAT • KEY LETTER • SITUATION • CATEGORY • VALIDATION

Validate Tunisian Tax Registration Numbers

Tunisian VAT Validation ensures compliance with Tunisian tax regulations by validating VAT (Tax Identification Number) numbers directly inside Odoo 18. The module supports both simple (7 digits + key letter) and complete (with situation, category, establishments) formats using the official Tunisian fiscal algorithm — no external API calls required.

Key Highlights

01

Key Letter Algorithm

Automatic calculation and verification of the Tunisian fiscal key letter using the official weighted sum algorithm — decreasing weights 7 to 1, modulo 23, mapped to a 23-letter alphabet (without I, O, U).

02

Two VAT Formats

Supports both simple format (1234567P) and complete format (1234567P/A/M/000) with automatic detection of the format type via a computed stored field.

03

Situation & Category Validation

Validates VAT situation codes (A, B, P, F, N, D) and activity categories (M, C, P, N) with detailed error messages. Handles swapped segment order for Taxi-specific matricule formats.

04

Automatic & Manual Validation

VAT is validated automatically on partner creation or modification via @api.constrains. A manual button on the partner form and a standalone wizard provide on-demand validation.

05

base_vat Override

Automatically disables the standard base_vat validation for Tunisian partners and applies the dedicated Tunisian validation algorithm instead, preventing false negatives.

06

Offline & Instant

Purely algorithmic validation with no external API calls. Works offline, returns instant results, and includes 13 comprehensive unit tests covering key letter, formats, codes, and partner creation.

Supported VAT Formats

The module validates two Tunisian VAT formats with full key letter verification.

📄

Simple Format

1234567P

7 digits + 1 key letter calculated via the Tunisian fiscal algorithm.

  • Positions 1-7: Identification number (7 digits)
  • Position 8: Key letter (algorithmic check digit)
📋

Complete Format

1234567P/A/M/000

Extended format with situation, category, and secondary establishments.

  • Segment 1: Key letter (algorithmic)
  • Segment 2: VAT situation (A/B/P/F/N/D)
  • Segment 3: Activity category (M/C/P/N)
  • Segment 4: Establishments (3 digits)

Tunisian Tax Codes

Official VAT situation codes and activity categories used in the complete format.

VAT Situation Codes
A Mandatory taxpayer
B Voluntary taxpayer
P Partial taxpayer
F Flat-rate taxpayer
N Non-taxpayer
D Special regime / Customs
Activity Category Codes
M Legal entity
C Individual trader or industrial
P Individual liberal profession
N Employer not subject to taxes

How to Use Tunisian VAT Validation

From installation to validating VAT numbers in three simple steps.

1

Install the Module

Install Tunisian VAT Validation from the Odoo Apps menu. The module depends on base_vat and contacts, and automatically disables the standard VAT validation for Tunisian partners.

2

Validate a VAT Number

Two ways to validate:

  • From a partner form: Open a Tunisian contact, enter the VAT, and click "Validate Tax Registration"
  • From the wizard: Go to Administration → VAT Validation, enter any VAT number, and click "Validate"
3

Read the Result

Validation results are displayed immediately:

  • Success: A green notification confirms the VAT is valid. The format type (simple/complete) is stored on the partner.
  • Error: A red notification shows the exact reason (invalid key letter, wrong situation code, unrecognized format, etc.)
  • Validation status fields (tn_vat_validated, tn_vat_validation_error) are visible on the partner's "Tunisian Tax Registration" page.

Technical Information

Version 18.0.1.0.0
Author BIZUP
License LGPL-3
Category Localization
Website www.bizup.tn
Dependencies base base_vat contacts
Odoo Version 18.0 Community

Our Odoo Services

BIZUP is a dynamic Tunisian startup specialized in digital transformation and Odoo ERP solutions.
We bring energy and expertise to accelerate your company's growth.

Odoo Implementation

End-to-end ERP integration adapted to your business processes.

Odoo Development

Custom module development for your specific needs.

Odoo Migration

Migration to the latest Odoo versions with no data loss.

Odoo Training

Comprehensive training programs to master Odoo as a team.

Need Help?

For support, customization requests, or any questions about this module, our team is at your service.

Visit our website contact@bizup.tn

Avenue Commandant Bejaoui, Immeuble El Hafianne Bloc A, 4000 Sousse, Tunisia

BIZUP

we help you grow

Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies • Contacts (contacts)
• Discuss (mail)
• Invoicing (account)
Lines of code 348
Technical Name tn_vat_validation
LicenseLGPL-3
Websitehttps://www.bizup.tn

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with