تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
72 أدوات العرض

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
يوليو 24
1769
2
سبتمبر 25
1430
1
أغسطس 25
622
1
أكتوبر 24
1728
0
يونيو 24
1804