Odoo Help


How to get ip address of login user?

on 2/20/15, 2:26 AM 1,570 views

Hi friends,

Im using openerp v 6.1.I have to get the ip address and need to store it in databse based on user login. How can we achieve this? Please help me in this situation.Thanks in advance.



| 7 7 8
Turnhout, Belgium

My Odoo blog: http://www.odoo.yenthevg.com/

My Twitter: https://twitter.com/Yenthe666

On 2/20/15, 2:34 AM

You can add import:

from openerp.http import request

And then create a method which gets the IP through the environ:

    def _get_ipaddress(self, cr, uid, context=None):
        return request.httprequest.environ['REMOTE_ADDR'] 


Another V6.1 user that reported he got it working was through this:https://www.odoo.com/forum/help-1/question/how-to-get-user-ip-address-25735#answer_38757

Similar questions (where my answer is based on):


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 platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 2/20/15, 2:26 AM
Seen: 1570 times
Last updated: 3/16/15, 8:10 AM