Skip to Content
Menú
This question has been flagged
1 Respondre
4777 Vistes

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
Descartar
Best Answer

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
Descartar
Related Posts Respostes Vistes Activitat
1
d’ag. 25
598
0
d’oct. 22
595
4
de febr. 24
8620
3
de des. 19
5345
0
de març 24
10108