Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
4789 Zobrazení

Hi Everyone,

I need a solution to get current URL in openerp v7. I paste my code hear,if anyone knows please reply.

from openerp.http import request

url = request.httprequest.environ['HTTP_REFERER']

It throws error like ImportError: No module named http

Avatar
Zrušit
Nejlepší odpověď

Hi

current_url = self.env['ir.config_parameter'].sudo().get_param('web.base.url')

Use the above code to get current URL in python.
Hope this may help you.

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
srp 25
605
0
říj 22
595
4
úno 24
8627
3
pro 19
5350
0
bře 24
10118