[T3456] Follow the render's language, not the partner's stored one - #2153
Open
danpa32 wants to merge 1 commit into
Open
[T3456] Follow the render's language, not the partner's stored one#2153danpa32 wants to merge 1 commit into
danpa32 wants to merge 1 commit into
Conversation
_compute_address (salutation title, e.g. Mme/Frau/Signora) and
_compute_date_communication (the letter's date line) both derived
their language from partner.lang regardless of what language the
document is actually being rendered in - producing the same class of
mismatch fixed on the report_compassion side of this ticket (e.g. a
French tax receipt still showing "Frau" and a German-formatted date).
Read the language from context instead, falling back to partner.lang
only when no context language is set, and mark both computes
@api.depends_context("lang") so they aren't cached across
different-language renders of the same partner.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This was referenced Sep 10, 2026
|
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.
T3456 — Fix failing quality test: MyCompassion: donations
Follow-up to T3416-tax-receipt-donation-history/T3441-tax-receipt-signature-lang.
compassion-switzerland,compassion-website,compassion-modulesRelated PR
What changed
<img>had no height/width cap (width: 40%, ~76mm) — capped towidth: 45mm(matchinganniversary_card.xml's own signature usage). Margin-left adjusted afterward too (was-15mm, pushing it into the page margin per user feedback - see below)..body_text(the letter-body box) is hardcoded tomin-height: 120mmwhenever a signature is shown, forcing a large empty gap below "Best regards" even for the tax receipt's few short paragraphs. Added acompact_bodyflag (set only intax_receipt.xml) that skips this min-height, without touching the other, longer communications that share this template and rely on the fixed height.tax_receipt_content's four stacked<br/>before the intro heading down to one.How to test manually
/my2/donations): download the tax receipt while browsing in different interface languages — the whole PDF (logo, salutation, date, body text, signature) should consistently follow whichever language you're browsing in.report_compassioncan be upgraded again: download a gift payment slip for a sponsored child while browsing in a language different from the partner's stored profile language — labels and the child/gift communication line should match.-u --i18n-overwritesync — or.powas already correct so a normal deploy pipeline that runs migrations properly should pick it up fine).