Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3 ตอบกลับ
6081 มุมมอง

I would like to notify all users and send a message via the Discuss App.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Updated for Odoo 16:

msg = 'All Users, please be advised ...'

env['mail.message'].create({
'message_type': 'comment',
'subtype_id': env.ref('mail.mt_comment').id,
'model': 'mail.channel',
'res_id': env.ref('mail.channel_all_employees').id,
'body': msg,
})


ORIGINAL POST:

You can do something like this:

msg = 'All Users, please be advised ...'

env['mail.message'].create({
'message_type': 'comment',
'subtype_id': env.ref('mail.mt_comment').id,
'model': 'mail.channel',
'channel_ids': [(6,0,[env.ref('mail.channel_all_employees').id])],
'body': msg,
})
อวตาร
ละทิ้ง

Hey Ray, how are you?
I was wondering if you could elaborate on this a little bit further? I am willing to learn but how could I possibly get this to work?
I have a PO in purchasing and if it reaches a certain state (sent for instance) I want this to trigger a message to be sent to the general channel, saying "Please XY approve PO 123" with links to the PO. I then want to connect this channel to slack, so people are notified and can start from slack.
Thanks

คำตอบที่ดีที่สุด

This For Your Solution https://apps.odoo.com/apps/modules/17.0/rr_autopost_message_on_channel/

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

How to send to user? form code 

'res_id': env.ref('mail.channel_all_employees').id,

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ต.ค. 21
2388
0
ก.ค. 21
1959
8
ต.ค. 20
4920
0
เม.ย. 24
1451
1
มี.ค. 23
4046