[FIX] project: show current project stages for burndown chart

Currently when move the task from one project(A) to another project(B)
and open the burndown chart of second project(B) it shows the stages
of first project(A). which is wrong.

so in this commit, include the tracking values of the current project
only, do not include the tracking value of the older projects.

Task-2616736

closes odoo/odoo#76964

X-original-commit: 9a6624f5f743677a233489932840e3a739330452
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
This commit is contained in:
Priyanka Kakadiya
2021-09-24 11:08:40 +00:00
committed by Barad Mahendra
parent 480f2aa1e1
commit 6a6f2f83d1
@@ -71,6 +71,8 @@ WITH all_moves_stage_task AS (
JOIN ir_model_fields imf ON mtv.field = imf.id
AND imf.model = 'project.task'
AND imf.name = 'stage_id'
JOIN project_task_type_rel pttr ON pttr.type_id = mtv.old_value_integer
AND pttr.project_id = pt.project_id
WHERE pt.active
--We compute the last reached stage