Skip to content

[IMP] my_compassion, theme_compassion_2025: terms and conditions apart from the privacy policy - #443

Merged
NoeBerdoz merged 3 commits into
18.0from
18.0-legal-terms-page
Nov 4, 2026
Merged

NoeBerdoz merged 3 commits into
18.0from
18.0-legal-terms-page

Conversation

@davidwul

@davidwul davidwul commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Requested by PayU to validate the production account of Compassion Poland: PayU wants the terms and conditions (regulamin) and the privacy policy (polityka prywatności) as two separate documents, instead of the single /legal page.

  • New translatable website field Terms and Conditions URL (terms_url), next to Privacy Policy URL in the Footer tab.
  • When it is set:
    • the footer shows two links, "Terms and Conditions" and "Privacy Policy", instead of "Policies";
    • the consent checkboxes of the sponsorship fast checkouts, the donation email step and acceptance_full read "I accept the terms and conditions and the privacy policy", with both links;
    • the secure checkout block of the gift basket links both.
  • New route /legal/terms leads to the terms. /legal still leads to the privacy policy, so existing links and sent e-mails keep working. /terms is not used because Odoo's account module already has it.
  • A website without a Terms and Conditions URL (the Swiss and Nordic ones) keeps everything as it is today.
  • Polish translations: new terms in my_compassion/i18n/pl_PL.po, and a new theme_compassion_2025/i18n/pl_PL.po for the footer.

The two pages and their URLs are created on the PL website by odoo_shell/legal_pages_compassion_poland.py in CompassionCH/tools#31.

Deploy: -u theme_compassion_2025,my_compassion, then run the script.

Tests: new TestLegalRoutes, 2/2 passing. Checked by hand on a local copy of the PL website:

  • /legal and /legal/terms redirect to the two pages;
  • the footer and the consent labels show in Polish.

Locally, TestPublicFundDonation still fails on things unrelated to this change: a test user in German, and a column missing because the local database is behind. None of these tests uses a terms URL.

🤖 Generated with Claude Code

…t from the privacy policy

PayU asked for the terms and conditions and the privacy policy apart, to
validate the production account of Compassion Poland. A website with a
Terms and Conditions URL links both in its footer, its consent checkboxes
and its gift basket; /legal/terms leads to them, /legal still to the privacy
policy. A website without it keeps its single legal link.

Assisted-by: claude-opus-5-5, medium, claude-code

@NoeBerdoz NoeBerdoz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review

Thanks David, this is a clean change. A website without a terms URL renders exactly as before, and the Polish one gets two separate documents everywhere a donor accepts them. I reviewed it together with the legal pages script of CompassionCH/tools#31, which switches it on.

What we tested

  • The deploy path, on a fresh database. Install with 18.0, two MyCompassion websites with the theme (a Polish one whose footer was edited in the builder, and a Swiss-like one), then -u theme_compassion_2025,my_compassion with this PR, then the script twice. The upgrade is clean, the script can run again safely, and both pages are published and indexed.
  • Routes. On the PL site /legal and /legal/terms answer 302 to the right page, also with the /pl/ and /en/ prefixes. A site without a terms URL sends /legal/terms to /legal. local=False only ever reads an admin-set value, so it is not an open redirect.
  • Labels. The email step, the gift basket block, both fast checkouts and acceptance_full show "Akceptuję regulamin oraz politykę prywatności…" in Polish and the new English text, the checkbox stays required, and the Swiss-like site is unchanged. The Polish msgids match what Odoo extracts from the templates.
  • Tests. TestLegalRoutes passes. The whole my_compassion suite fails on exactly the same tests as plain 18.0 (environment), so this PR adds none.

Open points

Levels: Must fix (money or security) · Before go-live (before real donors use it) · Should fix · Suggestion

  1. Before go-live: A footer edited in the website builder does not get the new links (thread on footer.xml). A read-only check on production before the deploy settles it.
  2. Should fix: The consent links open in the same tab (thread on the fast checkout).
  3. Suggestion: The texts around the label still speak of the privacy notice only (thread on acceptance_full).

Deploy note

