-
Notifications
You must be signed in to change notification settings - Fork 10
[T2859] - Provide hardcoded products data with multilanguage support #245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 14.0-MyCompassion2.0
Are you sure you want to change the base?
[T2859] - Provide hardcoded products data with multilanguage support #245
Conversation
Summary of ChangesHello @SlWa99, 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 automates the configuration and translation of MyCompassion product data, ensuring consistent and synchronized product information across all environments. It streamlines data management by centralizing product definitions in XML, handling existing data migration, and providing comprehensive multilingual support, thereby reducing manual setup and maintenance. 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. 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request effectively centralizes MyCompassion product data into a dedicated XML file, complete with multilingual support and a well-thought-out pre-migration script. The changes will improve data consistency and maintainability. I've provided several suggestions to enhance the consistency of product data definitions within the new XML file and to refine a parameter in the migration script for better long-term stability. Overall, this is a solid contribution.
MyCompassion Product Data Integration with Multilingual Support
Purpose and Context
The goal of this PR is to automate the configuration and translation of products related to MyCompassion.
It ensures that all environments (Development, Staging, Production) are consistently populated with synchronized product data, descriptions, and impact statements without requiring manual setup.
This approach guarantees data consistency across environments and reduces maintenance overhead.
Applied Changes and Improvements
1. Centralized Product Data Integration
XML data definition
Introduction of the
product_funds_data.xmlfile to define and manage the 7 core MyCompassion products:Full MyCompassion coverage
The integration includes:
2. Existing Data Mapping (OpenUpgrade)
A pre-migration script has been added to:
This allows the codebase to take ownership of previously manually created products and prevents duplicates.
donation.impact.lineanddonation.info.linerecords to ensure a clean and non-duplicated import of the new content.3. Multilingual Support
Complete translations
Full translations have been added for FR, DE, and IT using
.pofiles.Translated content includes
4. Visual Identity Alignment
Colors and pictograms are sourced from the
theme_compassion_2025module to ensure a consistent visual identity across the My2 interface.Technical Notes on IDs
Fixed ID strategy
After validation with @ecino, fixed database IDs are used in the migration script to precisely target existing production records.
Environment safety
If a targeted ID does not exist (e.g. in a fresh environment), Odoo automatically creates the record from the XML data, ensuring compatibility across all environments.