콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
3 답글
6221 화면

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,

아바타
취소
관련 게시물 답글 화면 활동
0
10월 21
2440
0
7월 21
2047
8
10월 20
5054
0
4월 24
1522
1
3월 23
4152