I noticed that at the end of the view for Sales there is a "Messages and communication history" box.
Below the code:
<field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
<field name="message_ids" widget="mail_thread"/>
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,
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]['message_follower_ids'] self.message_post(cr, uid, ids, body=body, subtype='mt_comment', partner_ids=followers, context=context)
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: 5/16/15, 11:26 AM|
|Seen: 1366 times|
|Last updated: 5/24/15, 4:07 AM|