project icon indicating copy to clipboard operation
project copied to clipboard

[12.0][project_task_dependency] Repeated values in field M2M recursive_depending_task_ids

Open dariodelzozzo opened this issue 4 years ago • 0 comments

Inside model project.task the Many2many field recursive_depending_task_ids may have repeated values.

Module

project_task_dependency

Describe the bug

Inside model project.task the Many2many field recursive_depending_task_ids may have repeated values because the assignment is done with += instead of |= https://github.com/OCA/project/blob/12.0/project_task_dependency/models/project_task.py#L75

To Reproduce

To reproduce the bug just set one task as a dependency of other tasks. In field recursive_depending_task_ids (if added on view) you can see the single task repeated each time that it will be found by the method def get_depending_tasks(self, task, recursive=False): Instead of adding it on view you can add a pdb inside compute method and will see repeated values.

Affected versions: 12.0 (not tested on others)

Expected behavior No repetition of records inside recordset.

dariodelzozzo avatar Jan 10 '22 17:01 dariodelzozzo