跳至內容
選單
此問題已被標幟
1 回覆
4767 瀏覽次數

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

頭像
捨棄
最佳答案

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.

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
8月 25
591
0
10月 22
595
4
2月 24
8613
3
12月 19
5338
0
3月 24
10100