Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions my_compassion/controllers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
my2_user_settings,
my2_sponsorships,
my2_login,
my2_reset_password,
my2_auth_signup,
my2_event_banner,
my2_home_redirect,
Expand Down
9 changes: 8 additions & 1 deletion my_compassion/controllers/my2_donations.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

from odoo import fields, http
from odoo.http import request
from odoo.tools.translate import _

from odoo.addons.portal.controllers.portal import CustomerPortal

Expand All @@ -41,6 +42,9 @@ def my2_render_donation_details_page(self, product, **kwargs):
"product": product,
"sponsorships": sponsorships,
"donation_limits": donation_limits,
"additional_title": "{} - {}".format(
_("Gifts"), product.my_compassion_name
),
}

return request.render(
Expand Down Expand Up @@ -346,7 +350,9 @@ def my2_gifts_thank_you_page(self, **kwargs):
sale_order = request.env["sale.order"].sudo().browse(sale_order_id)
return request.render(
"my_compassion.my2_gifts_thank_you_page",
{"sale_order": sale_order},
{
"sale_order": sale_order,
},
)
return request.redirect("/my2/dashboard")

Expand Down Expand Up @@ -480,6 +486,7 @@ def my_donations(self, invoice_page=1, invoice_per_page=12, **kw):
"paid_invoices_subset": paid_invoices_data["paid_invoices_subset"],
"current_page": paid_invoices_data["current_page"],
"total_pages": paid_invoices_data["total_pages"],
"additional_title": _("My Donations"),
}
)
return request.render("my_compassion.my2_my_donations_page", values)
Expand Down
4 changes: 3 additions & 1 deletion my_compassion/controllers/my2_login.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,6 @@ def web_login(self, *args, **kw):
return request.redirect(kw.get("redirect") or "/my2/dashboard/")

# If the user is not logged in, execute the original Odoo logic for login
return super().web_login(*args, **kw)
response = super().web_login(*args, **kw)

return response
31 changes: 31 additions & 0 deletions my_compassion/controllers/my2_reset_password.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
##############################################################################
#
# Copyright (C) 2026 Compassion CH (http://www.compassion.ch)
# @author: Daniel Gergely <dgergely@compassion.ch>
#
# The licence is in the file __manifest__.py
#
##############################################################################

# -*- coding: utf-8 -*-
from odoo import http
from odoo.tools.translate import _

from odoo.addons.auth_signup.controllers.main import AuthSignupHome


class WebsitePasswordReset(AuthSignupHome):
@http.route(
"/web/reset_password", type="http", auth="public", website=True, sitemap=False
)
def web_auth_reset_password(self, *args, **kw):
"""
Adds an 'additional_title' to the password reset page.
"""
response = super().web_auth_reset_password(*args, **kw)

# Inject page title
if hasattr(response, "qcontext"):
response.qcontext["additional_title"] = _("Reset Password")

return response
3 changes: 3 additions & 0 deletions my_compassion/controllers/my2_sponsorships.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

from odoo import fields, http
from odoo.http import request
from odoo.tools.translate import _

from odoo.addons.website_sponsorship.controllers.main import WebsiteChild
from odoo.addons.website_sponsorship.models.compassion_child import ChildNotFound
Expand Down Expand Up @@ -235,6 +236,7 @@ def wizard_start(self, child, sponsorship_type="standard", **kwargs):
"my_compassion.my2_new_sponsorship_wizard_page",
{
"form_content_html": self._render_form_content(wizard),
"additional_title": _("Payment options"),
},
)

Expand Down Expand Up @@ -316,6 +318,7 @@ def wizard_thank_you(self, sponsorship_id, **kwargs):
{
"n_steps": 3,
"sponsorship": sponsorship,
"additional_title": _("Thank you"),
},
)

Expand Down
37 changes: 37 additions & 0 deletions my_compassion/i18n/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,7 @@ msgstr "Hinzufügen &amp; zur Kasse gehen"

#. module: my_compassion
#: model_terms:ir.ui.view,arch_db:my_compassion.my2_add_a_gift_page
#, python-format
msgid "Add a Gift"
msgstr "Ein Geschenk hinzufügen"

Expand Down Expand Up @@ -1976,6 +1977,7 @@ msgstr "Geschenk"

#. module: my_compassion
#: model_terms:ir.ui.view,arch_db:my_compassion.my2_gift_package_page
#, python-format
msgid "Gift Basket"
msgstr "Geschenkkorb"

