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

Hello to everybody,

I have a field, in a custom module, like: 'user_ids': fields.many2one('res.users', 'User')

I need this field contains only users belonging to a certain group, for example test, but I don't know how set the domain for this kind of relation.

anybody could help me? Thanks in advance

Simone

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

in action part do like this <filed name="domain">'id','=',uid</field>

Tác giả

Thanks for the anserws, i have tried but it doesn't work properly. At the moment i am looking for another way to do that.

Câu trả lời hay nhất

On OpenERP 7.0 (and perhaps earlier) in the ir.actions.act_window record, you want a line similar to:

<field name="domain">[('id','=',uid)]</field>
Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 8 15
5976
5
thg 5 24
25205
5
thg 9 22
11688
1
thg 2 22
26153
1
thg 4 24
13757