Skip to content

19.0 mig project task add very high#1672

Open
kimirondon wants to merge 22 commits intoOCA:19.0from
archeti-org:19.0-mig-project_task_add_very_high
Open

19.0 mig project task add very high#1672
kimirondon wants to merge 22 commits intoOCA:19.0from
archeti-org:19.0-mig-project_task_add_very_high

Conversation

@kimirondon
Copy link

No description provided.

astirpe and others added 22 commits February 19, 2026 18:49
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/
@kimirondon kimirondon mentioned this pull request Feb 20, 2026
41 tasks
<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">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you archive the task, the field is displayed twice.

Image

inherit_id="project.portal_my_tasks_priority_widget_template"
priority="99"
>
<span position="replace">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In portal looks strange.

Image

@luisDIXMIT
Copy link

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.

Copy link
Contributor

@alexey-pelykh alexey-pelykh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean migration. Adding the extra priority levels is handy for teams that need finer granularity. LGTM

Copy link
Contributor

@alexey-pelykh alexey-pelykh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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). -->

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.