[18.0][MIG] privacy_partner_to_be_forgotten - #87
Closed
michelerusti wants to merge 14 commits into
Closed
michelerusti wants to merge 14 commits into
michelerusti wants to merge 14 commits into
Conversation
Add initial draft of the GDPR anonymization module to comply with the "Right to be Forgotten" for individual contact records (res.partner). Includes base structure, wizard logic, access control, and UI integration for manual anonymization via action menu. Task: 4518
Improve module implementation with demo data and code refinements: - Add comprehensive demo data with test partners and users - Refactor anonymization logic for better maintainability - Update security groups with dedicated category - Improve wizard UI and warning messages - Fix mail.channel references to discuss.channel - Add no_reset_password context for demo users - Clean up docstrings and code formatting Task: 4518
Improve XML formatting and context handling in the module: - Add proper XML formatting - Include active_test=False in partner anonymization context to handle archived records These changes enhance code readability and ensure proper handling of both active and archived partners during anonymization process. Task: 4518
Add initial documentation for the module including: - README and subpages (CONTEXT, USAGE, CONFIGURE, etc.) - Contributors list in readme - HTML description for Apps Store display - Updated manifest summary for better clarity - Added copyright headers Task: 4518
Refactor anonymization logic to improve readability, testability, and compliance with Odoo conventions. Changes include: - Extracted helper methods for email, messages, attachments - Replaced datetime with fields.Datetime for consistency - Improved logging and translation usage - Rewrote _anonymize_partner_data into modular structure Added extensive test coverage: - Parent/child anonymization scenarios - Company restriction handling - Access rights validation - Attachments/messages cleanup - Multi-partner anonymization Minor improvements: - Removed unused demo import - Removed optional manifest keys - Added changelog section to docs Task: 4518
Improve code documentation and formatting across multiple files to enhance readability and maintainability: - Add detailed docstrings to core anonymization methods - Use named placeholders in translations for better clarity - Add ensure_one() safety check to attachment domain method - Improve code formatting and line length compliance - Simplify default_get logic in wizard - Enhance anonymization success message with count Technical improvements: - Use rf-strings for email regex patterns - Standardize create() and search() formatting Task: 4518
Update all license header URLs to correctly point to LGPL-3.0 instead of AGPL across the module. This ensures consistency between the declared license (LGPL-3.0) and its reference URL. Files updated: - Python files (__init__.py, __manifest__.py, models, tests, wizards) - XML files (demo data, security, views) This change improves legal accuracy and maintains proper license documentation throughout the codebase. Task: 4518
Improve module structure and maintainability through several changes: - Replace XML demo data with programmatic test data creation - Remove redundant browse call in user anonymization - Add noupdate flag to demo data - Remove copyright headers from XML files - Update company name from "Cetmix OÜ" to "Cetmix" - Fix license reference consistency (AGPL -> LGPL-3.0) These changes make the module more maintainable and ensure consistent naming and licensing across all files. Task: 4518
Improve partner anonymization process and test coverage: - Add tracking_disable context to prevent storing sensitive data in mail.tracking.value records during anonymization - Add test to ensure no personal data remains in chatter after anonymization process These changes ensure better privacy protection by preventing any traces of personal information in the system logs and tracking values. Task: 4518
Enable anonymization of companies by adjusting the logic: - Companies can now be anonymized by changing the name (add 'Anonymized' suffix) and archiving the partner record without clearing business-critical data. - Deactivate portal users linked to companies instead of full anonymization. - Remove the restriction that blocked anonymization of companies. - Update wizard view and related tests to reflect the new behavior. This change fixes an issue where attempts to anonymize a company failed with a "Cannot anonymize company" error. Task: 4518
Implement real-time UI updates during partner anonymization: - Add bus notifications when messages and attachments are deleted - Send notification when anonymization log message is created - Add unit tests for notification sending functionality - Improve error handling with empty collections These changes ensure the UI is properly updated when a partner is anonymized, providing better user experience by showing changes immediately without requiring page refresh. Task: 4518
Improve code quality and maintainability: - Use DEFAULT_SERVER_DATE_FORMAT instead of hardcoded date format - Update anonymized email format to use YYYY-MM-DD - Refactor _anonymize_user method to reduce code duplication - Use subtype_xmlid parameter instead of subtype_id in message_post - Update tests to match new email format pattern These changes improve code clarity, test reliability, and ensure standardized formatting across anonymized data and logging messages. Task: 4518
michelerusti
force-pushed
the
18.0-mig-privacy_partner_to_be_forgotten
branch
from
June 11, 2025 16:37
3e57bfd to
d8a2f29
Compare
michelerusti
force-pushed
the
18.0-mig-privacy_partner_to_be_forgotten
branch
from
June 11, 2025 16:42
d8a2f29 to
f4c5db8
Compare
michelerusti
marked this pull request as ready for review
June 11, 2025 16:44
are-agilebg
approved these changes
Jun 27, 2025
Contributor
|
This PR has the |
Contributor
Author
|
@OCA/data-protection-maintainers could you take a look this PR please? |
Member
|
Hi @michelerusti, the module was merged in the main branch, please update or reopen your PR. |
Contributor
Author
|
@ivs-cetmix opened #92 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
migration of
#83