I am trying to display attachment in the form view. Based on the type of attachment I want to change the value of widget. If attachment is an image then widget="image"
.
My doubt is if we write something like this:
attrs="{'invisible' : [('state', 'in', ('new','assigned'))] , 'readonly' : [('state', 'not in', 'assigned')]}"
This will set the invisible and read_only properties to true since they are boolean or have just two values. How can we set an attribute to a specific value.
Also, can we use widget to display video attachment in the form view?