Odoo Help


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

on 2/19/15, 1:08 AM 1,026 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.


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: 1026 times
Last updated: 3/16/15, 8:10 AM