I get the solution of this problem.Here I share my code
Firstly call the send_to_channel method in create.Must create the channel between 2 users for activate the popup message functioanlity.
code sample
def send_to_channel(self, body, result):
users = result.user_id
ch_obj = self.env['mail.channel']
body = body +' '+ result.seq_no
if users:
for user in users:
ch_name = user.name+', '+self.env.user.name
ch = ch_obj.sudo().search([('name', 'ilike', str(ch_name))])
if not ch:
ch = ch_obj.sudo().search([('name', 'ilike', str(self.env.user.name+', '+user.name))])
ch.message_post(attachment_ids=[],body=body,content_subtype='html',
message_type='comment',partner_ids=[],subtype='mail.mt_comment',
email_from=self.env.user.partner_id.email,author_id=self.env.user.partner_id.id)
return True
please check this module https://www.odoo.com/apps/modules/10.0/web_notify/
Thanks, Amal. I will check the module.