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

Hi

I have the following requirement: Let's say I have a group of users 'A' and a field 'foo', if a user belongs to group 'A' then 'foo' should be equal to zero, any other user not belonging to group 'A' should see the real 'foo' value.


Does anyone know how to achieve this?


Thanks in advance!

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

Rather than change the value must display or not display depending on the group

Like this

field name="foo" attrs="{'invisible':[('user','=',"A")]}" name="foo">


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

So I guess the value 'foo' is involved in a calculation. We must therefore change the calculation according to the group. please, be more specific.

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 12 21
9862
2
thg 10 20
12642
1
thg 5 23
4087
2
thg 8 20
3040
0
thg 11 15
4863