Skip to Content
Menu
This question has been flagged
1 Reply
2448 Views

I want to get all the tasks that have been assigned to a project.


This is what I have:


tasks = request.env['project.task'].search([('project_id', '=' ,project_id)])


I don't get any results, but there are tasks assigned to this project.


Thank you

Avatar
Discard

Odoo ORM: https://www.youtube.com/watch?v=8V-uOG8KkKA&t=4s

Is the project_id variable containing the correct id of the project ?

Best Answer

Hi,

try 

tasks = request.env['project.task'].search([('project_id', '=' ,project_id.id)])

Avatar
Discard
Related Posts Replies Views Activity
2
Jul 24
939
1
Jun 24
3560
1
Oct 23
8579
1
Oct 23
97
1
Aug 23
2192