Odoo Help

Welcome!

This community 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.

0

[SOLVED] Add a message in "oe_chatter" - "Messages and communication history" box.

By
Selverine
on 5/16/15, 11:26 AM 1,455 views

Hi Everyone,


I noticed that at the end of the view for Sales there is a "Messages and communication history" box.

Below the code:

<div class="oe_chatter">

<field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>

<field name="message_ids" widget="mail_thread"/>

</div>


I created an personal action ( button). How is possible to automatically add a message in "oe_chatter" when someone click on my button?


Thank you a lot,


Selverine

1
Peter
On 5/18/15, 6:37 AM

Try this code to send messages to all followers of the object:


        body = "My Message!"

       records = self._get_followers(cr, uid, ids, None, None, context=context) followers = records[ids[0]]['message_follower_ids'] self.message_post(cr, uid, ids, body=body, subtype='mt_comment', partner_ids=followers, context=context)


        

Hi Peter. It is exactly what I needed. Thank you a lot!

Selverine
on 5/24/15, 4:07 AM

Your Answer

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

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 5/16/15, 11:26 AM
Seen: 1455 times
Last updated: 5/24/15, 4:07 AM