跳至內容
選單
此問題已被標幟
1 回覆
13772 瀏覽次數

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!

頭像
捨棄
最佳答案

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!

相關帖文 回覆 瀏覽次數 活動
2
1月 17
3219
4
2月 24
11361
0
11月 23
1374
1
6月 23
1899
0
10月 22
2449