Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
3 Ответы
2264 Представления

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. 

Аватар
Отменить
Related Posts Ответы Просмотры Активность
1
окт. 24
1701
1
апр. 25
2569
1
мар. 25
2323
4
авг. 24
3765
2
мая 24
7558