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

Can I use the syntax as condition1.type1 and condition2.type1 in the field of view xml?
if condition1 and condition2 have the type1 attribute?

<field name="name" attrs="{'invisible': [('condition1.type1', '=', False)], 'required': [('condition2.type1', '=', True)]}"/>

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

Hello, if it's still problem. You can use context.


context="{'default_type_1': condition1.type1, 'default_type_2': condition2.type1}"
invisible="context.get('default_type_1', False)"
required="context.get('default_type_2')=='default_type_2_value'"
Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 10 22
9615
1
thg 3 15
11977
6
thg 9 17
8091
2
thg 3 15
9868
1
thg 3 15
4373