Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
4541 มุมมอง

I want to store the remote Ip address(client) in my DB. or I now that http.py has client ip address but how can i get the client ip address in my customized py file

อวตาร
ละทิ้ง

------------------------------ in xml file --------------------------------

<script> $(document).ready(function(){ $(document).delegate(".oe_form_button_edit , .oe_list_add , .oe_form_button_create ",'click',function() { ipfill(); });

function ipfill() { $.getJSON("http://smart-ip.net/geoip-json?callback=?", function(data){ $('.ipcaptuaring').children().val(data.host); }); } ipfill(); }); </script>

<field name="ipaddress" class="ipcaptuaring"/>

---------------------in py file -----------------------------------

'ipaddress':fields.char('ip Address')

Related Posts ตอบกลับ มุมมอง กิจกรรม
2
มี.ค. 15
5378
OpenERP get User IP Address แก้ไขแล้ว
7
ก.พ. 24
12259
0
พ.ย. 17
4064
1
พ.ย. 24
1099
How to get ip address of login user? แก้ไขแล้ว
2
ก.ค. 22
15006