Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
13797 มุมมอง

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!

Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ม.ค. 17
3231
4
ก.พ. 24
11392
0
พ.ย. 23
1389
1
มิ.ย. 23
1917
0
ต.ค. 22
2490