[T3038] FIX: changed tab names to MyCompassion#301
[T3038] FIX: changed tab names to MyCompassion#301Danielgergely wants to merge 11 commits into14.0from
Conversation
Danielgergely
commented
Mar 5, 2026
- FEAT: created an override template for titles in all MyCompassion pages
- FEAT: added template override to manifest
- FEAT: created an override template for titles in all MyCompassion pages - FEAT: added template override to manifest
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request standardizes the website title across all MyCompassion pages by implementing a global title override. This change ensures consistent branding and user experience by displaying 'MyCompassion' in the browser tab for every page within the application. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request aims to change the browser tab title to 'MyCompassion' by overriding an Odoo template. No security vulnerabilities were identified. However, the current implementation incorrectly applies a static title to the entire website, negatively impacting SEO and user experience by removing dynamic page titles. Please address this fundamental issue by adopting a more targeted approach, as detailed in the critical comment. Additionally, consider improving code maintainability by following best practices for naming template IDs, as suggested in the medium-severity comment.
- REFACTOR: using record with website filter to avoid global override and replace command
pre-commit complained again as usual
NoeBerdoz
left a comment
There was a problem hiding this comment.
Thanks for the proposition!
But actually, it's not the wanted approach, I'm sorry I should have been clearer on the task description, that's on me.
The issue is that, our pages names are inconsistent, sometimes MC2 shows "My Compassion 2 <page_name> " sometimes "My account", sometimes, something else, etc.
We need to review the individual templates for the portal pages. Odoo naturally constructs the tab title using the template's name attribute followed by the Website Name. We need to make them all consistent. The goal is for the platform to show tab names as so (which is the default Odoo way) <page_name> | My Compassion
Odoo's set the tab name as so: template name attribute + pipe "|" + website name.
Currently our website name is "MyCompassion", this can be change on production, in Website -> Configuration.
- REFACTOR: applied <t t-set="additional_title">Page Title</t> to all mycompassion pages
- REFACTOR: additional_titles's are now passed on from the controllers (and are translated now) - REFACTOR: added reset password intercept controller - FEAT: added translation paths and new translations for new titles
NoeBerdoz
left a comment
There was a problem hiding this comment.
I'm sorry @Danielgergely, you overengineered the solution here.
Here is what needs to be done:
Let's take the example of the template in my_compassion/templates/pages/my2_add_a_gift.xml
In the template declaration, the only thing to change is the attribute name
<template id="my2_add_a_gift_page" name="Add a Gift Page">Here is the corrected code:
<template id="my2_add_a_gift_page" name="Add a Gift">And ... that's it, that is what needs to be done on every views, in a consistent way.
You can refer to my previous review for more details, or you can hit me on Slack if it's not clear ;)
|
@NoeBerdoz I do agree with you, that would be more straight forward, and that is how I started my approach. would have been a lot easier. |
|
@Danielgergely Thank you for the clarification! I’ve looked into this further, and you are right we need this approach to ensure translations. I would suggest a little change in it, for pages with fixed names (like Reset Password |
- FIX: tab names now not in controllers but in templates - FIX: adapted translations as well
# Conflicts: # my_compassion/i18n/de.po # my_compassion/i18n/fr_CH.po # my_compassion/i18n/it.po # theme_compassion_2025/views/template_header.xml