Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
6236 Visualizações

Hi Community,

I integrate whats app module in my module. when i send the message at that time whatsapp open in same tab after that i can't go back. so if you know that how to open whatsapp in new tab please suggest me how we can do it. 

See my Code

return {

                'type': 'ir.actions.act_url',

                'url': "https://web.whatsapp.com/send?phone="+self.user_id.mobile+"&text=" + message_string,

                'target': 'self',

                'res_id': self.id,

            }

Avatar
Cancelar
Melhor resposta

Hi,

return {
'type': 'ir.actions.act_url',
'url': "https://api.whatsapp.com/send?phone=" + self.user_id.mobile + "&text=" + message_string,
'target': 'new',
'res_id': self.id
}

Give new instead of self in target.

Hope this the source for you: https://github.com/CybroOdoo/CybroAddons/blob/13.0/whatsapp_redirect/wizard/wizard.py

Thanks

Avatar
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
3
jun. 24
7903
2
jun. 23
3841
1
out. 24
4816
1
set. 24
3039
1
mai. 24
3274