Metadata-Version: 2.1
Name: odoo-addon-l10n_co_check_vat
Version: 18.0.1.0.0.2
Requires-Python: >=3.10
Requires-Dist: odoo==18.0.*
Summary: Colombian NIT/VAT validation
Home-page: https://github.com/OCA/l10n-colombia
License: AGPL-3
Author: Juan Arcos, Odoo Community Association (OCA)
Author-email: support@odoo-community.org
Classifier: Programming Language :: Python
Classifier: Framework :: Odoo
Classifier: Framework :: Odoo :: 18.0
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
Classifier: Development Status :: 4 - Beta
Description-Content-Type: text/x-rst

=========================
Colombia - VAT Validation
=========================

.. 
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   !! This file is generated by oca-gen-addon-readme !!
   !! changes will be overwritten.                   !!
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
   !! source digest: sha256:f915d84b9bbfaa015fa1b585f575091b11ee9e0ca5698e7fa96723e80ce1e99f
   !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
    :target: https://odoo-community.org/page/development-status
    :alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
    :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
    :alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fl10n--colombia-lightgray.png?logo=github
    :target: https://github.com/OCA/l10n-colombia/tree/18.0/l10n_co_check_vat
    :alt: OCA/l10n-colombia
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
    :target: https://translation.odoo-community.org/projects/l10n-colombia-18-0/l10n-colombia-18-0-l10n_co_check_vat
    :alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
    :target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-colombia&target_branch=18.0
    :alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module extends the functionality of the VAT validation in Odoo to
support Colombian tax identification numbers (NIT and Cédula).

By default, Odoo does not include a validator for Colombian VAT numbers,
which causes constraint errors when saving partners with a Colombian
country set. This module adds a ``check_vat_co`` method that Odoo
automatically picks up during its standard validation flow, accepting
any numeric identifier between 3 and 11 digits.

**Table of contents**

.. contents::
   :local:

Use Cases / Context
===================

Business Need
-------------

In Colombia, partners (companies and individuals) are identified by
their NIT (Número de Identificación Tributaria) or Cédula. Odoo's
standard VAT validation does not include a Colombian validator, so
saving a partner with ``country_id`` set to Colombia raises a
``ValidationError`` — even when the entered number is perfectly valid
locally. This blocks normal data entry workflows for any Colombian
company using Odoo.

Approach
--------

This module adds a ``check_vat_co`` method to ``res.partner``, which is
the exact hook Odoo's ``simple_vat_check`` looks for dynamically. It
strips non-numeric characters (dots, hyphens, spaces) and accepts any
identifier between 3 and 11 digits, covering both NIT (up to 10 digits +
check digit) and Cédula formats. No changes to existing views or
workflows are required — the validator is picked up automatically by
Odoo's constraint engine.

Useful Information
------------------

- **Depends on:** ``base``, ``account`` (for the VAT constraint logic in
  ``res.partner``)
- **Works well with:** ``l10n_co`` (Colombian chart of accounts) and any
  module that creates or imports partners with Colombian fiscal data
- **Suggested setup:** recommended for any Odoo instance where the
  primary operating country is Colombia, or in multicompany setups that
  include at least one Colombian legal entity

Usage
=====

This module does not impact the user interface.

It works automatically in the background: once installed, Odoo will
accept Colombian NIT and Cédula numbers without raising a validation
error when the partner's country is set to Colombia.

Changelog
=========

18.0.1.0.0 (2026-06-04)
-----------------------

- [ADD] Initial release. Added ``l10n_co_check_vat`` validator for
  Colombian NIT and Cédula numbers, accepting numeric identifiers
  between 3 and 11 digits.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-colombia/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/l10n-colombia/issues/new?body=module:%20l10n_co_check_vat%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Juan Arcos

Contributors
------------

- Juan Arcos juanparmer@gmail.com

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
   :alt: Odoo Community Association
   :target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

.. |maintainer-juanparmer| image:: https://github.com/juanparmer.png?size=40px
    :target: https://github.com/juanparmer
    :alt: juanparmer

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-juanparmer| 

This module is part of the `OCA/l10n-colombia <https://github.com/OCA/l10n-colombia/tree/18.0/l10n_co_check_vat>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
