Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
5826 Переглядів

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

Аватар
Відмінити
Найкраща відповідь

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'"
Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
1
жовт. 22
9684
1
бер. 15
12058
6
вер. 17
8204
2
бер. 15
9945
1
бер. 15
4444