diff --git a/my_compassion/controllers/__init__.py b/my_compassion/controllers/__init__.py index 28637148..d933d72a 100644 --- a/my_compassion/controllers/__init__.py +++ b/my_compassion/controllers/__init__.py @@ -20,6 +20,7 @@ my2_user_settings, my2_sponsorships, my2_login, + my2_reset_password, my2_auth_signup, my2_event_banner, my2_home_redirect, diff --git a/my_compassion/controllers/my2_donations.py b/my_compassion/controllers/my2_donations.py index a7edafff..10a79503 100644 --- a/my_compassion/controllers/my2_donations.py +++ b/my_compassion/controllers/my2_donations.py @@ -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 @@ -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( @@ -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") @@ -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) diff --git a/my_compassion/controllers/my2_login.py b/my_compassion/controllers/my2_login.py index 3cb1d948..2e3673ed 100644 --- a/my_compassion/controllers/my2_login.py +++ b/my_compassion/controllers/my2_login.py @@ -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 diff --git a/my_compassion/controllers/my2_reset_password.py b/my_compassion/controllers/my2_reset_password.py new file mode 100644 index 00000000..2ff21fb5 --- /dev/null +++ b/my_compassion/controllers/my2_reset_password.py @@ -0,0 +1,31 @@ +############################################################################## +# +# Copyright (C) 2026 Compassion CH (http://www.compassion.ch) +# @author: Daniel Gergely +# +# 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 diff --git a/my_compassion/controllers/my2_sponsorships.py b/my_compassion/controllers/my2_sponsorships.py index 61cf6a2c..b52f141c 100644 --- a/my_compassion/controllers/my2_sponsorships.py +++ b/my_compassion/controllers/my2_sponsorships.py @@ -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 @@ -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"), }, ) @@ -316,6 +318,7 @@ def wizard_thank_you(self, sponsorship_id, **kwargs): { "n_steps": 3, "sponsorship": sponsorship, + "additional_title": _("Thank you"), }, ) diff --git a/my_compassion/i18n/de.po b/my_compassion/i18n/de.po index 2a4bfe82..bf2bb85e 100644 --- a/my_compassion/i18n/de.po +++ b/my_compassion/i18n/de.po @@ -845,6 +845,7 @@ msgstr "Hinzufügen & 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" @@ -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" @@ -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" @@ -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" @@ -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" @@ -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" @@ -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" @@ -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" @@ -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" @@ -4695,6 +4710,28 @@ msgstr "" "Jahre alt\n" " " +#. 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 diff --git a/my_compassion/i18n/fr_CH.po b/my_compassion/i18n/fr_CH.po index 0694f8cb..d16b539b 100644 --- a/my_compassion/i18n/fr_CH.po +++ b/my_compassion/i18n/fr_CH.po @@ -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" @@ -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" @@ -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" @@ -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" @@ -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" @@ -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" @@ -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" @@ -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" @@ -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" @@ -4639,6 +4654,28 @@ msgid "" " " msgstr "ans " +#. 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 @@ -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" \ No newline at end of file +msgstr "Écrire une dernière lettre" diff --git a/my_compassion/i18n/it.po b/my_compassion/i18n/it.po index 464e7d0b..71873e88 100644 --- a/my_compassion/i18n/it.po +++ b/my_compassion/i18n/it.po @@ -852,6 +852,7 @@ msgstr "Aggiungi e procedi al checkout" #. module: my_compassion #: model_terms:ir.ui.view,arch_db:my_compassion.my2_add_a_gift_page +#, python-format msgid "Add a Gift" msgstr "Aggiungi un regalo" @@ -1995,6 +1996,7 @@ msgstr "Regalo" #. module: my_compassion #: model_terms:ir.ui.view,arch_db:my_compassion.my2_gift_package_page +#, python-format msgid "Gift Basket" msgstr "Carrello per i regali" @@ -2029,6 +2031,7 @@ msgstr "Bambina" #: 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 "Dona" @@ -2075,6 +2078,8 @@ msgid "Hobbies" msgstr "Hobby" #. 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 "Home" @@ -2505,7 +2510,9 @@ msgid "Letter saved!" msgstr "Lettera salvata!" #. 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 "Lettere" @@ -2766,7 +2773,10 @@ msgid "My Country" msgstr "Il mio Paese" #. 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 "Le mie donazioni" @@ -2786,7 +2796,9 @@ msgid "My Sponsorship" msgstr "Il mio sostegno" #. 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 "I miei sostegni" @@ -3088,7 +3100,9 @@ msgid "Payment mode" msgstr "Modalità di pagamento" #. 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 "Opzioni di pagamento" @@ -3814,6 +3828,7 @@ msgstr "Colore del testo" #. module: my_compassion #: model_terms:ir.ui.view,arch_db:my_compassion.my2_gifts_thank_you_page +#, python-format msgid "Thank you" msgstr "Grazie" @@ -4706,6 +4721,28 @@ msgstr "" "anni\n" " " +#. module: my_compassion +#: code:addons/my_compassion/controllers/my_reset_password.py:0 +#, python-format +msgid "Reset Password" +msgstr "Reimposta la tua password" + +#. module: my_compassion +#: code:addons/my_compassion/controllers/my2_donations.py:0 +#, python-format +msgid "Gifts" +msgstr "Regali" + +#. module: my_compassion +#: model_terms:ir.ui.view,arch_db:my_compassion.my2_new_letter_page +msgid "New Letter" +msgstr "Nuova lettera" + +#. module: my_compassion +#: model_terms:ir.ui.view,arch_db:my_compassion.my2_user_settings_page +msgid "Settings" +msgstr "Impostazioni" + #. 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 @@ -4715,4 +4752,4 @@ msgstr "In attesa di una ripresa del sostegno" #. module: my_compassion #: model_terms:ir.ui.view,arch_db:my_compassion.my2_child_timeline_page msgid "Write a last letter" -msgstr "Scrivere un'ultima lettera" \ No newline at end of file +msgstr "Scrivere un'ultima lettera" diff --git a/my_compassion/templates/pages/my2_add_a_gift.xml b/my_compassion/templates/pages/my2_add_a_gift.xml index bd3622ae..00fd3d77 100644 --- a/my_compassion/templates/pages/my2_add_a_gift.xml +++ b/my_compassion/templates/pages/my2_add_a_gift.xml @@ -17,6 +17,7 @@