[14.0][IMP] l10n_es_extension: add the generic non-deductible VAT family - #953
Open
eantones wants to merge 3 commits into
Open
[14.0][IMP] l10n_es_extension: add the generic non-deductible VAT family#953eantones wants to merge 3 commits into
eantones wants to merge 3 commits into
Conversation
The goods variants (bienes corrientes / bienes de inversion) and the intra-community / reverse-charge cases of the non-deductible input VAT are generic to the Spanish localization, but the official l10n_es only ships the four servicios corrientes templates (4%, 5%, 10% and 21% -- the latter under its historical xml-id p_iva0_nd). Declare the missing family here: 15 tax templates, the name overrides of the four official ones, and the mapping lines that plug them into the official intra-community and IRPF 15 fiscal positions, following the same pattern l10n_es_special_prorate uses for its prorate taxes. The records are a faithful copy of the ones oxigen_l10n_es declared until now (they were born there in 2022, but they are not client-specific). The terminal xml-id names are kept identical on purpose: the oxigen_l10n_es 14.0.1.1.0 migration relies on them to hand over the existing records in place, and the template synchronization of later Odoo versions pairs records by name.
…ition The official 'No sujeto por reglas de localizacion (TAI)' fiscal position only maps the deductible taxes to their no-sujeto counterparts; the non-deductible family must fall the same way. Add the nine mapping lines (servicios / bienes corrientes / bienes de inversion at 4%, 10% and 21%) to the official position template. Template mapping lines only reach companies through the chart wizard, so the migration materializes the missing lines of this module on the fiscal positions of existing companies, resolving the instantiated records by terminal xml-id name so a concurrent module handover of the tax custody does not break the lookup. Companies or taxes not instantiated are skipped with a log line: completing a partial chart remains the wizard's job.
4 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 14.0 #953 +/- ##
==========================================
- Coverage 51.47% 51.46% -0.01%
==========================================
Files 1182 1182
Lines 20438 20438
Branches 4299 4299
==========================================
- Hits 10520 10518 -2
- Misses 9661 9662 +1
- Partials 257 258 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
eantones
added a commit
to oxigensalud/odoo-addons
that referenced
this pull request
Jul 23, 2026
Resolve l10n_es_extension from nuobit/odoo-addons#953 while the non-deductible family handover is under review there: oxigen_l10n_es now references the family under that module, so CI needs the paired branch. The pull ref keeps resolving after the merge; the line can go back to the branch pin once #953 lands.
eantones
marked this pull request as ready for review
July 23, 2026 20:15
A company holding p_iva4_sp_ex with its two TAX repartition lines in the reverse order of the l10n_es template trips the order-sensitive core update_taxes_from_templates check at the next major-version hop: the tax is judged "different", loses its xml-id and is forked into "[old] ..." plus a fresh duplicate. The 14.0.3.1.0 migration bumps sequence=2 on the +100% TAX line so the effective (sequence, id) order matches the template (base, -100, +100) and the tax stays template-managed. It touches only the ordering field -- no amounts, accounts, tags or rows -- is idempotent and tolerant of installs without the tax.
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.
Summary
l10n_esdoes not ship: the goods variants (bienes corrientes / bienes de inversión) of the official 4%, 10% and 21% templates (the 21% keeps the official's historicalp_iva0_ndnaming) and the nine intra-community / reverse-charge non-deductible templates.l10n_es_special_prorateplugs its prorate taxes: intra-community (9 lines), IRPF 15 (6 lines) and, in the second commit, the TAI "no sujeto por reglas de localización" position (9 lines).14.0.3.0.0migration materializes this module's mapping lines on the fiscal positions of already-existing companies (template lines only flow through the chart wizard). It resolves instantiated records by terminal xml-id name, so it works during the custody handover fromoxigensalud/odoo-addons(see the paired PR) and on any generic database.The tax and mapping records are a faithful copy of the ones
oxigensalud/odoo-addons(oxigen_l10n_es) declared until now — they were born there, but they are generic to the Spanish localization, not client customizations. The terminal xml-id names are kept identical on purpose: the pairedoxigen_l10n_esmigration hands the existing records over in place, and the template synchronization of later Odoo versions pairs records by name.Pairs with oxigensalud/odoo-addons#217. This PR must be merged first (or together): the other side depends on this module declaring the family.
Test plan
pre-commit runpasses locallyl10n_es_extension, no duplicated records, TAI positions of existing companies carry the nine non-deductible lines