コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
3306 ビュー

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
アバター
破棄