Odoo Help


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

on 10/7/15, 4:49 AM 992 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">




| 4 3 5
Hyderabad, India

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!

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

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: 992 times
Last updated: 10/7/15, 10:31 AM