Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
7066 Visualizzazioni

I am modifying a view through inheritance. I want to change an existing field and turn it invisible if other field values false. I know how to do it in the original module:

<field name="street" attrs="{'invisible':[('is_company', '!=', 'True')]}"/>

And I know how to make the field invisible from the view created by me, through inheritance:

<xpath expr="/form//field[@name='street']" position="attributes">
    <attribute name="invisible">1</attribute>
</xpath>

Anyone knows how to manage this? I would appreciate any help. Thank you in advance!

But what I need is to "mix" both options, something like this:

<xpath expr="/form//field[@name='street']" position="attributes">
    <attribute name="invisible">
[('is_company', '!=', 'True')]</attribute>
</xpath>

I will appreciate any help. Thank you in advance!

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
2
mag 24
2976
4
set 20
6228
0
ago 21
3442
4
ago 21
67359
1
nov 24
1702