跳至内容
菜单
此问题已终结
2 回复
3284 查看

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

形象
丢弃

elaborate your query

最佳答案

Hi,

This how you can do:

child_ids = self.search([('parent_id','=',self.id)])
if child_ids:
     return True
else:
     return False
形象
丢弃