コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
6227 ビュー

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,

            }

アバター
破棄
最善の回答

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

アバター
破棄
関連投稿 返信 ビュー 活動
3
6月 24
7900
2
6月 23
3836
1
10月 24
4798
1
9月 24
3036
1
5月 24
3258