Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
4780 Prikazi

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
Opusti
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
Opusti
Related Posts Odgovori Prikazi Aktivnost
1
avg. 25
600
0
okt. 22
595
4
feb. 24
8624
3
dec. 19
5347
0
mar. 24
10116