Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ

i want to filter some data in standart odoo calendar app. I need to dont show events, that is private for users, who dont participate that event, i can do this by adding new filter in views and adding:


domain="['|', ('privacy','=','public'), '&' ,('partner_ids.user_ids', 'in', [uid]), ('privacy', '=', 'private')]"


but problem is, that this filter is visible and any user can turn it off.

How can i do the same on server level, maybe in models.py file? or there is way to hide this filter but leave it active? i tried also white this filter in views:


record id="action_calendar_event_type" model="ir.actions.act_window">
field name="name">Meeting Types
field name="res_model">calendar.event.type
field name="view_id" ref="view_calendar_event_type_tree"/>
field name="domain">['|', ('privacy','=','public'), '&' ,('partner_ids.user_ids', 'in', [uid]), ('privacy', '=', 'private')]
/record>


but it doesnt work for me

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 5 19
4387
2
thg 9 17
4318
1
thg 7 20
5016
0
thg 11 17
4451
0
thg 6 25
679