Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
97147 Weergaven

Is it possible to only replace the attributes of an xml field in an xml view but not the full field?

Example:

<page string="Contacts" attrs="{'invisible': [('is_company','=',False), ('child_ids', '=', [])]}" autofocus="autofocus">
...
</page>

All i want to change is the

attrs="{'invisible': [('is_company','=',False), ('child_ids', '=', [])]}"

to

attrs=""

without replacing the full page field and all of its content!

So the problem is that i only know how to replace the full <page> filed with all of its content - so i would have to copy and paste all of the content of the page field to my new inherited view also - not a good way for me!

So is there a way to only change the attributes of a field (xml node) through an inherited view?

Avatar
Annuleer
Beste antwoord

Use below approach 


<xpath expr="//page[@string='Contacts']" position="attributes">
       <attribute name="attrs"></attribute>
</xpath>
Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
3
mrt. 15
6354
9
aug. 20
3545
1
mrt. 15
5288
1
sep. 15
4208
0
mrt. 15
3548