Odoo Help


Exception: Object Unbound in request

aneesh ATEES Infomedia Pvt Ltd
on 11/21/16, 4:27 AM 629 views

from openerp.http import request

    ipnew = request.httprequest.environ['REMOTE_ADDR']

except Exception as e:
    print " Exception on request ",e



issue solved environ = request.httprequest.headers.environ

print environ.get("REMOTE_ADDR") need to put inside the function instead of class header

On 11/21/16, 4:36 AM

Actually I don't know more aboute REMOTE_ADDR

But this is possible

from openerp.http import request
environ = request.httprequest.headers.environ
print environ.get("REMOTE_ADDR")

My output

May help you

I am still getting Exception object Unbound

aneesh ATEES Infomedia Pvt Ltd
on 11/21/16, 4:43 AM

I tested this inside a compute function

it is working

on 11/21/16, 4:53 AM

can you provide that sample code

aneesh ATEES Infomedia Pvt Ltd
on 11/21/16, 5:05 AM

class Foo(models.Model):


____def _compute_progress(self):

________self.progress = lib.progress_by_state(self)

________from openerp.http import request

________environ = request.httprequest.headers.environ

________print environ.get("REMOTE_ADDR")

on 11/21/16, 6:06 AM

don't look first line of function

on 11/21/16, 6:08 AM

still i get excception of object unbound

aneesh ATEES Infomedia Pvt Ltd
on 11/22/16, 1:05 PM

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: 11/21/16, 4:27 AM
Seen: 629 times
Last updated: 11/24/16, 1:07 AM