terms_url is a new column on website, and -u my_compassion does not upgrade the theme it depends on. Both databases need -u theme_compassion_2025,my_compassion, the Nordic one too when it takes this code, or every website request fails on the missing column.

Not code: the two texts, before PayU looks again

PayU lists what it checks on the site in Wymagania dla Twojej strony. Compared with the texts in the script, these look missing. Compassion Poland owns the texts, so these are questions for them:

  • Regulamin: the KRS number, a phone number and an e-mail (the header has the address, NIP and REGON); a complaints procedure (how, where, and the deadline for the answer); the return rule: PayU expects either the 14 days, or a sentence saying donations cannot be returned, with the reason; when a donation or a sponsorship is booked; and the recurring payments: sponsorships are charged monthly on a saved card, so the amount, the frequency and how to stop them.
  • Privacy policy: name PayU S.A. as a recipient (the guide asks for it explicitly); legal bases per purpose and how long data is kept; a cookies section (my2 does set cookies).
  • § 1: "Darowizny przekazywane są dobrowolnie oraz prawne…": "prawne" looks like a typo.
  • A question for PayU: its compliance page asks merchants who keep the buyer on their own page to show PayU's information clause ("The controller of your personal data is PayU S.A. …") and "By paying you accept PayU Payment Terms", and to send help@payu.pl a link and a screenshot. Our card form is PayU's Secure Form embedded in our page, so it is worth asking PayU whether this applies to us.

Verdict

No blocker in the code. Please run the footer check before the deploy; the new-tab links are a quick fix.

Assisted-by: claude-opus-5-5, xhigh, claude-code
Assisted-by: gpt-6-astra, high, codex
Assisted-by: claude-opus-5-5, medium, claude-code

Comment thread theme_compassion_2025/views/footer.xml Resolved
- The consent links open in a new tab: a click inside the checkbox label
  left the checkout.
- With a Terms and Conditions URL, the signed agreement of the account pages
  links both documents, and the consent error messages name both.

Assisted-by: claude-opus-5-5, medium, claude-code
@davidwul

