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
- Kirjanpito
- Varastointi
- PoS
- Project
- MRP
Tämä kysymys on merkitty
2
Vastaukset
3248
Näkymät
Hi,
This how you can do:
child_ids = self.search([('parent_id','=',self.id)])
if child_ids:
return True
else:
return False
Nautitko keskustelusta? Älä vain lue, vaan osallistu!
Luo tili jo tänään nauttiaksesi yksinoikeusominaisuuksista ja osallistuaksesi mahtavaan yhteisöömme!
Rekisteröidy
elaborate your query