コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
10720 ビュー

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!

アバター
破棄
関連投稿 返信 ビュー 活動
1
5月 24
1870
3
7月 22
2967
1
2月 17
5581
1
3月 15
4239
1
3月 15
16053