Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
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!
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 1/19/16, 9:33 PM|
|Seen: 656 times|
|Last updated: 1/21/16, 8:41 AM|