Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
2591 Lượt xem

I have configured whats-app with odoo and i get the response if someone sent message to odoo, the API response will get through a controller of type=json; I need to showcase one notification to the user in the browser, if user is logged in;
I tried in python side like 

def sticky_notification(self, senderName):
return {
'type': 'ir.actions.client',
        'tag'
: 'display_notification',
        'params'
: {
'type': 'success',
            'title'
: _("Whatsapp"),
            'message'
: 'You have one message from ' + senderName,
            'sticky'
: True,
        }
}

but its not working 
so, how can we trigger one JS function once the response get;
Or is there any other way to solve this.

Thanks

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi,

You can refer this blog to set up real time notification in odoo

https://www.cybrosys.com/blog/how-to-setup-real-time-communication-in-odoo-using-bus-service


Hope it helps

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 12 23
2624
3
thg 8 25
2585
1
thg 3 25
4059
2
thg 12 24
4103
2
thg 5 25
24239