I want to use these code to create a channel and post a message whenever the state of a record changes. However, the xml creates a channel and automatically adds my members to it, but the content I post from the python code isn't seen anywhere. How can I post a message to this channel?
Or even just a DM to the users, I just don't know how to use message system in odoo.
# discuss.channel.xml -->
progress
notification about ongoing project
# # python code to post message
odoobot_id = self.env.ref('base.partner_root').id channel = self.env['discuss.channel'].search([('name', 'ilike', 'progress')]) channel.sudo().message_post( body=message, author_id=odoobot_id, message_type="comment", subtype_xmlid="mail.mt_comment", )
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Księgowość
- Zapasy
- PoS
- Project
- MRP
To pytanie dostało ostrzeżenie
You can refer to this documentation for more clarification regarding the discuss application:
https://www.odoo.com/documentation/17.0/applications/productivity/discuss/team_communication.html
By use channels in the Odoo Discuss app to organize discussions between individual teams, departments, projects, or any other group that requires regular communication. With channels, employees can communicate inside dedicated spaces within the Odoo database around specific topics, updates, and latest developments having to do with the organization.
Podoba Ci się ta dyskusja? Dołącz do niej!
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj sięPowiązane posty | Odpowiedzi | Widoki | Czynność | |
---|---|---|---|---|
|
2
kwi 25
|
2741 | ||
Remove Journal Entry Error Notifications
Rozwiązane
|
|
1
gru 24
|
1424 | |
Browser Notification Popup and mobile App
Rozwiązane
|
|
3
gru 24
|
3352 | |
|
1
gru 24
|
1197 | ||
Free Sing Up ??
Rozwiązane
|
|
2
sie 24
|
3509 |