make a page tab dynamic invisible with domain in inherited view

442 Views Asked by At

I try to make a page tab in a view dynamicly visible based on the value of a field of the model. A field that is availble on the screen.

I need to change this is an inherited view

I tried:

<xpath expr="//page[@string='Functions']" position="attributes">
    <attribute name="invisible">[('org_type_id','!=',0)]</attribute>
</xpath>

But now the page tab function is always hidden. even for the org_type_id that are 0.

Is it not possible to use xpath to add a dynamic invisible attritbute?

2

There are 2 best solutions below

0
On BEST ANSWER

You are totally going on wrong way to do that job.

Just you can do with the the following way to do your job some thing like this.

<xpath expr="//page[@string='Functions']" position="attributes">
    <attribute name="attrs">{'invisible':[('org_type_id','!=',0)]}</attribute>

I hope this should helpful for you :)

0
On

You should also try this,

<page string="Functions" position="attributes">
    <attribute name="attrs">{'invisible':[('org_type_id','!=',0)]}</attribute>
</page>