In Odoo 17, to ensure that One2many records are deleted when the parent record is deleted, you need to configure the One2many field with the proper ondelete attribute. This attribute controls the behavior of related records when the parent record is deleted. Set ondelete=’cascade’ on the One2many field to automatically delete related records when the […]
#Odoo #POS #Contacts #Reference #CreateUpdate #Parent #Show #Child #Contacts #Parent
This video discusses how to make sure one2many records are deleted when parent records are deleted. #odoodevelopmentvideos Video Contents ————————- 00:37 Introduction 00:38 Example 01:03 ondelete = ‘cascade’ 02:11 Delete parent record This can be done using ondelete =”cascade” attribute. We can use ondelete = ‘cascade’, which is a referential action for a foreign key […]