Opening custom object from system message
I am trying to open custom module from system notification message, setting mail.message.model and mail.message.res_id to point to the object.
When clicking the message, the system gives an error message:
AttributeError: 'custom.model' object has no attribute 'message_redirect_action'
What should I set to be able to open this object straight from the notification?