Skip to Content
Menú
This question has been flagged
2 Respostes
3285 Vistes

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

Avatar
Descartar

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
Descartar