Skip to Content

PMIS VAT autocomplete

Beta License: LGPL-3 Version: 18.0

This addon fills contact details from the European Commission's VIES service when a user changes a VAT number on a contact form. It extends base_vat; it does not perform automatic lookups during ordinary ORM creation or writes.

Requirements

The lookup uses suds and the optional stdnum.eu.vat validator. suds is imported unconditionally, so it must be available to load the addon. The repository's requirements.txt lists suds-py3 and python-stdnum; the manifest declares only python-stdnum. Without the validator, the onchange leaves contact details unchanged. A live lookup requires access to VIES; the cached SOAP client uses a five-second timeout. Service failures are logged and leave the form usable.

Usage

  1. Open a contact in Contacts and enter a VAT number.

  2. For a supported country prefix and a locally valid number longer than five characters, the onchange requests the registered name and address.

  3. Review the returned address before saving.

The returned name fills an empty contact name only. A placeholder address (---) preserves the existing address. Otherwise, the returned address replaces address fields, clearing fields that the parser cannot populate. Review existing contact addresses carefully before saving.

Address handling

The parser includes an Italian format and generic numeric postal-code handling. Swedish and Northern Irish branches compare the response country code to lowercase se and xi without normalizing it. Uppercase SE and XI responses therefore use the generic fallback instead of those special formats. Supported prefixes include the EU member-state codes configured in the module and XI; not every address format is guaranteed to parse correctly.

VIES availability and response quality are external dependencies. Lookup failure does not block saving a contact, and this addon is not a substitute for manual review or a persisted VAT-validation audit. Automated tests use simulated responses rather than contacting VIES.

Bug Tracker

Bugs are tracked on PMISuite Repository Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback.

Credits

Authors

Contributors

Maintainers

LUXIM MATMOZ

Current maintainer:

sysadminmatmoz

Luxim is an independent R&D and deployment company focused on solving complex problems in the Odoo ecosystem.

Odoo Community Association

Luxim is an active member of OCA (Odoo Community Association).