Odoo Help


How to get current URL in openerp v7?

on 11/22/16, 11:18 PM 373 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


Nilmar Shereef

--Nilmar Shereef--
| 4 4 7
Calicut, India
--Nilmar Shereef--

Python Developer. Android Developer. .Net Developer

Nilmar Shereef
On 11/23/16, 6:20 AM


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.

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 11/22/16, 11:18 PM
Seen: 373 times
Last updated: 11/23/16, 6:20 AM