I need to control visibility of the field based on the value of another field. That another field is a reference. I think I need to do a lookup pretty much the same way as I can do in a module with browse
or search
methods. But how to do in a view?
View:
<field name="org_no" attrs="{'invisible':[('country_id','!=','Sweden')]}"/>
Model (standard res.partner):
country_id: fields.many2one('res.country', 'Country')