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

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

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ส.ค. 20
3162
5
ธ.ค. 19
12096
4
ม.ค. 19
4815
1
ม.ค. 19
8187
[SOLVED] Invisible Button After Clicked แก้ไขแล้ว
2
ม.ค. 19
10772