コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
97678 ビュー

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?

アバター
破棄
最善の回答

Use below approach 


<xpath expr="//page[@string='Contacts']" position="attributes">
       <attribute name="attrs"></attribute>
</xpath>
アバター
破棄
関連投稿 返信 ビュー 活動
3
3月 15
6889
9
8月 20
3973
1
3月 15
5891
1
9月 15
4743
0
3月 15
4059