Repository navigation
Conversation
Improve error handling to avoid crash when Internet connectivity is down Read country code from VIES, not from VAT number No update when VAT number is invalid Improve tests
Currently translated at 100.0% (5 of 5 strings) Translation: partner-contact-14.0/partner-contact-14.0-partner_data_vies_populator Translate-URL: https://translation.odoo-community.org/projects/partner-contact-14-0/partner-contact-14-0-partner_data_vies_populator/fr/
- Bump version to 19.0.1.0.0 - Use lazy %s logging interpolation instead of f-strings - Use env-based translation (self.env._) per Odoo 19 conventions - Regenerate README and index.html for 19.0 No API changes needed: _split_vat, stdnum.eu.vat.check_vies and the res.partner onchange mechanism are unchanged in 19.0. Assisted-by: Devin:SWE-2 High
|
The following commit authors need to sign the Contributor License Agreement: |
… address VIES can return a valid VAT entry with a name but no address (or an empty one). _parse_vies_address was called unconditionally in that case, raising AttributeError on None.split() and killing the onchange. Guard on falsy address values, which also avoids overwriting street with an empty string. Assisted-by: Devin:SWE-2 High
dreispt
force-pushed
the
19.0-mig-partner_data_vies_populator
branch
3 times, most recently
from
November 21, 2026 11:16
0b2778c to
177b847
Compare
The VIES lookup only ran from the form onchange, so imports, RPC and other integration flows never populated partner data. Run it from create and write as well, guarded against recursion, and notify the user with a toast on each lookup result. Normalize the VAT through base_vat._run_vat_checks first: unprefixed numbers for EU prefix countries get their country prefix, and malformed or non-EU numbers are skipped silently instead of warning on every partner save. Assisted-by: Devin:SWE-2 High
VIES returns requestDate as an xsd:date carrying a timezone offset (e.g. '2026-11-20+01:00'), which isodate.parse_date rejects. zeep logs an "Error during xml -> python translation" error on every VIES call before falling back to the raw string. The previous workaround patched isodate only inside the test suite; apply it in the module instead and drop the duplicate from the tests. Declare zeep as an explicit dependency, since it is the SOAP client python-stdnum uses for the VIES API calls. Assisted-by: Devin:SWE-2 High
dreispt
force-pushed
the
19.0-mig-partner_data_vies_populator
branch
from
November 21, 2026 11:19
177b847 to
5895803
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migration of
partner_data_vies_populatorto 19.0, carrying forward the module history from #2373 (18.0 migration).Changes
19.0.1.0.0%slogging interpolation instead of f-stringsself.env._) per Odoo 19 linting conventionsindex.htmlfor 19.0Post-migration changes
addressunset;_parse_vies_addresscrashed onNone.split(). Guard falsy and"---"addresses.create/writetoo, guarded against recursion via theno_vies_populatecontext key, and show a toast notification on each lookup result (success / no data / failure). The VAT is normalized throughbase_vat._run_vat_checksfirst: unprefixed numbers for EU prefix countries get their country prefix, and malformed or non-EU numbers are skipped silently instead of warning on every partner save.requestDateas anxsd:datecarrying a timezone offset (e.g.2026-11-20+01:00), whichisodate.parse_daterejects; zeep logged "Error during xml -> python translation" on every call. Apply the tolerant parse in the module (the workaround previously lived only in tests) and declarezeep, the SOAP client python-stdnum uses for the VIES calls, as an explicit dependency.Compatibility notes
No API changes were needed:
res.partner._split_vat,stdnum.eu.vat.check_vies, and the onchange mechanism are unchanged in 19.0.Odoo 19's
base_vatnow performs its own native VIES validation through IAP (_check_vies_iap/vies_valid). This module remains complementary — it populates name/address/country on VAT change, which the native check does not do. In tests, the native IAP check attempts are blocked by the test HTTP layer and logged asVIES check: call to IAP failed; they are non-fatal and all tests pass.Tests
0 failed, 0 error(s) of 9 testson Odoo 19.0 (real database,base_vatinstalled)Assisted-by: Devin:SWE-2 High