Skip to content
Snippets Groups Projects
Commit a28b6a6f authored by Hamza (hisl)'s avatar Hamza (hisl)
Browse files

[FIX] hr_timesheet : update effective_hours for progress_hours computation


Steps to reproduce the issue:

Add a project and create a task with a timesheet in it
set the allocated hours to 00:03
add a line in the timesheet with hours spent 00:03
Current Behaviour:
The percentage calculated would be 96%, even though the time allocated and time spent are equal.

Desired Behaviour:
The percentage should be 100 as both values i.e. time spent and time allocated are equal.

This is happening because effective_hours value is being rounded off to 2 decimal places, and is not accurate enough to compute the progress_hours.

Here, I have used the same line, that is used to compute effective_hours, to compute the task_total_hours but without rounding off. This will make the calculate more precise and accurate.

OPW-3270858

closes odoo/odoo#124914

X-original-commit: 3b1316e7
Signed-off-by: default avatarXavier Bol (xbo) <xbo@odoo.com>
parent 9275e42d
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment