Skip to Content
Menu
This question has been flagged
2 Replies
3250 Rodiniai

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

Portretas
Atmesti

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
Portretas
Atmesti