Skip to content

[18.0][ADD] project_task_manual_progress - #1676

Open
cvinh wants to merge 1 commit into
OCA:18.0from
invitu:18.0-project_task_progress
Open

cvinh wants to merge 1 commit into
OCA:18.0from
invitu:18.0-project_task_progress

Conversation

@cvinh

@cvinh cvinh commented Feb 22, 2026 •

Copy link
Copy Markdown

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

cvinh commented Feb 23, 2026

Copy link
Copy Markdown
Author

tests fail because of sale_project_task_selection

@luisDIXMIT luisDIXMIT left a comment

Copy link
Copy Markdown
Contributor

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? :)

@alexey-pelykh alexey-pelykh left a comment

Copy link
Copy Markdown
Contributor

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

@alexey-pelykh alexey-pelykh left a comment

Copy link
Copy Markdown
Contributor

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.

@alexey-pelykh alexey-pelykh left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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 2 times, most recently from 4b24c00 to 1f7aba8 Compare March 12, 2026 18:00
@cvinh
cvinh force-pushed the 18.0-project_task_progress branch from 1f7aba8 to ec4025e Compare July 2, 2026 19:49
@OCA-git-bot OCA-git-bot added series:18.0 mod:project_task_manual_progress Module project_task_manual_progress labels Jul 2, 2026
@cvinh
cvinh marked this pull request as ready for review July 2, 2026 19:51
@cvinh

cvinh commented Jul 2, 2026

Copy link
Copy Markdown
Author

tests added

@leemannd

leemannd commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

/ocabot merge nobump

@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 18.0-ocabot-merge-pr-1676-by-leemannd-bump-nobump, awaiting test results.

@OCA-git-bot

Copy link
Copy Markdown
Contributor

@leemannd your merge command was aborted due to failed check(s), which you can inspect on this commit of 18.0-ocabot-merge-pr-1676-by-leemannd-bump-nobump.

After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red.

@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@cvinh
cvinh force-pushed the 18.0-project_task_progress branch from ec4025e to c02217d Compare October 15, 2026 19:41
@cvinh

cvinh commented Oct 15, 2026

Copy link
Copy Markdown
Author

I just rebased, maybe merge can be done

@leemannd

Copy link
Copy Markdown
Contributor

/ocabot merge nobump

@OCA-git-bot

Copy link
Copy Markdown
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 18.0-ocabot-merge-pr-1676-by-leemannd-bump-nobump, awaiting test results.

@OCA-git-bot

Copy link
Copy Markdown
Contributor

@leemannd The merge process could not be finalized, because command twine upload --disable-progress-bar --non-interactive --repository-url https://upload.pypi.org/legacy/ -u __token__ odoo_addon_project_task_manual_progress-18.0.1.0.0.2-py3-none-any.whl failed with output:

Uploading distributions to https://upload.pypi.org/legacy/
Uploading odoo_addon_project_task_manual_progress-18.0.1.0.0.2-py3-none-any.whl
�[33mWARNING �[0m Error during upload. Retry with the --verbose option for more details. 
�[31mERROR   �[0m HTTPError: 429 Too Many Requests from https://upload.pypi.org/legacy/  
         Too Many Requests                                                      

@cvinh

cvinh commented Oct 22, 2026

Copy link
Copy Markdown
Author

Any ideas why merge fails ?

@leemannd

Copy link
Copy Markdown
Contributor

From my knowledge it is because there are now limitations on pip pypi/support#11728 (comment)

@leemannd

Copy link
Copy Markdown
Contributor

/ocabot merge nobump

@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 18.0-ocabot-merge-pr-1676-by-leemannd-bump-nobump, awaiting test results.

@OCA-git-bot

Copy link
Copy Markdown
Contributor

@leemannd The merge process could not be finalized, because command twine upload --disable-progress-bar --non-interactive --repository-url https://upload.pypi.org/legacy/ -u __token__ odoo_addon_project_task_manual_progress-18.0.1.0.0.2-py3-none-any.whl failed with output:

Uploading distributions to https://upload.pypi.org/legacy/
Uploading odoo_addon_project_task_manual_progress-18.0.1.0.0.2-py3-none-any.whl
�[33mWARNING �[0m Error during upload. Retry with the --verbose option for more details. 
�[31mERROR   �[0m HTTPError: 429 Too Many Requests from https://upload.pypi.org/legacy/  
         Too Many Requests                                                      

@rousseldenis

Copy link
Copy Markdown
Contributor

@cvinh @leemannd Name reserved on pypi

bt-admin pushed a commit to brain-tec/project that referenced this pull request Oct 24, 2026
Signed-off-by leemannd
@cvinh
cvinh force-pushed the 18.0-project_task_progress branch from c02217d to 4e64b40 Compare December 3, 2026 18:37
@cvinh

cvinh commented Dec 3, 2026

Copy link
Copy Markdown
Author

Hi, I just rebased, I think it can be merged now

@luisDIXMIT luisDIXMIT left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code review and tested on runboat, LGTM!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants