Odoo Help

Welcome!

This community 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.

0

How to get current url from bowser?

By
Tessnim ZRAYGA
on 4/28/16, 1:24 PM 515 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
shameem@aχoncoms
On 9/21/16, 3:40 AM

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


0

deep

--deep--
1617
| 5 4 7
Bengaluru, India
--deep--

Techno-Functional Associate with 6+ years of experience in Odoo (formerly known as OpenERP).

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')


Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

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