[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
This commit is contained in:
Lucas Perais (lpe)
2018-04-16 10:03:08 +02:00
parent 71087021f7
commit 7a2cba3c89
+1 -1
View File
@@ -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)