Odoo Help

Welcome!

This community 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.

0

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

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

Thanks

0

Pawan

--Pawan--
1267
| 4 3 5
Hyderabad, India
--Pawan--


Pawan
On 10/7/15, 10:31 AM

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!

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 community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

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