تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
3 الردود
2282 أدوات العرض

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
أكتوبر 24
1711
1
أبريل 25
2575
1
مارس 25
2326
4
أغسطس 24
3767
2
مايو 24
7570