Reputation: 43
I want to replace one of the defaults buttons in treeview header by one with a funcionality made by my... I try using xpath in this way but not worked
<field name= "types_id" colspan="8" nolabel="1">
<tree options='{"deletable": false, "addable":null, "isClarkGable": false}'>
<field name="type_id"/>
<field name="fundamentation"/>
<xpath expr="//tree/button[@string='Add']" position="replace">
<button name="button_cancel" string="Mark to Cancel" type="object" icon="gtk-cancel"/>
</xpath>
</tree>
</field>
Upvotes: 2
Views: 2547
Reputation: 16743
The option you are using is for field not for the tree tag. so your xml will be like,
<field name= "types_id" colspan="8" nolabel="1" options='{"deletable": false, "addable":null}'>
<tree delete="false" string='YOUR STRING'>
<field name="type_id"/>
<field name="fundamentation"/>
<xpath expr="//tree/button[@string='Add']" position="replace">
<button name="button_cancel" string="Mark to Cancel" type="object" icon="gtk-cancel"/>
</xpath>
</tree>
</field>
Upvotes: 4