تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
13742 أدوات العرض

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
يناير 17
3216
4
فبراير 24
11352
0
نوفمبر 23
1369
1
يونيو 23
1890
0
أكتوبر 22
2443