Skip to Content
Menu
This question has been flagged
1 Atsakyti
10716 Rodiniai

I have hided the create button using following view,

<tree create="false" edit="false">

It is working perfect, But I need to hide the create button dynamic way like this,

<tree attrs="{'create':[("uid",'=',1)]}" edit="false">

Thanks

Portretas
Atmesti
Best Answer

Tansadio,

you can not add an attrs attribute like this in tree tag, infact you can keep <tree create="false" edit="false"> and add a new customized button as:

<header>

 <button string="Create" class="oe_button oe_highlight" special="create" name="your_Function" attrs="{'invisible': YOUR_CONDITION}"/>

</header>

and then redirect to form view to create a new record...

Here you can keep your condition also for hiding the button.

Hope it Helps!

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
1
geg. 24
1867
3
liep. 22
2964
1
vas. 17
5579
1
kov. 15
4237
1
kov. 15
16043