diff --git a/doc/cla/corporate/oerp.md b/doc/cla/corporate/oerp.md index 30347e140f4..81f29bf175d 100644 --- a/doc/cla/corporate/oerp.md +++ b/doc/cla/corporate/oerp.md @@ -15,3 +15,4 @@ List of contributors: Daniel Dico ddico@oerp.ca https://github.com/ddico Yash Pathak yp@oerp.ca https://github.com/yp-oerp Lucas Jagel lj@oerp.ca https://github.com/lj-oerp +Daryl Chen dc@oerp.ca https://github.com/dc-oerp diff --git a/odoo/addons/base/models/ir_actions.py b/odoo/addons/base/models/ir_actions.py index 6ef49cc3d53..414c7c2852d 100644 --- a/odoo/addons/base/models/ir_actions.py +++ b/odoo/addons/base/models/ir_actions.py @@ -86,10 +86,12 @@ class IrActions(models.Model): return res def unlink(self): - """unlink ir.action.todo which are related to actions which will be deleted. + """unlink ir.action.todo/ir.filters which are related to actions which will be deleted. NOTE: ondelete cascade will not work on ir.actions.actions so we will need to do it manually.""" todos = self.env['ir.actions.todo'].search([('action_id', 'in', self.ids)]) todos.unlink() + filters = self.env['ir.filters'].search([('action_id', 'in', self.ids)]) + filters.unlink() res = super(IrActions, self).unlink() # self.get_bindings() depends on action records self.env.registry.clear_cache()