Skip to Content
Menu
This question has been flagged
1 Atsakyti
5679 Rodiniai

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)]}"/>

Portretas
Atmesti
Best Answer

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'"
Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
1
spal. 22
9658
1
kov. 15
12034
6
rugs. 17
8162
2
kov. 15
9927
1
kov. 15
4414