davidwul commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the review, addressed in d2615c3:

  1. Footer edited in the builder: the legal pages script (CompassionCH/tools#31, c563cfd) now warns, for the PL website, about any copy with arch_updated among the footer and the five consent views. I'll run the read-only check on production before the deploy.
  2. The consent links of the terms branch (both fast checkouts, the gift package donor form, acceptance_full) open in a new tab with rel="noopener".
  3. With a terms URL, the "(view agreement)" links of the user settings and personal info pages link both documents, and the two consent error messages name the terms and conditions too. Translated in Polish.

The texts go to Compassion Poland with your list, including the question about PayU's information clause.

@NoeBerdoz

Copy link
Copy Markdown
Contributor

Correction to three details of the review body:

  • Routes: /pl/legal and /pl/legal/terms first answer 303 (Odoo drops the prefix of the default language), then 302 to the page. Only /en/ answers 302 directly. The final page is right in every case.
  • Labels: the gift basket's secure-checkout block shows the two links "Regulamin | Polityka prywatności", not the consent sentence.
  • PayU checklist: the cookies section is not on PayU's list. Polish law requires it (art. 399 of the Prawo komunikacji elektronicznej).

Assisted-by: claude-opus-5-5, xhigh, claude-code

@NoeBerdoz NoeBerdoz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Second review

Thanks David. Two of the three points of the first review are fixed in d2615c3: the consent links open in a new tab, and the texts around the label follow the terms URL (the "(view agreement)" links lead to both documents, the fast checkout's message names both, and the donation one asks to accept "the conditions below"). The Polish msgids match what Odoo extracts from the templates. The first point, the edited footer, is answered by the script's new warning, reviewed on CompassionCH/tools#31.

What we tested

  • Browser, on a fresh database with a PL and a Swiss-like website: the email step and the gift basket donor form in Polish and English (links in a new tab, checkbox still required, the error message after a post without the consent), and the user settings page of a signed and of an unsigned user. Both fast checkouts were rendered from a shell, since the database has no child. The Swiss-like site is unchanged everywhere.
  • Tests. The whole my_compassion and theme_compassion_2025 suites fail on exactly the same 108 tests at 18.0 and at this head (environment: no child, inactive EUR), so the fix adds none.

Open points

Levels: Must fix (money or security) · Before go-live (before real donors use it) · Should fix · Suggestion

  1. Should fix: On a website with a terms URL, the new alert hides the PayU module's "name on the card" message (thread on my2_gift_package.xml:158).
  2. Suggestion: The two links under the payment form still open in the same tab (thread on my2_gift_package.xml:365).

Outside this PR

On the PL test website, /web/signup shows no consent checkbox: the signup views that carry acceptance_full are bound to the Swiss and the default websites. This is older than this PR, and worth checking on production before Polish donors create accounts.

Verdict

Nearly there. Point 1 is a small change, and it matters as soon as this PR is deployed where the PayU module is installed.

Assisted-by: claude-opus-5-5, xhigh, claude-code
Assisted-by: gpt-6-astra, high, codex
Assisted-by: claude-opus-5-5, medium, claude-code

- A single donor_error alert, whose text follows the terms URL: modules insert
  their own alerts before it (the PayU module's name on the card).
- The links under the payment form open in a new tab; rel=noopener on the
  agreement links.
@davidwul

davidwul commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

Thanks, second review addressed in 7437313:

  1. A single t-elif="donor_error" alert, whose text follows the terms URL. The PayU module's name alert is inserted before it again. Covered by test_name_message_next_to_a_terms_url in [IMP] my_compassion_payment_payu_gpo: ask the first and last name on the card apart #442.
  2. The two links under the payment form open in a new tab. rel="noopener" is added on the agreement links.

The legal pages script (CompassionCH/tools#31, f25fd7f) now checks each copy's content for website.terms_url, gives the remedy that fits each kind of view, and covers the two agreement views.

Outside this PR: confirmed locally. The PL website's /web/signup has no consent checkbox. signup_sponsor is bound to the Swiss default website, and nine MyCompassion views (login, signup fields and form, reset and change password, contact us, child protection charter) are bound to my2_website only. The PL website therefore gets the stock pages, with signup open (b2c). I'll handle it in a separate PR.

@NoeBerdoz NoeBerdoz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Third review

Thanks David, both points of the second review are fixed in 7437313. A single t-elif="donor_error" alert switches its text on the terms URL, so the PayU module's name message is inserted before it again, and both msgids, with their Polish translations, are unchanged. The two links under the payment form open in a new tab.

What we tested

On a fresh database, this PR merged with #442 and CompassionCH/compassion-accounting#298: test_name_message_next_to_a_terms_url passes, with a terms URL on the website and the name missing. The my_compassion failures in that run all come from the fresh database (no child, no active payment method).

Open point

Levels: Must fix (money or security) · Before go-live (before real donors use it) · Should fix · Suggestion

  1. Suggestion: Two (view agreement) links still lack rel="noopener" (thread on my_account_personal_info.xml:142).

Verdict

Approved.

Assisted-by: claude-opus-5-5, high, claude-code
Assisted-by: claude-opus-5-5, medium, claude-code
Assisted-by: gpt-6-astra, high, codex
Assisted-by: Qwen3.8-Flash-Next-GGUF UD-IQ4_XS, high, pi

@NoeBerdoz
NoeBerdoz merged commit dbb6d3d into 18.0 Nov 4, 2026
1 check passed
@NoeBerdoz
NoeBerdoz deleted the 18.0-legal-terms-page branch November 4, 2026 10:17
NoeBerdoz added a commit that referenced this pull request Nov 9, 2026
Conflicts resolved:
- my2_new_sponsorship_wizard.xml (split by this branch): the terms and
  conditions consent label from #443 goes into standard_step.xml and
  wap_step.xml.
- my2_new_sponsorship_details.xml: this branch's layout, with #438's
  my2_new_sponsorship_details_extra_fields hook after the name row and its
  _my2_details_mandatory() guard on the "Do this later" button.
- de_DE, fr_CH, it_IT .po: 18.0's side of the single conflicting hunk.

Assisted-by: claude-opus-5-5, xhigh, claude-code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants