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

This is my odoo 16 code. i want to convert this code to Odoo 17. i want to invisible this button using "invisible" property.


here is my xml code..


<button name="action_test" string="Request test"

                    type="object"

                    attrs="{'invisible': [('state', '!=', 'test2'), 'invisible':[('test_team_ids',

                    '!=',False)]}"

                    class="btn-primary"/>


アバター
破棄
最善の回答


アバター
破棄
最善の回答

Hi,

Here is the  updated code:


<button name="action_test" string="Request test" type="object"
        invisible="state != 'test2' or test_team_ids"
        class="btn-primary"/>


Hope it helps


アバター
破棄
最善の回答

invisible="state != 'test2' or test_team_ids"


For more reference you can search 'invisible=' in odoo17 base code you will get more ideas. 

アバター
破棄
関連投稿 返信 ビュー 活動
1
10月 24
1378
1
4月 25
2022
1
3月 25
1837
4
8月 24
3251
2
5月 24
6534