Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
10713 Ansichten

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

Avatar
Verwerfen
Beste Antwort

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!

Avatar
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
1
Mai 24
1864
3
Juli 22
2961
1
Feb. 17
5574
1
März 15
4237
1
März 15
16040