I need to redefine mail_thread.message_post to change it's behaviour in version 8.0.
""" Update MailThread to add the feature """
_inherit = 'mail.thread'
def message_post(self, cr, uid, thread_id, body='', subject=None,
type='notification', subtype=None, parent_id=False,
attachments=None, context=None, content_subtype='html',
* * MY CODE * *
thread_id = super(MailThread, self).message_post(self, cr, uid, thread_id,
body=body, subject=subject, type=type, subtype=subtype,
context=nosub_ctx, content_subtype=content_subtype, **kwargs)
But my method is never called...
I've searched the code and found that others modules do that, could it be that theirs are not being executed also, or do they do something I'm missing? (ex: addons mass_mailing)
I've tried also with class name as mail_thread, no success.
I've looked to this code:
But applying it makes mail_thread.message_post undefined.
Can one point me the right direction, thanks in advance!
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 1/19/16, 9:33 PM|
|Seen: 517 times|
|Last updated: 1/21/16, 8:41 AM|