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

Hi everyone. Is it possible to send notification to users' inbox or discuss in odoo 10 when an event occurs for example I want to send a notification to project manager(creator of budget) when a budget has been approved in odoo 10. I would like to do it in the model. Can anyone suggest how I can do it or share a link.

Thanks in advance

Regards

아바타
취소
베스트 답변

hello 

for send  the notification you can do like that in your method.

        self.env['mail.message'].create({'message_type':"notification",
                "subtype": self.env.ref("mail.mt_comment").id, # subject type
                'body': "Message body",
                'subject': "Message subject",
                'needaction_partner_ids': [(4, self.user_id.partner_id.id)], # partner to whom you send notification
                'model': self._name,
                'res_id': self.id,
                })
아바타
취소

Hello,

Can you explain how to use it

관련 게시물 답글 화면 활동
1
8월 20
3121
5
12월 19
12055
4
1월 19
4771
1
1월 19
8139
2
1월 19
10750