Skip to content Skip to sidebar Skip to footer

Selectively Display Or Hide Button In The Tree View In Openerp

I have placed the buttons (icon is green arrow) in the treeview. I want to show a button only if the record has a Bill of Material (BOM). I do have logic how to find out that, but

Solution 1:

You may use attrs for example

attrs="{'invisible':[('selection_field_name','=','value')]}"

Note: we need to give value which is store in database.

try this,

<xpath expr="//notebook/page[@string='Components']/field/tree[@string='Components']/field[@name='sequence']" position="before" >
    <button class="oe_inline oe_stat_button"type="object" string="Go!" icon="gtk-go-forward" name="action_go" attrs="{'invisible':[('type','=','normal')]}"  />
</xpath>

Post a Comment for "Selectively Display Or Hide Button In The Tree View In Openerp"