Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
3 Odpowiedzi
2315 Widoki

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


Awatar
Odrzuć
Najlepsza odpowiedź


Awatar
Odrzuć
Najlepsza odpowiedź

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


Awatar
Odrzuć
Najlepsza odpowiedź

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


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

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
paź 24
1732
1
kwi 25
2594
1
mar 25
2334
4
sie 24
3779
2
maj 24
7608