Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
13758 Lượt xem

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!

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Tác giả

It works fine, thank you!

Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 1 17
3219
4
thg 2 24
11355
0
thg 11 23
1370
1
thg 6 23
1894
0
thg 10 22
2443