Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
9571 Weergaven

so i already looked over this thread: 

https://stackoverflow.com/questions/63557264/odoo-13-how-to-use-message-post-to-send-message-in-the-chatter/76754252?noredirect=1#comment135317243_76754252

but i am still lost on how i should proceed with creating the event, i am fairly new to odoo so i would appreciate any help.

I tried adding a new button in the composer tool bar, that worked as expected however said button can't use the message_post() method of the channel model cause it counts under the composer model.

Edit: sorry about the mix-up i meant to say i need to add an additional button in the discuss tab where while talking with someone in a chat or a channel i can ping them to give them with a predetermined message in the code.

Avatar
Annuleer
Beste antwoord

Hi 

You can update the code as follows 

users = self.user_ids
message_body = _("The user %s is added.", self.name)
self.message_post(partner_ids=users.mapped('partner_id').ids, body=message_body)

https://www.cybrosys.com/blog/how-to-post-a-message-to-chatter-in-odoo-16#:~:text=In%20Odoo%2C%20these%20messages%20are,message%20in%20a%20record's%20chatter.&text=In%20the%20message_post%20method%2C%20content%20is%20passed%20inside%20the%20parameter%20body.

https://youtu.be/W4nGOGpZpVc?si=ZMST2WLRaT-cPjtp


Regards

Avatar
Annuleer
Beste antwoord

Hi,

In Odoo, these messages are posted on the chat using a message_post () function, which is used to create a new message or reply to an existing message in a record's chatter.Here in this blog, we will detail how to post a message to chatter 

Please refer: https://www.cybrosys.com/blog/how-to-post-a-message-to-chatter-in-odoo-16


Hope it helps.

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
dec. 23
1824
1
jul. 23
2012
0
mei 23
2026
0
jul. 25
187
1
jun. 25
909