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
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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
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!
Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!
AanmeldenGerelateerde posts | Antwoorden | Weergaven | Activiteit | |
---|---|---|---|---|
|
1
mei 24
|
1743 | ||
|
3
jul. 22
|
2809 | ||
|
1
feb. 17
|
5480 | ||
|
1
mrt. 15
|
4157 | ||
|
1
mrt. 15
|
15946 |