<xpath expr="//form/sheet/notebook/page/group/field/tree/field[@name='test']" position="replace">
<field name="parts_id2" style="width:30%%" attrs="{'invisible':[('sts','not in',['release'])]}"/>
</xpath>
但是该字段没有出现在树视图中,而是有时会出现在其他地方的树之外。
答案 0 :(得分:0)
试试这段代码
<xpath expr='//field[@name="ids name"]/tree//field[@name="test"]' position="replace">
<field name="parts_id2" style="width:30%%" attrs="{'invisible':[('sts','not in',['release'])]}"/>
</xpath>
expr='//field[@name="parts_lines"]/tree//field[@name="test"]'
<xpath expr='//field[@name="parts_lines"]/tree//field[@name="test"]' position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr='//field[@name="parts_lines"]/tree//field[@name="test"]' position="replace">
<field name="parts_id2" style="width:30%%" attrs="{'invisible':[('sts','not in',['release'])]}"/>
</xpath>
//sheet//notebook//tree//field[@name="test"]