Odoo Help


how to Modify db_filter method in openerp->http.py without overwrite in original file?

on 2/19/15, 1:08 AM 665 views

Hi all,

Here i want to do Modify db_filter method ih openerp->http.py without overwrite in original file? how can i done this? please let me know...!

Thanks in advance....

Stefan Rijnhart
On 2/19/15, 3:15 AM

Apply the technique of monkey patching in Python:

in your addon:

from openerp import http

def db_filter(dbs, httprequest=None):

http.db_filter = db_filter

What happens here, is that you replace the function reference from the original\
 module with your own function reference.


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

2 follower(s)


Asked: 2/19/15, 1:08 AM
Seen: 665 times
Last updated: 3/16/15, 8:10 AM