Conversation
ADD pre-commit Renaming of priorities.
Currently translated at 100.0% (4 of 4 strings) Translation: project-17.0/project-17.0-project_task_add_very_high Translate-URL: https://translation.odoo-community.org/projects/project-17-0/project-17-0-project_task_add_very_high/sv/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: project-18.0/project-18.0-project_task_add_very_high Translate-URL: https://translation.odoo-community.org/projects/project-18-0/project-18-0-project_task_add_very_high/
Currently translated at 100.0% (5 of 5 strings) Translation: project-18.0/project-18.0-project_task_add_very_high Translate-URL: https://translation.odoo-community.org/projects/project-18-0/project-18-0-project_task_add_very_high/it/
| <field name="model">project.task</field> | ||
| <field name="inherit_id" ref="project.view_task_form2" /> | ||
| <field name="arch" type="xml"> | ||
| <xpath expr="//div[hasclass('justify-content-between')]" position="before"> |
| inherit_id="project.portal_my_tasks_priority_widget_template" | ||
| priority="99" | ||
| > | ||
| <span position="replace"> |
|
I have reviewed the new version of the Project module in Odoo 19, and tasks already include a three-star priority system. Therefore, this module is now obsolete. |
alexey-pelykh
left a comment
There was a problem hiding this comment.
Clean migration. Adding the extra priority levels is handy for teams that need finer granularity. LGTM
alexey-pelykh
left a comment
There was a problem hiding this comment.
Migration Review: project_task_add_very_high to 19.0
Thanks for working on this migration. The module concept is sound, but there are a few issues that need to be addressed before this can be merged.
Critical Issues
1. Incorrect ondelete parameter in model definition
In models/project_task.py, the ondelete dict uses {"priority": "set default"}. The keys in ondelete must be the selection values being added (not the field name). This should be:
ondelete={"2": "set default", "3": "set default"},Without this fix, uninstalling the module will likely crash or behave unexpectedly because Odoo won't know how to handle records with priority values "2" or "3".
2. default="1" changes default priority for all tasks
Setting default="1" means every new task will default to "Urgent" (star selected) instead of "Normal" ("0"). This is a behavioral change that affects all users, not just those using the extra priorities. The previous versions of this module (up to 16.0) had default="0". Unless there is a specific reason for this change, this should be either removed (to inherit the base default) or set back to default="0".
3. Unresolved reviewer feedback
@luisDIXMIT reported two visual bugs that appear unaddressed:
- Archived tasks show the priority field duplicated (form view XPath issue)
- Portal template rendering looks strange
Please address or respond to these findings.
Minor Issues
4. POT file references Odoo 18.0 instead of 19.0
The .pot file header says Project-Id-Version: Odoo Server 18.0 -- should be updated to 19.0 for consistency.
5. Screenshot URLs in documentation point to 12.0 branch
All image references in readme/DESCRIPTION.md and README.rst link to https://raw.githubusercontent.com/OCA/project/12.0/.... These should be updated to 19.0 (or use relative paths).
6. Missing license header in views/templates.xml
The project_task_view.xml has a proper copyright/license comment, but templates.xml is missing one. OCA guidelines require license headers on all source files.
7. No tests included
The module has no test coverage. At minimum, a basic test verifying that the extended selection values are correctly registered and that the ondelete behavior works on uninstall would be valuable.
Review posted via CorporateHub OCA review campaign
|
|
||
| priority = fields.Selection( | ||
| selection_add=[("2", "Very High"), ("3", "Most Important")], | ||
| ondelete={"priority": "set default"}, |
There was a problem hiding this comment.
Bug: The ondelete keys must be the selection values being added, not the field name.
Current:
ondelete={"priority": "set default"},Should be:
ondelete={"2": "set default", "3": "set default"},Without this, Odoo won't properly handle cleanup of records with these priority values when the module is uninstalled.
| priority = fields.Selection( | ||
| selection_add=[("2", "Very High"), ("3", "Most Important")], | ||
| ondelete={"priority": "set default"}, | ||
| default="1", |
There was a problem hiding this comment.
Behavioral change: default="1" makes every new task default to "Urgent" priority instead of "Normal" ("0"). Previous versions of this module (up to 16.0) used default="0". Was this change intentional?
If not, either remove this line (to inherit the base default) or change to default="0".
| @@ -0,0 +1,26 @@ | |||
| <odoo> | |||
There was a problem hiding this comment.
Minor: Missing copyright/license header. OCA guidelines require all source files to include a license header, e.g.:
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2016-2020 Onestein (<https://www.onestein.eu>)
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->

No description provided.