Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
10708 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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!

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 5 24
1858
3
thg 7 22
2952
1
thg 2 17
5569
1
thg 3 15
4237
1
thg 3 15
16036