Skip to content

[18.0][ADD] project_task_manual_progress#1676

Draft
cvinh wants to merge 2 commits intoOCA:18.0from
invitu:18.0-project_task_progress
Draft

[18.0][ADD] project_task_manual_progress#1676
cvinh wants to merge 2 commits intoOCA:18.0from
invitu:18.0-project_task_progress

Conversation

@cvinh
Copy link

@cvinh cvinh commented Feb 22, 2026

This module allows to manually enter a 'based on intuition' progress in tasks.
The global project manual progress is calculated from tasks manual progress.
This progress value is not related to time spent on tasks as it is in hr_timesheet.

@cvinh cvinh force-pushed the 18.0-project_task_progress branch 2 times, most recently from 05b3726 to d9e36e0 Compare February 22, 2026 22:00
@cvinh
Copy link
Author

cvinh commented Feb 23, 2026

tests fail because of sale_project_task_selection

Copy link

@luisDIXMIT luisDIXMIT left a comment

Choose a reason for hiding this comment

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

Can you add some tests? :)

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.

Thanks for the contribution! A couple of things on top of the tests request from @luisDIXMIT.

@cvinh cvinh marked this pull request as draft February 27, 2026 02:53
@cvinh cvinh force-pushed the 18.0-project_task_progress branch from d9e36e0 to e7b8647 Compare February 27, 2026 02:55
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.

Looks good, all three points addressed. Tests would be a nice addition to cover the constraint and the computed progress — not blocking but would help with long-term maintenance.

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.

Review: project_task_manual_progress (18.0)

This PR is currently marked as Draft, so this is an early-stage review to provide constructive feedback before the PR is ready for formal review.

The module idea is sound -- providing a manual "intuition-based" progress field for tasks is a useful complement to the timesheet-based progress. Here are findings to address before moving out of draft.


Critical: No tests

OCA requires test coverage for new modules. At minimum, tests should cover:

  • Creating a task, setting manual_progress, verifying the constraint (0-100 range)
  • Verifying the project-level _compute_manual_progress correctly averages task progress
  • Edge case: project with no tasks (division by zero is handled, but should be tested)

Critical: Missing installable key in manifest

While installable defaults to True, OCA convention requires it to be explicitly set in __manifest__.py.

Important: Project progress computation includes all tasks

project.task_ids includes all tasks (including subtasks in Odoo 18). Tasks with manual_progress = 0 (the default) will drag down the project average. Consider:

  • Filtering to only tasks that have been explicitly rated (e.g., manual_progress > 0), or
  • Documenting that this is intentional behavior, or
  • Using a weighted approach

Also, task_ids may include tasks in folded/cancelled stages -- is that desired?

Important: Computed field not stored

manual_progress on project.project is not stored. For projects with many tasks this will recompute on every access. Consider adding store=True and appropriate dependencies, which also enables searching/grouping by progress.

Moderate: Deprecated <field name="type"> in view XML

In Odoo 18, the <field name="type">form</field> / <field name="type">list</field> attributes on ir.ui.view records are deprecated. The view type is inferred from the inherit_id. Remove these lines from both project_project_views.xml and project_task_views.xml.

Minor: Typo in CONTRIBUTORS.md

The contributor line has an extra > character:

- Cyril VINH-TUNG \<cyril@invitu.com>\>

Should be:

- Cyril VINH-TUNG <cyril@invitu.com>

The same typo appears in README.rst.

Minor: No .pot file

A translatable string exists in project_task.py (the validation error message). Run oca-gen-addon-readme and export translations to generate the .pot file.

Minor: Missing development_status in manifest

The README badges show "Beta" but the manifest does not include "development_status": "Beta". Adding it ensures consistency.

Suggestion: Consider group_operator for list view aggregation

The task list view uses avg="Average of Progress" on the manual_progress field. In Odoo 18, you may want to set group_operator="avg" on the field definition itself so that grouping in list view correctly shows averages.


Summary: The concept is good but the module needs tests, a few model design decisions to be clarified (stored vs. computed, task filtering), and some OCA packaging fixes before it can be considered for merge.

Review posted via CorporateHub OCA review campaign

help="Shows the progress of the project based on the task manual progress",
)

@api.depends("task_ids.manual_progress")
Copy link
Contributor

Choose a reason for hiding this comment

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

Depending on task_ids.manual_progress will trigger recomputation for ANY task change in the project. In Odoo 18, task_ids may include subtasks as well.

Consider whether you want to:

  1. Filter out subtasks or tasks in specific stages
  2. Only average tasks where manual_progress > 0 (so unrated tasks don't drag the average to 0)
  3. Document the current behavior as intentional

Copy link
Author

Choose a reason for hiding this comment

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

this one is still in progress...

@cvinh cvinh force-pushed the 18.0-project_task_progress branch from e7b8647 to 4b24c00 Compare March 11, 2026 22:45
@cvinh cvinh force-pushed the 18.0-project_task_progress branch from 4b24c00 to 1f7aba8 Compare March 12, 2026 18:00
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.

3 participants