Skip to content

[18.0][FIX] ptplus_accounting: keep the taxonomy remap versioned 17.0.5.1.0#1

Open
eantones wants to merge 1 commit into
18.0from
18.0-fix-ptplus_accounting-taxonomy_remap_version
Open

[18.0][FIX] ptplus_accounting: keep the taxonomy remap versioned 17.0.5.1.0#1
eantones wants to merge 1 commit into
18.0from
18.0-fix-ptplus_accounting-taxonomy_remap_version

Conversation

@eantones

@eantones eantones commented Jul 19, 2026

Copy link
Copy Markdown
Member

The 5.1.0 functional release replaced the account-taxonomy model and ships a post-migration that remaps account.account.l10n_pt_taxonomy_id to the new catalog. On this branch the script is published under 18.0.5.1.0 — byte-identical to the one the 17.0 branch ships as 17.0.5.1.0 (snapshot timeline: absent on 2026-01-08, present since 2026-04-06).

Versioned 18.0.5.1.0 it re-runs for every database coming from 17.0, where the remap already happened: accounts point at new-model rows, account_prefix reads NULL, the f-string interpolates the literal None, the (prefix, reference, code) lookup matches nothing, and the wipe-on-no-match branch erases the taxonomy. On a real 14→18 chain this erases the SAF-T taxonomy from every mapped account at the 17→18 hop (No taxonomies match found once per account, logger root).

Fix: move the script back under its original version 17.0.5.1.0, exactly like the sibling 17.0.5.0.1 pre-migration already kept in this branch. Odoo's migration versioning then does the guarding natively — direct jumps from a pre-5.1.0 series still run it once; databases that already ran it at 17.0 skip it. No content change.

Validation on the next full rehearsal: zero No taxonomies match found at 17→18 and account-taxonomy count POST == PRE.

Note: the vendor mirror is bot-published with force-pushed snapshots per release — this branch must be re-parented if a new vendor snapshot lands before the final run. Same fix will be proposed to Exo.

@eantones eantones added the local-only Fork-only fix, not meant to be upstreamed as-is label Jul 19, 2026
….5.1.0

Functional release 5.1.0 replaced the account-taxonomy model (prefixes
moved to l10n_pt_account_taxonomy_prefix) and ships a post-migration that
remaps account.account.l10n_pt_taxonomy_id from the old rows to the new
catalog. On this branch that script was published under 18.0.5.1.0 — the
same byte-identical file the 17.0 branch ships as 17.0.5.1.0. It first
appeared in the 2026-04-06 snapshot; the 2026-01-08 snapshot only had the
correctly kept 17.0.5.0.1 pre-migration.

Versioned 18.0.5.1.0 it runs AGAIN for every database coming from 17.0
(installed 17.0.5.1.0 < 18.0.5.1.0), where accounts already point at
new-model rows: account_prefix reads NULL, the f-string interpolates the
literal None, the (prefix, reference, code) lookup matches nothing, and
the no-match branch wipes l10n_pt_taxonomy_id — erasing the SAF-T
taxonomy from every mapped account.

Move the script back under its original version, like the sibling
17.0.5.0.1 kept in this branch: databases jumping straight from a
pre-5.1.0 series still run it once; databases that already ran it at 17.0
skip it. No content change.
@eantones
eantones force-pushed the 18.0-fix-ptplus_accounting-taxonomy_remap_version branch from d71dfcd to 5e8bc0a Compare July 20, 2026 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

local-only Fork-only fix, not meant to be upstreamed as-is

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant