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

Goodnight,
I have a field:
tipo_ope = fields.Many2one(
'hinvoice.cat.17',
string='Tipo Ope',
readonly=True)

but I can't hide it when I select the value (25-value test) of the field type_ope. Try several options but it doesn't work.
I detail them.
<field name="campo1"  attrs="{'invisible': [('tipo_ope','=','25')]}"/>
<field name="campo2"  attrs="{'invisible': [('tipo_ope','=','25')],'required':[('tipo_ope','=','25')]}"/> 
<field name="u2" attrs="{'invisible': [('tipo_ope','=',[25])]}"/>
<field name="d2" attrs="{'invisible': [('tipo_ope','=',('value test'))]}"/>
<field name="u3" attrs="{'invisible': [('tipo_ope','=',(25))]}"/>
<field name="d3" attrs="{'invisible': [('tipo_ope','=',('25'))]}"/>
<field name="d4" attrs="{'invisible': [('tipo_ope','=',('25'))]}"/>

Thanks for your help. thanks.

Аватар
Відмінити

You can try <field name="campo1" attrs="{'invisible': [('tipo_ope','=',25)]}"/> or <field name="u2" attrs="{'invisible': [('tipo_ope','in',[25])]}"/> or <field name="u3" attrs="{'invisible': [('tipo_ope','in',(25))]}"/>

Автор Найкраща відповідь

hello Hilar AK,inside the tests did what indicated that it was done. Greetings. 

<field name="u2" attrs="{'invisible': [('tipo_ope','=',[25])]}"/>

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
Odoo Mail Sending Limit Вирішено
2
груд. 23
14890
0
жовт. 23
33
3
жовт. 23
789
1
жовт. 23
569
1
серп. 23
2538