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

I would like to capture the vistors/leads locations (city, country ).
When the visitor submit any forms in website, CRM leads capture should automatically identify the location and store it in address fields .

 I want a clean, supported way to do this in Odoo 18 or 19.

Goal

  • Read the visitor IP from the request
  • Add it as a field on crm.lead
  • Save it during website form submit
  • Keep the default website_form behavior if possible
頭像
捨棄
最佳答案

Hello,
You can catch the visitor IP using:
request.httprequest.environ.get('REMOTE_ADDR')

Hope it helps.

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
7月 24
1769
2
9月 25
1430
1
8月 25
622
1
10月 24
1728
0
6月 24
1804