Odoo Help


How to hide the create button dynamical tree view in Odoo ?

on 10/7/15, 4:49 AM 1,426 views

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">


On 10/7/15, 10:31 AM


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:


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


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!

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 10/7/15, 4:49 AM
Seen: 1426 times
Last updated: 10/7/15, 10:31 AM