Skip to content

[FIX] my_compassion: login and signup views on every MyCompassion website - #444

Open
davidwul wants to merge 1 commit into
18.0from
18.0-my2-views-every-website
Open

davidwul wants to merge 1 commit into
18.0from
18.0-my2-views-every-website

Conversation

@davidwul

@davidwul davidwul commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Found during the review of #443: the MyCompassion PL website showed Odoo's stock login and signup pages. Its signup is open (b2c) and asked no consent at all.

Cause

Nine views of my_compassion are bound to my_compassion.my2_website (website_id= in their XML):

  • the login layout and form;
  • the signup fields, which carry the acceptance_full consent checkbox, and the signup form;
  • the password reset and change pages;
  • the contact us page;
  • the two child protection charter pages.

A second MyCompassion website, like Poland's, does not get them.

Fix

_configure_my_compassion_portal, already run when a MyCompassion website is created, by the install hook and by migrations, now copies these views to every other MyCompassion website:

  • only the module's own views (xml_id == key), not the copy-on-write copies of my2_website;
  • not other modules' views bound to it, such as my_compassion_switzerland.my2_signup_form_inherit_ch (the Swiss registration guide);
  • each copy keeps the view's key and goes under the website's own version of the parent view when there is one. A module update then refreshes it like a copy-on-write view, as long as nobody edits it in the website builder.

The post-migration 18.0.1.0.34 runs it on existing databases.

Tests

  • New TestMy2WebsiteViews: a second MyCompassion website gets the nine copies once, with the same key and parent, and its /web/signup shows the consent checkbox.
  • Checked by hand on a local copy of the PL website after the upgrade:

Note

The version is 18.0.1.0.34, because #443 takes 18.0.1.0.33. Whichever is merged second gets a trivial conflict on the manifest's version line.

Deploy: -u my_compassion.

🤖 Generated with Claude Code

…site

The login, signup (with its consent checkbox), password, contact us and
child protection charter views of the module are bound to the MyCompassion
website: a second one, like Poland's, showed Odoo's stock pages, and its
open signup asked no consent. Each MyCompassion website now gets a copy of
them, with the same key so that module updates refresh it.

Assisted-by: claude-opus-5-5, medium, claude-code
@davidwul
davidwul force-pushed the 18.0-my2-views-every-website branch from 0dad0d0 to 17aef41 Compare November 4, 2026 17:04
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.

1 participant