Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odgovori
3251 Prikazi

Hello i have a question about checking records if the have children records

Avatar
Opusti

elaborate your query

Best Answer

Hi,

This how you can do:

child_ids = self.search([('parent_id','=',self.id)])
if child_ids:
     return True
else:
     return False
Avatar
Opusti