[19.0][MIG] mail_activity_unlink_log: migration to 19.0#1781
[19.0][MIG] mail_activity_unlink_log: migration to 19.0#1781TheSumitBasak wants to merge 16 commits intoOCA:19.0from
Conversation
Currently translated at 100.0% (9 of 9 strings) Translation: social-14.0/social-14.0-mail_activity_unlink_log Translate-URL: https://translation.odoo-community.org/projects/social-14-0/social-14-0-mail_activity_unlink_log/es/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: social-16.0/social-16.0-mail_activity_unlink_log Translate-URL: https://translation.odoo-community.org/projects/social-16-0/social-16-0-mail_activity_unlink_log/
Currently translated at 100.0% (6 of 6 strings) Translation: social-16.0/social-16.0-mail_activity_unlink_log Translate-URL: https://translation.odoo-community.org/projects/social-16-0/social-16-0-mail_activity_unlink_log/it/
There was a problem hiding this comment.
Pull request overview
This PR migrates the mail_activity_unlink_log module from a previous version to Odoo 19.0. The module enforces the creation of a message when an activity is unlinked, preventing the deletion of activities without notification.
- Migration of module version to 19.0.1.0.0
- Addition of test suite for validating activity unlinking behavior
- Inclusion of translation files, documentation, and module metadata
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| mail_activity_unlink_log/manifest.py | Updated module manifest with version 19.0.1.0.0 and module metadata |
| mail_activity_unlink_log/init.py | Module initialization importing models |
| mail_activity_unlink_log/models/init.py | Models package initialization |
| mail_activity_unlink_log/models/mail_activity.py | Core functionality: overrides unlink methods to log activity deletions |
| mail_activity_unlink_log/tests/init.py | Test package initialization |
| mail_activity_unlink_log/tests/test_activity_unlink.py | Test cases for activity done and unlink scenarios |
| mail_activity_unlink_log/data/unlink_message.xml | Data file defining message subtype and template for unlink notifications |
| mail_activity_unlink_log/i18n/mail_activity_unlink_log.pot | Translation template file |
| mail_activity_unlink_log/i18n/it.po | Italian translations |
| mail_activity_unlink_log/i18n/es.po | Spanish translations |
| mail_activity_unlink_log/readme/DESCRIPTION.md | Module description for README generation |
| mail_activity_unlink_log/readme/CONTRIBUTORS.md | Contributors list for README generation |
| mail_activity_unlink_log/README.rst | Generated module documentation |
| mail_activity_unlink_log/static/description/index.html | HTML documentation for module |
| mail_activity_unlink_log/static/description/icon.png | Module icon (binary file) |
| mail_activity_unlink_log/pyproject.toml | Build configuration using whool |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # | ||
| msgid "" | ||
| msgstr "" | ||
| "Project-Id-Version: Odoo Server 18.0\n" |
There was a problem hiding this comment.
The Project-Id-Version header still references "Odoo Server 18.0" but this is a migration to 19.0. This should be updated to "Odoo Server 19.0" to match the module version in manifest.py.
| "Project-Id-Version: Odoo Server 18.0\n" | |
| "Project-Id-Version: Odoo Server 19.0\n" |
| subtype_id=self.env["ir.model.data"]._xmlid_to_res_id( | ||
| "mail_activity_unlink_log.mt_activities_unlink" | ||
| ), |
There was a problem hiding this comment.
The method _xmlid_to_res_id is deprecated. In Odoo 19.0, you should use env.ref().id instead. Replace self.env["ir.model.data"]._xmlid_to_res_id("mail_activity_unlink_log.mt_activities_unlink") with self.env.ref("mail_activity_unlink_log.mt_activities_unlink").id
| subtype_id=self.env["ir.model.data"]._xmlid_to_res_id( | |
| "mail_activity_unlink_log.mt_activities_unlink" | |
| ), | |
| subtype_id=self.env.ref( | |
| "mail_activity_unlink_log.mt_activities_unlink" | |
| ).id, |
| class TestActivityUnlink(BaseCommon): | ||
| @classmethod | ||
| def setUpClass(cls): | ||
| super().setUpClass() |
There was a problem hiding this comment.
The test class uses self.partner without initializing it in the setUpClass method. BaseCommon does not provide a partner attribute by default. You should add cls.partner initialization in setUpClass, for example: cls.partner = cls.env.ref('base.res_partner_1') or cls.partner = cls.env['res.partner'].create({'name': 'Test Partner'})
| super().setUpClass() | |
| super().setUpClass() | |
| cls.partner = cls.env.ref("base.res_partner_1") |
| # | ||
| msgid "" | ||
| msgstr "" | ||
| "Project-Id-Version: Odoo Server 14.0\n" |
There was a problem hiding this comment.
The Project-Id-Version header still references "Odoo Server 14.0" but this is a migration to 19.0. This should be updated to "Odoo Server 19.0" to match the module version in manifest.py.
| "Project-Id-Version: Odoo Server 14.0\n" | |
| "Project-Id-Version: Odoo Server 19.0\n" |
| # | ||
| msgid "" | ||
| msgstr "" | ||
| "Project-Id-Version: Odoo Server 14.0\n" |
There was a problem hiding this comment.
The Project-Id-Version header still references "Odoo Server 14.0" but this is a migration to 19.0. This should be updated to "Odoo Server 19.0" to match the module version in manifest.py.
| "Project-Id-Version: Odoo Server 14.0\n" | |
| "Project-Id-Version: Odoo Server 19.0\n" |
| @@ -0,0 +1,3 @@ | |||
| [build-system] | |||
| requires = ["whool"] | |||
There was a problem hiding this comment.
The build-system.requires entry uses an unpinned third-party build backend (whool), which means every build can fetch an arbitrary, potentially compromised version of that package and execute it with access to your build environment and artifacts. An attacker who controls or poisons the whool package on the package index could tamper with built wheels or exfiltrate secrets from CI runners. Pin whool to a specific, vetted version (or other immutable identifier) to reduce supply-chain risk in the build step.
|
Please move this to OCA/mail instead |
Migration
mail_activity_unlink_logto 19.0