[16.0][ADD] pms,pms_l10n_es: res.partner.get_vat()#397
Merged
Conversation
Add a get_vat() method on res.partner returning the VAT field. This is a template helper meant to be overridden by localization modules to return the country-specific fiscal identifier when the partner is identified by a non-VAT document. PMS deployments often invoice non-VAT-registered guests (passport, residence permit, etc.) and need a single canonical entry point so reports, exporters and APIs do not duplicate the resolution logic.
Override res.partner.get_vat() to return aeat_identification when aeat_identification_type is set, falling back to the parent VAT otherwise. Mirrors the priority of l10n_es_aeat _parse_aeat_vat_info, where alternative AEAT identifications (passport, residence permit, other document) supersede the VAT field for fiscal reporting.
e59df7c to
08add7f
Compare
DarioLodeiros
approved these changes
May 11, 2026
Member
|
/ocabot merge minor |
Contributor
|
On my way to merge this fine PR! |
Contributor
|
It looks like something changed on |
Contributor
|
Congratulations, your PR was merged at 45cdcd5. Thanks a lot for contributing to OCA. ❤️ |
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.
Add
res.partner.get_vat()onpmsreturning the VAT field, with an override inpms_l10n_esthat returnsaeat_identificationwhenaeat_identification_typeis set. Mirrors the priority ofl10n_es_aeat._parse_aeat_vat_info.Single canonical entry point for PMS consumers (reports, exporters, FastAPI schemas) that need the partner fiscal identifier without hardcoding the VAT/AEAT dual.