[19.0][OU-FIX] loyalty: pre-migrate stale _get_mail_partner in stored mail.template.lang#5666
Draft
dnplkndll wants to merge 1 commit into
Draft
[19.0][OU-FIX] loyalty: pre-migrate stale _get_mail_partner in stored mail.template.lang#5666dnplkndll wants to merge 1 commit into
_get_mail_partner in stored mail.template.lang#5666dnplkndll wants to merge 1 commit into
Conversation
…l.template.lang
The 18.0 loyalty `mail_template_gift_card` and `mail_template_loyalty_card`
both store `lang` as `{{ object._get_mail_partner().lang }}`. The method
was renamed to `_get_mail_author` in 19.0 — when the 19.0 module update
re-renders `lang` during data load, it raises AttributeError and aborts
the migration at `loyalty/data/mail_template_data.xml:3` before the
existing post-migration (which nulls `lang`) ever runs.
Pre-migration is the only safe place to fix this; rename in place via
REPLACE so the rendering check passes and the existing post-migration
(or any user customization of `lang`) keeps working.
86d4308 to
f7abc74
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.
Follow-up to #5629 (merged 2026-05-15). That PR's
post-migration.pyisthe correct intent but the wrong phase: the data-load template render
aborts before post-migration runs, so the existing fix never actually
fires. Move the cleanup to pre-migration via SQL
REPLACE, which alsopreserves any user customization of
langthat the post-migration'sunconditional
lang=Falsewould otherwise discard.