Odoo Help

0

How to get current url from bowser?

By
Tessnim ZRAYGA
on 4/28/16, 1:24 PM 1,234 views

I need to get current active url in the browser and extract model from it. Is that possible?
Please Help

1
Bhavik Bagadiya
On 4/29/16, 12:23 AM

Hello Tessnim

you can try 

1 . 

from openerp.http import request

print(request.httprequest.__dict__)


or

2.  refer link

\ https://www.odoo.com/forum/help-1/question/how-to-get-url-of-current-page-29394


Thanx.

0
deep
On 9/21/16, 2:58 AM

from openerp.http import request

print request.httprequest.url_root


Or: 

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


0

In Python

from openerp import http
print http.request.env['ir.config_parameter'].get_param('web.base.url') # BASE URL

print http.request.httprequest

print http.request.httprequest.full_path

In Javascript

window.location.href


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.

Register

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)

Stats

Asked: 4/28/16, 1:24 PM
Seen: 1234 times
Last updated: 9/21/16, 3:40 AM