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.

1

How to stop records from hiding when active=False

By
Gregor Heger
on 5/21/15, 6:23 AM 846 views

Hi,

has anyone an idea how I can override Odoo's default behaviour of hiding records with active=False values?
It leads to many problems for users who needs to see inactive records in several one2many or many2many views. It is not very user friendly, if they always have to switch to some list view and have to enable the advanced filter for active=False & active=True.

So, how to override this behaviour without renaming the active column in many of my models?

Thanks!

3
Jos De Graeve
On 5/21/15, 6:30 AM

Hi,

This can be done by passing this value in the context of your view:

{'active_test': False,}


A simple way to change the context is with the debug mode, choose "Edit action" from the debug window as admin user.  In the form you can update the value for context.


Regards,

Jos

It works fine, thank you!

Gregor Heger
on 5/22/15, 7:33 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

3 follower(s)

Stats

Asked: 5/21/15, 6:23 AM
Seen: 846 times
Last updated: 5/20/16, 8:45 AM