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

I want to lock users not to delete default filters in search view assigned to them so that they cannot view that does not concern to them. How can we do?

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Domain or Context in the Windows Action will "lock in" the selection of records.  If necessary, create different menu options for different groups of users, each with different domain or context.

https://odootricks.tips/windows-actions/#filters

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Add 'groups' in that filter. In group, add relevant res.group record. And from group add users whatever you want to add. 

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

I think you have to pass the domain on action instead of set a default filter.
when you pass the domain in action it only displays record which satisfied the given domain.

ref. https://github.com/odoo/odoo/blob/11.0/addons/project/views/project_views.xml#L663-L664

อวตาร
ละทิ้ง