Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
5146 Vues

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

Avatar
Ignorer
Meilleure réponse

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'"
Avatar
Ignorer
Publications associées Réponses Vues Activité
1
oct. 22
9458
1
mars 15
11816
6
sept. 17
7891
2
mars 15
9711
1
mars 15
4201