跳至内容
菜单
此问题已终结
1 回复
48 查看

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
1762
2
9月 25
1428
1
8月 25
620
1
10月 24
1726
0
6月 24
1798