From 6a6f2f83d1027ba75d8e7c7eb8b4f31d065b284e Mon Sep 17 00:00:00 2001 From: Priyanka Kakadiya Date: Thu, 26 Aug 2021 06:34:34 +0000 Subject: [PATCH] [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) Signed-off-by: LTU-Odoo --- addons/project/report/project_task_burndown_chart_report.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/project/report/project_task_burndown_chart_report.py b/addons/project/report/project_task_burndown_chart_report.py index 6850267e304..b32838fd7f1 100644 --- a/addons/project/report/project_task_burndown_chart_report.py +++ b/addons/project/report/project_task_burndown_chart_report.py @@ -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