Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
4766 Vistas

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
Descartar
Mejor respuesta

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
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
1
ago 25
591
0
oct 22
595
4
feb 24
8613
3
dic 19
5338
0
mar 24
10100