[OU-FIX] loyalty: pre-migrate stale _get_mail_partner in stored mail.template.lang#78
Open
dnplkndll wants to merge 1 commit into
Open
[OU-FIX] loyalty: pre-migrate stale _get_mail_partner in stored mail.template.lang#78dnplkndll wants to merge 1 commit into
_get_mail_partner in stored mail.template.lang#78dnplkndll wants to merge 1 commit into
Conversation
4a89ab6 to
46ce1c3
Compare
…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.
46ce1c3 to
3ff9c2e
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 work on the ledoent/OpenUpgrade fork (internal review). Rebased onto current 19.0.
The 18.0 loyalty
mail_template_gift_cardandmail_template_loyalty_cardboth store
langas{{ object._get_mail_partner().lang }}. The methodwas renamed to
_get_mail_authorin 19.0 — when the 19.0 module updatere-renders
langduring data load, it raises AttributeError and abortsthe migration at
loyalty/data/mail_template_data.xml:3before theexisting 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.