Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
3 Odpovědi
2249 Zobrazení

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"/>


Avatar
Zrušit
Nejlepší odpověď


Avatar
Zrušit
Nejlepší odpověď

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


Avatar
Zrušit
Nejlepší odpověď

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


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

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
říj 24
1694
1
dub 25
2562
1
bře 25
2318
4
srp 24
3757
2
kvě 24
7529