I am using odoo 9. I am working in a view with a one2many field. The one2many field tree view list, there is a trash icon on the left of each row. When I click on the trash icon, I would like to intercept record deletion and perform some custom action.
I tried to override unlink method but it does not break into the break point set inside the unlink so I think odoo is not calling unlink. Any idea?
The view is view_pack_operation_lot_form. Here is my method:
@api.multi
def unlink(self):
res=super(myclass, self).unlink()
# do my stuff
return res