Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

I want to store the remote Ip address(client) in my DB

By
khudrath ali baig
on 1/18/14, 3:00 AM 902 views

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')

pradeep
on 1/18/14, 8:16 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 1/18/14, 3:00 AM
Seen: 902 times
Last updated: 3/16/15, 8:10 AM