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

Hi,

I would like to implement the following scenario.

  • User must be able to see all the records and should be able to edit only his own records

Is it possible to do it in openerp 7 and if possible how to do it?

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

You can define Access Rights to your Object as readonly (disable write and delete access). And define Record Rules for your Object with full access, but with domain:

['|',('user_id','=',False),('user_id','=',user.id)]

So, to all user will apply Access Rights and if user in domain then also apply Record Rules.

Ảnh đại diện
Huỷ bỏ

What is the meaning of this filter code? I do not understand.

['|',('user_id','=',False),('user_id','=',user.id)]

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 3 25
1485
0
thg 8 25
1461
2
thg 4 23
25800
0
thg 12 20
3312
2
thg 6 20
17884