Expand Down Expand Up @@ -2010,6 +2012,7 @@ msgstr "Mädchen"
#: model_terms:ir.ui.view,arch_db:my_compassion.dashboard_donations_vignette
#: model_terms:ir.ui.view,arch_db:my_compassion.my2_gifts_page
#: model_terms:ir.ui.view,arch_db:my_compassion.my_compassion_dynamic_menu
#, python-format
msgid "Give"
msgstr "Geben"

Expand Down Expand Up @@ -2056,6 +2059,8 @@ msgid "Hobbies"
msgstr "Hobbys"

#. module: my_compassion
#: model_terms:ir.ui.view,arch_db:my_compassion.http_error_custom
#: model_terms:ir.ui.view,arch_db:my_compassion.my2_dashboard_page
#: model_terms:ir.ui.view,arch_db:my_compassion.my_compassion_dynamic_menu
msgid "Home"
msgstr "Startseite"
Expand Down Expand Up @@ -2485,7 +2490,9 @@ msgid "Letter saved!"
msgstr "Brief gespeichert!"

#. module: my_compassion
#: model_terms:ir.ui.view,arch_db:my_compassion.my2_child_letters_page
#: model_terms:ir.ui.view,arch_db:my_compassion.my_compassion_dynamic_menu
#, python-format
msgid "Letters"
msgstr "Briefe"

Expand Down Expand Up @@ -2747,7 +2754,10 @@ msgid "My Country"
msgstr "Mein Land"

#. module: my_compassion
#: code:addons/my_compassion/controllers/my2_donations.py:0
#: model_terms:ir.ui.view,arch_db:my_compassion.my2_my_donations_page
#: model_terms:ir.ui.view,arch_db:my_compassion.my_account_menu
#, python-format
msgid "My Donations"
msgstr "Meine Spenden"

Expand All @@ -2767,7 +2777,9 @@ msgid "My Sponsorship"
msgstr "Meine Patenschaft"

#. module: my_compassion
#: code:addons/my_compassion/controllers/my2_children.py:0
#: model_terms:ir.ui.view,arch_db:my_compassion.my2_children_page
#, python-format
msgid "My Sponsorships"
msgstr "Meine Patenschaften"

Expand Down Expand Up @@ -3069,7 +3081,9 @@ msgid "Payment mode"
msgstr "Zahlungsart"

#. module: my_compassion
#: code:addons/my_compassion/controllers/my2_sponsorships.py:0
#: model:new.sponsorship.wizard.step,title:my_compassion.new_sponsorship_wizard_step_payment_methods
#, python-format
msgid "Payment options"
msgstr "Zahlungsoptionen"

Expand Down Expand Up @@ -3784,6 +3798,7 @@ msgstr "Textfarbe"

#. module: my_compassion
#: model_terms:ir.ui.view,arch_db:my_compassion.my2_gifts_thank_you_page
#, python-format
msgid "Thank you"
msgstr "Vielen Dank"

Expand Down Expand Up @@ -4695,6 +4710,28 @@ msgstr ""
"Jahre alt\n"
" <i class=\"icon-user01 bg-low-yellow mx-1\"/>"

#. module: my_compassion
#: code:addons/my_compassion/controllers/my_reset_password.py:0
#, python-format
msgid "Reset Password"
msgstr "Passwort zurücksetzen"

#. module: my_compassion
#: code:addons/my_compassion/controllers/my2_donations.py:0
#, python-format
msgid "Gifts"
msgstr "Geschenke"

#. module: my_compassion
#: model_terms:ir.ui.view,arch_db:my_compassion.my2_new_letter_page
msgid "New Letter"
msgstr "Neuer Brief"

#. module: my_compassion
#: model_terms:ir.ui.view,arch_db:my_compassion.my2_user_settings_page
msgid "Settings"
msgstr "Einstellungen"

#. module: my_compassion
#: model_terms:ir.ui.view,arch_db:my_compassion.my2_child_timeline_page
#: model_terms:ir.ui.view,arch_db:my_compassion.my2_children_card_component
Expand Down
39 changes: 38 additions & 1 deletion my_compassion/i18n/fr_CH.po
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,7 @@ msgstr "Ajouter au panier"

#. module: my_compassion
#: model_terms:ir.ui.view,arch_db:my_compassion.my2_add_a_gift_page
#, python-format
msgid "Add a Gift"
msgstr "Ajouter un cadeau"

Expand Down Expand Up @@ -1937,6 +1938,7 @@ msgstr "Cadeau"

#. module: my_compassion
#: model_terms:ir.ui.view,arch_db:my_compassion.my2_gift_package_page
#, python-format
msgid "Gift Basket"
msgstr "Panier cadeau"

