Skip to Content
Menu
This question has been flagged
3 Replies
3228 Views

Hello

I have created 2 classes "A" and "B". The classe "A" have one2many relation with class "B", and class "B" have many2one relation with class "A".

When i delete record in class "A", related records to this record in class "B" don't deleted. So i want a solution. Should i

Override the delete function ?


Thank you ! 

Avatar
Discard
Best Answer

Hi Zak, 

You can use ondelete='cascade', Check this link this will give you the idea , https://www.odoo.com/forum/help-1/question/delete-one2may-records-when-parent-record-is-deleted-30898

Thanks

Avatar
Discard
Author

Thank you bro :)

Author Best Answer

Thank you Niyas it work for me.




Avatar
Discard