From 7a2cba3c8934064b311da4312ef2fbd07c6329ec Mon Sep 17 00:00:00 2001 From: "Lucas Perais (lpe)" Date: Wed, 28 Mar 2018 15:02:14 +0200 Subject: [PATCH] [FIX] project: subtasks should be taken into account even if archived Have a task (A) with two subtasks (B and C) Archive C Before this commit, when using timesheets, the task A hours was misconputed and did not take C's timesheet into account After this commit, hours are accounted for even if their task is archived OPW 1829658 closes #23920 --- addons/project/models/project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project/models/project.py b/addons/project/models/project.py index 6ba7b6b8c24..d25de3f6ab4 100644 --- a/addons/project/models/project.py +++ b/addons/project/models/project.py @@ -456,7 +456,7 @@ class Task(models.Model): legend_done = fields.Char(related='stage_id.legend_done', string='Kanban Valid Explanation', readonly=True, related_sudo=False) legend_normal = fields.Char(related='stage_id.legend_normal', string='Kanban Ongoing Explanation', readonly=True, related_sudo=False) parent_id = fields.Many2one('project.task', string='Parent Task', index=True) - child_ids = fields.One2many('project.task', 'parent_id', string="Sub-tasks") + child_ids = fields.One2many('project.task', 'parent_id', string="Sub-tasks", context={'active_test': False}) subtask_project_id = fields.Many2one('project.project', related="project_id.subtask_project_id", string='Sub-task Project', readonly=True) subtask_count = fields.Integer(compute='_compute_subtask_count', type='integer', string="Sub-task count") email_from = fields.Char(string='Email', help="These people will receive email.", index=True)