Expand Down Expand Up @@ -1971,6 +1973,7 @@ msgstr "Fille"
#: model_terms:ir.ui.view,arch_db:my_compassion.dashboard_donations_vignette
#: model_terms:ir.ui.view,arch_db:my_compassion.my2_gifts_page
#: model_terms:ir.ui.view,arch_db:my_compassion.my_compassion_dynamic_menu
#, python-format
msgid "Give"
msgstr "Donner"

Expand Down Expand Up @@ -2017,6 +2020,8 @@ msgid "Hobbies"
msgstr "Hobbies"

#. module: my_compassion
#: model_terms:ir.ui.view,arch_db:my_compassion.http_error_custom
#: model_terms:ir.ui.view,arch_db:my_compassion.my2_dashboard_page
#: model_terms:ir.ui.view,arch_db:my_compassion.my_compassion_dynamic_menu
msgid "Home"
msgstr "Accueil"
Expand Down Expand Up @@ -2445,7 +2450,9 @@ msgid "Letter saved!"
msgstr "Lettre sauvegardée!"

#. module: my_compassion
#: model_terms:ir.ui.view,arch_db:my_compassion.my2_child_letters_page
#: model_terms:ir.ui.view,arch_db:my_compassion.my_compassion_dynamic_menu
#, python-format
msgid "Letters"
msgstr "Lettres"

Expand Down Expand Up @@ -2701,7 +2708,10 @@ msgid "My Country"
msgstr "Mon pays"

#. module: my_compassion
#: code:addons/my_compassion/controllers/my2_donations.py:0
#: model_terms:ir.ui.view,arch_db:my_compassion.my2_my_donations_page
#: model_terms:ir.ui.view,arch_db:my_compassion.my_account_menu
#, python-format
msgid "My Donations"
msgstr "Mes dons"

Expand All @@ -2721,7 +2731,9 @@ msgid "My Sponsorship"
msgstr "Mon parrainage"

#. module: my_compassion
#: code:addons/my_compassion/controllers/my2_children.py:0
#: model_terms:ir.ui.view,arch_db:my_compassion.my2_children_page
#, python-format
msgid "My Sponsorships"
msgstr "Mes parrainages"

Expand Down Expand Up @@ -3023,7 +3035,9 @@ msgid "Payment mode"
msgstr "Mode de paiement"

#. module: my_compassion
#: code:addons/my_compassion/controllers/my2_sponsorships.py:0
#: model:new.sponsorship.wizard.step,title:my_compassion.new_sponsorship_wizard_step_payment_methods
#, python-format
msgid "Payment options"
msgstr "Options de paiement"

Expand Down Expand Up @@ -3753,6 +3767,7 @@ msgstr "Couleur du texte"

#. module: my_compassion
#: model_terms:ir.ui.view,arch_db:my_compassion.my2_gifts_thank_you_page
#, python-format
msgid "Thank you"
msgstr "Merci"

Expand Down Expand Up @@ -4639,6 +4654,28 @@ msgid ""
" <i class=\"icon-user01 bg-low-yellow mx-1\"/>"
msgstr "ans <i class=\"icon-user01 bg-low-yellow mx-1\"/>"

#. module: my_compassion
#: code:addons/my_compassion/controllers/my_reset_password.py:0
#, python-format
msgid "Reset Password"
msgstr "Réinitialiser votre mot de passe"

#. module: my_compassion
#: code:addons/my_compassion/controllers/my2_donations.py:0
#, python-format
msgid "Gifts"
msgstr "Cadeaux"

#. module: my_compassion
#: model_terms:ir.ui.view,arch_db:my_compassion.my2_new_letter_page
msgid "New Letter"
msgstr "Nouvelle lettre"

#. module: my_compassion
#: model_terms:ir.ui.view,arch_db:my_compassion.my2_user_settings_page
msgid "Settings"
msgstr "Paramètres"

#. module: my_compassion
#: model_terms:ir.ui.view,arch_db:my_compassion.my2_child_timeline_page
#: model_terms:ir.ui.view,arch_db:my_compassion.my2_children_card_component
Expand All @@ -4648,4 +4685,4 @@ msgstr "En attente d'une reprise de parrainage"
#. module: my_compassion
#: model_terms:ir.ui.view,arch_db:my_compassion.my2_child_timeline_page
msgid "Write a last letter"
msgstr "Écrire une dernière lettre"
msgstr "Écrire une dernière lettre"
Loading
Loading