There's more...

In most cases, you want to display documents on the side of the initial state of any record. If you want to hide the attachment preview based on domain, you can use attrs on the <div> tag to hide the preview.

Take a look at the following example; it will hide the PDF preview if the value of the state field is not draft:

<div class="o_attachment_preview" 
attrs="{'invisible': [('state', '!=', 'draft')]/>
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset