Skip to Content
Menu
This question has been flagged
1 Reply
4107 Views

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
Discard
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
Discard
Related Posts Replies Views Activity
0
Oct 22
594
4
Feb 24
6858
3
Dec 19
4217
0
Mar 24
6930
0
Nov 15
3057