Displaying attachments on the side of the form view
In some applications, such as invoicing, you need to fill in data based on a document. To ease the data-filling process, a new feature was added to Odoo version 12 to display the document on the side of the form view.
In this recipe, we will learn how to display the form view and the document side by side:
Important information
This feature is only meant for large displays (>1534px
), so if you have a small viewport, this feature will be hidden.Internally, this feature uses some responsive utilities, so this feature only works in the Enterprise edition. However, you can still use this code in your module. Odoo will automatically handle this, so if the module is installed in the Enterprise edition, it will show the document, while in the Community edition, it will hide everything without any side effects.
How to do it...
We will enable...