Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
4775 Vues

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
Ignorer
Meilleure réponse

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
Ignorer
Publications associées Réponses Vues Activité
1
août 25
595
0
oct. 22
595
4
févr. 24
8616
3
déc. 19
5344
0
mars 24
10107