Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
4773 Visualizzazioni

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
Abbandona
Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
ago 25
592
0
ott 22
595
4
feb 24
8613
3
dic 19
5341
0
mar 24
10101