Hello i have a question about checking records if the have children records
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Contabilità
- Magazzino
- PoS
- Project
- MRP
La domanda è stata contrassegnata
2
Risposte
3254
Visualizzazioni
Hi,
This how you can do:
child_ids = self.search([('parent_id','=',self.id)])
if child_ids:
return True
else:
return False
Ti stai godendo la conversazione? Non leggere soltanto, partecipa anche tu!
Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!
Registrati
elaborate your query