Skip to Content
Menu
This question has been flagged
1 Reply
3027 Views

Hi Odoo community!

In the product (template) form, I want to make some fields invisible based on the category.
For instance, we should hide the "RAM in GB" field for non-electronic products.

What I did, but doesn't work unfortunately is: attrs="{'invisible': ['!', ('categ_id','child_of',[5,25,37])]}".
This usually works, but it doesn't in this specific case. I guess it's the "child_of" that doesn't work with the "attrs" attribute.

Any idea how to do? (Odoo 10)

Avatar
Discard
Best Answer

You can try like this   attrs="{'invisible': [('categ_id','in',[your ids])]}"

Avatar
Discard