Skip to Content
मेन्यू
This question has been flagged
1 Reply
3808 Views

I need to find for example all projects that have tasks.

task_ids = fields.One2Many('project.task', 'project_id')

Like: search([('task_ids', '>', 0)])?

Is there a way to do that or do I have to get tasks and then loop trough them to get project ids?

Avatar
Discard
Best Answer
task_ids","!=",False
Avatar
Discard

you can do this but many ways to do it

either you can these ways that i know:

for rec in self:

if rec.task_ids:

#statement

or self.search([('task_ids', '!=', False)])

Author

Thanks it works!

Related Posts Replies Views Activity
2
दिस॰ 22
16247
1
सित॰ 22
2184
1
अप्रैल 20
142
1
जून 19
4214
1
नव॰ 18
2798